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 @@ -109,52 +109,61 @@ void OLister::addSymlink( const QString& mine, extra, isSymlink ); } OFileSelector* OLister::view() { return m_view; } OPixmapProvider* OLister::provider() { return m_prov; } 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 ); return m_acc; } -OListerCmbAccess::OListerCmbAccess(QComboBox* box ) +OListerCmbAccess::OListerCmbAccess(QComboBox* cmb ) : m_cmb( cmb ) {} OListerCmbAccess::~OListerCmbAccess() { } void OListerCmbAccess::clear() { if ( m_cmb ) m_cmb->clear(); } void OListerCmbAccess::setCurrentItem( const QString& add, bool FORCE_ADD) { if ( !m_cmb ) return; 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 ); } void OListerCmbAccess::insert( const QString& str ) { if ( m_cmb ) m_cmb->insertItem( str ); } QString OListerCmbAccess::currentText()const { QString str; if (m_cmb ) str = m_cmb->currentText(); |