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 | |||
@@ -118,6 +118,12 @@ OPixmapProvider* OLister::provider() { | |||
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 ); |
@@ -126,7 +132,7 @@ OListerCmbAccess* OLister::comboBox() { | |||
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() { |
@@ -142,10 +148,13 @@ void OListerCmbAccess::setCurrentItem( const QString& add, bool FORCE_ADD) { | |||
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 | } |