diff options
-rw-r--r-- | konqueror/listview/konq_listview.cpp | 24 | ||||
-rw-r--r-- | konqueror/listview/konq_listviewitems.cpp | 8 | ||||
-rw-r--r-- | konqueror/listview/konq_listviewwidget.h | 3 |
3 files changed, 23 insertions, 12 deletions
diff --git a/konqueror/listview/konq_listview.cpp b/konqueror/listview/konq_listview.cpp index b7956bfcb..6752dbac1 100644 --- a/konqueror/listview/konq_listview.cpp +++ b/konqueror/listview/konq_listview.cpp @@ -273,8 +273,7 @@ KonqListView::KonqListView( TQWidget *parentWidget, TQObject *parent, const char m_sortColumnIndexPrimary = 0; m_sortColumnIndexAlternate = 1; - TDEIO::HiddenFileMatcher* matcher = TDEIO::HiddenFileMatcher::getInstance(); - matcher->setCriteria( m_pProps->hiddenFileSpec() ); + m_pListView->m_dirLister->matcher->setCriteria( m_pProps->hiddenFileSpec() ); setupActions(); @@ -485,14 +484,27 @@ void KonqListView::slotChangeHiddenFileMatcher() /* Since the user might be providing *updated* hidden file match properties, we first need to make sure that we are showing (not hiding) "hidden" files - as defined by the *current*. Otherwise there can be a lot of confusion! + as defined by the *current* match properties. Otherwise there can be + a lot of confusion! */ m_paShowDot->setChecked( TRUE ); slotShowDot(); - TDEIO::HiddenFileMatcher* matcher = TDEIO::HiddenFileMatcher::getInstance(); - if ( matcher->getMatchPropertiesFromUser() ) { - m_pProps->setHiddenFileSpec ( matcher->getCriteria() ); + int result = m_pListView->m_dirLister->matcher->getMatchPropertiesFromUser() ; + + switch ( result ) { + case TDEIO::HiddenFileMatcher::criteriaUnchanged: + return; + break; + case TDEIO::HiddenFileMatcher::criteriaApplied: + return; + break; + case TDEIO::HiddenFileMatcher::saveCriteria: + m_pProps->setHiddenFileSpec( m_pListView->m_dirLister->matcher->getCriteria() ); + break; + case TDEIO::HiddenFileMatcher::reloadCriteria: + m_pListView->m_dirLister->matcher->setCriteria( m_pProps->hiddenFileSpec() ); + break; } } diff --git a/konqueror/listview/konq_listviewitems.cpp b/konqueror/listview/konq_listviewitems.cpp index c539a4c5d..ae6a5ca4f 100644 --- a/konqueror/listview/konq_listviewitems.cpp +++ b/konqueror/listview/konq_listviewitems.cpp @@ -27,6 +27,7 @@ #include <tqpainter.h> #include <tqheader.h> #include <kiconloader.h> +#include <kdirlister.h> static TQString retrieveExtraEntry( KFileItem* fileitem, int numExtra ) { @@ -95,13 +96,10 @@ void KonqListViewItem::updateContents() sortChar = S_ISDIR( m_fileitem->mode() ) ? 1 : 3; else sortChar = 3; - - /* Temporarily - */ - TDEIO::HiddenFileMatcher* matcher = TDEIO::HiddenFileMatcher::getInstance(); - if ( m_groupHiddenFirst && matcher->match(m_fileitem->text()) ) + if ( m_groupHiddenFirst && m_pListViewWidget->m_dirLister->matcher->match( m_fileitem->text() ) ) --sortChar; + //now we have the first column, so let's do the rest int numExtra = 1; diff --git a/konqueror/listview/konq_listviewwidget.h b/konqueror/listview/konq_listviewwidget.h index a8a06408b..470cc2ab4 100644 --- a/konqueror/listview/konq_listviewwidget.h +++ b/konqueror/listview/konq_listviewwidget.h @@ -76,11 +76,12 @@ public: class KonqBaseListViewWidget : public TDEListView { friend class KonqBaseListViewItem; + friend class KonqListViewItem; friend class KonqListView; friend class ListViewBrowserExtension; Q_OBJECT - + public: KonqBaseListViewWidget( KonqListView *parent, TQWidget *parentWidget ); virtual ~KonqBaseListViewWidget(); |