Diffstat (limited to 'libopie/ofileselector/olister.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie/ofileselector/olister.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libopie/ofileselector/olister.cpp b/libopie/ofileselector/olister.cpp index 378c69d..ea09940 100644 --- a/libopie/ofileselector/olister.cpp +++ b/libopie/ofileselector/olister.cpp | |||
@@ -115,21 +115,27 @@ OFileSelector* OLister::view() { | |||
115 | OPixmapProvider* OLister::provider() { | 115 | OPixmapProvider* OLister::provider() { |
116 | return m_prov; | 116 | return m_prov; |
117 | } | 117 | } |
118 | bool OLister::compliesMime( const QString& mime ) { | 118 | bool OLister::compliesMime( const QString& mime ) { |
119 | return view()->compliesMime( mime ); | 119 | return view()->compliesMime( mime ); |
120 | } | 120 | } |
121 | void OLister::internFileSelected( const QString& dir ) { | ||
122 | view()->internFileSelected( dir ); | ||
123 | } | ||
124 | void OLister::internChangedDir( const QString& dir ) { | ||
125 | view()->internChangedDir( dir ); | ||
126 | } | ||
121 | OListerCmbAccess* OLister::comboBox() { | 127 | OListerCmbAccess* OLister::comboBox() { |
122 | if (!m_acc ) | 128 | if (!m_acc ) |
123 | m_acc = new OListerCmbAccess( view()->m_location ); | 129 | m_acc = new OListerCmbAccess( view()->m_location ); |
124 | 130 | ||
125 | return m_acc; | 131 | return m_acc; |
126 | } | 132 | } |
127 | 133 | ||
128 | 134 | ||
129 | OListerCmbAccess::OListerCmbAccess(QComboBox* box ) | 135 | OListerCmbAccess::OListerCmbAccess(QComboBox* cmb ) |
130 | : m_cmb( cmb ) | 136 | : m_cmb( cmb ) |
131 | {} | 137 | {} |
132 | OListerCmbAccess::~OListerCmbAccess() { | 138 | OListerCmbAccess::~OListerCmbAccess() { |
133 | } | 139 | } |
134 | void OListerCmbAccess::clear() { | 140 | void OListerCmbAccess::clear() { |
135 | if ( m_cmb ) | 141 | if ( m_cmb ) |
@@ -139,16 +145,19 @@ void OListerCmbAccess::setCurrentItem( const QString& add, bool FORCE_ADD) { | |||
139 | if ( !m_cmb ) return; | 145 | if ( !m_cmb ) return; |
140 | 146 | ||
141 | 147 | ||
142 | int c = m_cmb->count(); | 148 | int c = m_cmb->count(); |
143 | for ( int i = 0; i < m_cmb->count(); i++ ) { | 149 | for ( int i = 0; i < m_cmb->count(); i++ ) { |
144 | if ( m_cmb->text(i) == add ) { | 150 | if ( m_cmb->text(i) == add ) { |
145 | bo->setCurrentItem( i ); | 151 | m_cmb->setCurrentItem( i ); |
146 | return; | 152 | return; |
147 | } | 153 | } |
148 | } | 154 | } |
155 | if (!FORCE_ADD ) return; | ||
156 | |||
157 | |||
149 | m_cmb->insertItem(add ); | 158 | m_cmb->insertItem(add ); |
150 | m_cmb->setCurrentItem( c ); | 159 | m_cmb->setCurrentItem( c ); |
151 | } | 160 | } |
152 | void OListerCmbAccess::insert( const QString& str ) { | 161 | void OListerCmbAccess::insert( const QString& str ) { |
153 | if ( m_cmb ) | 162 | if ( m_cmb ) |
154 | m_cmb->insertItem( str ); | 163 | m_cmb->insertItem( str ); |