Here you can enter a path for a folder to display.
" +// m_cmbPath->setWhatsThis( i18n("Here you can enter a path for a folder to display.
" +// "To go to a folder previously entered, press the arrow on " +// "the right and choose one.
The entry has folder " +// "completion. Right-click to choose how completion should behave.
") ); + m_urlNav->setWhatsThis( i18n("Here you can enter a path for a folder to display.
" "To go to a folder previously entered, press the arrow on " "the right and choose one.
The entry has folder " "completion. Right-click to choose how completion should behave.
") ); @@ -227,7 +239,7 @@ KConfigGroup fileselectorConfigGroup(KGlobal::config(), "fileselector"); setupToolbar( fileselectorConfigGroup.readEntry( "toolbar actions", QStringList() ) ); - m_cmbPath->setMaxItems( fileselectorConfigGroup.readEntry( "pathcombo history len", 9 ) ); +// m_cmbPath->setMaxItems( fileselectorConfigGroup.readEntry( "pathcombo history len", 9 ) ); // if we restore history m_filter->setMaxCount( fileselectorConfigGroup.readEntry( "filter history len", 9 ) ); @@ -244,7 +256,7 @@ m_dir->readConfig(cgDir); KConfigGroup cg (config, name ); - m_cmbPath->setUrls( cg.readPathEntry( "dir history", QStringList() ) ); +// m_cmbPath->setUrls( cg.readPathEntry( "dir history", QStringList() ) ); KConfigGroup globalConfig( KGlobal::config(), "fileselector" ); @@ -295,7 +307,7 @@ { KConfigGroup cg = KConfigGroup( KGlobal::config(), "fileselector" ); - cg.writeEntry( "pathcombo history len", m_cmbPath->maxItems() ); +// cg.writeEntry( "pathcombo history len", m_cmbPath->maxItems() ); cg.writeEntry( "filter history len", m_filter->maxCount() ); cg.writeEntry( "filter history", m_filter->historyItems() ); } @@ -307,12 +319,12 @@ KConfigGroup cg = KConfigGroup( config, name ); QStringList l; - for (int i = 0; i < m_cmbPath->count(); i++) - { - l.append( m_cmbPath->itemText( i ) ); - } - cg.writePathEntry( "dir history", l ); - cg.writePathEntry( "location", m_cmbPath->currentText() ); +// for (int i = 0; i < m_cmbPath->count(); i++) +// { +// l.append( m_cmbPath->itemText( i ) ); +// } +// cg.writePathEntry( "dir history", l ); +// cg.writePathEntry( "location", m_cmbPath->currentText() ); cg.writeEntry( "current filter", m_filter->currentText() ); cg.writeEntry( "last filter", lastFilter ); } @@ -413,21 +425,22 @@ void FileBrowser::Widget::cmbPathReturnPressed( const QString& u ) { - KUrl typedURL( u ); - if ( typedURL.hasPass() ) - typedURL.setPass( QString() ); - - QStringList urls = m_cmbPath->urls(); - urls.removeAll( typedURL.url() ); - urls.prepend( typedURL.url() ); - m_cmbPath->setUrls( urls, KUrlComboBox::RemoveBottom ); +// KUrl typedURL( u ); +// if ( typedURL.hasPass() ) +// typedURL.setPass( QString() ); +// +// QStringList urls = m_cmbPath->urls(); +// urls.removeAll( typedURL.url() ); +// urls.prepend( typedURL.url() ); +// m_cmbPath->setUrls( urls, KUrlComboBox::RemoveBottom ); m_dir->setFocus(); m_dir->setUrl( KUrl(u), true ); } void FileBrowser::Widget::dirUrlEntered( const KUrl& u ) { - m_cmbPath->setUrl( u ); + m_urlNav->setUrl( u ); +// m_cmbPath->setUrl( u ); } void FileBrowser::Widget::dirFinishedLoading() Index: src/filebrowser/FileBrowser.h =================================================================== --- src/filebrowser/FileBrowser.h (Revision 747105) +++ src/filebrowser/FileBrowser.h (Arbeitskopie) @@ -36,8 +36,10 @@ class KConfigBase; class KBookmarkHandler; class KDirOperator; +class KFilePlacesModel; class KHistoryComboBox; -class KUrlComboBox; +class KUrlNavigator; +// class KUrlComboBox; class QAction; class QToolButton; class QCheckBox; @@ -114,7 +116,9 @@ ToolBar *m_toolbar; KActionCollection *m_actionCollection; KBookmarkHandler *m_bookmarkHandler; - KUrlComboBox *m_cmbPath; + KUrlNavigator *m_urlNav; + KFilePlacesModel *m_filePlacesModel; +// KUrlComboBox *m_cmbPath; KDirOperator * m_dir; QAction *m_acSyncDir; KHistoryComboBox * m_filter;