Diffstat (limited to 'libopie/ofileselector/olister.cpp') (more/less context) (ignore 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() { bool OLister::compliesMime( const QString& mime ) { return view()->compliesMime( mime ); } +void OLister::internFileSelected( const QString& dir ) { + view()->internFileSelected( dir ); +} +void OLister::internChangedDir( const QString& dir ) { + view()->internChangedDir( dir ); +} OListerCmbAccess* OLister::comboBox() { if (!m_acc ) m_acc = new OListerCmbAccess( view()->m_location ); @@ -126,7 +132,7 @@ OListerCmbAccess* OLister::comboBox() { } -OListerCmbAccess::OListerCmbAccess(QComboBox* box ) +OListerCmbAccess::OListerCmbAccess(QComboBox* cmb ) : m_cmb( cmb ) {} OListerCmbAccess::~OListerCmbAccess() { @@ -142,10 +148,13 @@ void OListerCmbAccess::setCurrentItem( const QString& add, bool FORCE_ADD) { int c = m_cmb->count(); for ( int i = 0; i < m_cmb->count(); i++ ) { if ( m_cmb->text(i) == add ) { - bo->setCurrentItem( i ); + m_cmb->setCurrentItem( i ); return; } } + if (!FORCE_ADD ) return; + + m_cmb->insertItem(add ); m_cmb->setCurrentItem( c ); } |