summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Reher <tde@4reher.org>2023-10-02 11:00:52 -0700
committerVincent Reher <tde@4reher.org>2023-10-02 11:22:04 -0700
commit683d21230313ff10e58f25bb90f334a1f2f6c1c3 (patch)
tree5597adbfb6f03887ddd55f89da99d7887ca564f3
parent2d9363f2bdf920666ddc7fab2bd76f27a137662b (diff)
downloadtdelibs-issue/270/tdelibs-V4.tar.gz
tdelibs-issue/270/tdelibs-V4.zip
Miscellaneous changes from "dotfile" terminology to "hidden file"issue/270/tdelibs-V4
terminology. Signed-off-by: Vincent Reher <tde@4reher.org>
-rw-r--r--tdeio/tdefile/tdediroperator.cpp4
-rw-r--r--tdeio/tdefile/tdefiletreebranch.cpp2
-rw-r--r--tdeio/tdeio/kdirlister_p.h14
-rw-r--r--tdeio/tdeio/tdefilefilter.cpp8
-rw-r--r--tdeio/tdeio/tdefilefilter.h18
5 files changed, 28 insertions, 18 deletions
diff --git a/tdeio/tdefile/tdediroperator.cpp b/tdeio/tdefile/tdediroperator.cpp
index f803cf1b7..06b873e77 100644
--- a/tdeio/tdefile/tdediroperator.cpp
+++ b/tdeio/tdefile/tdediroperator.cpp
@@ -301,7 +301,7 @@ void KDirOperator::slotSimpleView()
void KDirOperator::slotToggleHidden( bool show )
{
- dir->setShowingDotFiles( show );
+ dir->setShowingHiddenFiles( show );
updateDir();
if ( m_fileView )
m_fileView->listingCompleted();
@@ -1486,7 +1486,7 @@ void KDirOperator::readConfig( TDEConfig *kc, const TQString& group )
if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"),
DefaultShowHidden ) ) {
showHiddenAction->setChecked( true );
- dir->setShowingDotFiles( true );
+ dir->setShowingHiddenFiles( true );
}
if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"),
DefaultSortReversed ) )
diff --git a/tdeio/tdefile/tdefiletreebranch.cpp b/tdeio/tdefile/tdefiletreebranch.cpp
index b55c3ffb2..cef65b181 100644
--- a/tdeio/tdefile/tdefiletreebranch.cpp
+++ b/tdeio/tdefile/tdefiletreebranch.cpp
@@ -62,7 +62,7 @@ KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
m_root->setPixmap( 0, pix );
m_root->setText( 0, name );
- setShowingDotFiles( showHidden );
+ setShowingHiddenFiles( showHidden );
connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)),
this, TQT_SLOT ( slotRefreshItems( const KFileItemList& )));
diff --git a/tdeio/tdeio/kdirlister_p.h b/tdeio/tdeio/kdirlister_p.h
index 3092e8e2e..a04a88046 100644
--- a/tdeio/tdeio/kdirlister_p.h
+++ b/tdeio/tdeio/kdirlister_p.h
@@ -44,7 +44,7 @@ public:
complete = false;
autoUpdate = false;
- isShowingDotFiles = false;
+ isShowingHiddenFiles = false;
dirOnlyMode = false;
autoErrorHandling = false;
@@ -79,7 +79,7 @@ public:
bool complete;
bool autoUpdate;
- bool isShowingDotFiles;
+ bool isShowingHiddenFiles;
bool dirOnlyMode;
bool autoErrorHandling;
@@ -106,6 +106,16 @@ public:
TQWidget *window; // Main window ths lister is associated with
+ /**
+ * Pointer to object that encapsulates criteria for determining whether
+ * or not the filesystem objects managed by this KDirLister should be
+ * hidden based on characteristics of their names. This object is
+ * passed to KFileItem::setHiddenFileMatcher() for each associated
+ * filesystem entity so the determination of "hidden" can be made using
+ * KDirLister's own TDEHiddenFileMatcher instead of KFileItem's default.
+ */
+ TDEStringMatcher *hiddenFileMatcher;
+
TQString nameFilter;
TQPtrList<TQRegExp> lstFilters, oldFilters;
TQStringList mimeFilter, oldMimeFilter;
diff --git a/tdeio/tdeio/tdefilefilter.cpp b/tdeio/tdeio/tdefilefilter.cpp
index c1663c2e8..f07676d6f 100644
--- a/tdeio/tdeio/tdefilefilter.cpp
+++ b/tdeio/tdeio/tdefilefilter.cpp
@@ -26,7 +26,7 @@
#include "tdefilefilter.h"
KSimpleFileFilter::KSimpleFileFilter()
- : m_filterDotFiles( true ),
+ : m_filterHiddenFiles( true ),
m_filterSpecials( true ),
m_modeFilter( 0 )
{
@@ -37,9 +37,9 @@ KSimpleFileFilter::~KSimpleFileFilter()
{
}
-void KSimpleFileFilter::setFilterDotFiles( bool filter )
+void KSimpleFileFilter::setFilterHiddenFiles( bool filter )
{
- m_filterDotFiles = filter;
+ m_filterHiddenFiles = filter;
}
void KSimpleFileFilter::setFilterSpecials( bool filter )
@@ -84,7 +84,7 @@ bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
const TQString& name = item->name();
- if ( m_filterDotFiles && item->isHidden() )
+ if ( m_filterHiddenFiles && item->isHidden() )
return false;
if ( m_filterSpecials && (name == dot || name == dotdot) )
diff --git a/tdeio/tdeio/tdefilefilter.h b/tdeio/tdeio/tdefilefilter.h
index c6b396785..8750bc02b 100644
--- a/tdeio/tdeio/tdefilefilter.h
+++ b/tdeio/tdeio/tdefilefilter.h
@@ -60,27 +60,27 @@ class TDEIO_EXPORT KSimpleFileFilter : public KFileFilter
{
public:
/**
- * Creates a new filter. By default, it filters only hidden dot files
+ * Creates a new filter. By default, it filters only hidden files
* and "." and "..".
*/
KSimpleFileFilter();
virtual ~KSimpleFileFilter();
/**
- * Enable or disable filtering hidden dot files.
+ * Enable or disable filtering hidden files.
* This option is enabled by default.
- * @param filter true to enable filtering dot files, false to
+ * @param filter true to enable filtering hidden files, false to
* disable
- * @see filterDotFiles
+ * @see filterHiddenFiles
*/
- virtual void setFilterDotFiles( bool filter );
+ virtual void setFilterHiddenFiles( bool filter );
/**
- * Checks whether filtering dot files is enabled.
+ * Checks whether filtering hidden files is enabled.
* This option is enabled by default.
* @return true if filtering is enabled, false otherwise
- * @see setFilterDotFiles
+ * @see setFilterHiddenFiles
*/
- bool filterDotFiles() const { return m_filterDotFiles; }
+ bool filterHiddenFiles() const { return m_filterHiddenFiles; }
/**
* Filters "." and "..", default is true.
@@ -158,7 +158,7 @@ protected:
private:
TQStringList m_mimeFilters;
- bool m_filterDotFiles :1;
+ bool m_filterHiddenFiles :1;
bool m_filterSpecials :1;
mode_t m_modeFilter;
protected: