summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Reher <tde@4reher.org>2022-07-20 11:06:06 -0700
committerVincent Reher <tde@4reher.org>2023-10-03 09:05:14 -0700
commit1ecedf73b2c24d1557c6d3d2753ca13be7547aee (patch)
tree47af397a8ef588982131b66d78bbea83770c1ceb
parentf9729e80f5b9191c28b796e71a54a5bf5463ddcd (diff)
downloadtdebase-1ecedf73b2c24d1557c6d3d2753ca13be7547aee.tar.gz
tdebase-1ecedf73b2c24d1557c6d3d2753ca13be7547aee.zip
Updates to accommodate tdelibs PR 163 commit 7cd3caffa5.
Signed-off-by: Vincent Reher <tde@4reher.org>
-rw-r--r--konqueror/listview/konq_listview.cpp24
-rw-r--r--konqueror/listview/konq_listviewitems.cpp8
-rw-r--r--konqueror/listview/konq_listviewwidget.h3
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();