Miscellaneous changes from "dotfile" terminology to "hidden file"

terminology.

Signed-off-by: Vincent Reher <tde@4reher.org>
issue/270/tdelibs-V4
Vincent Reher 1 year ago
parent 2d9363f2bd
commit 683d212303

@ -301,7 +301,7 @@ void KDirOperator::slotSimpleView()
void KDirOperator::slotToggleHidden( bool show ) void KDirOperator::slotToggleHidden( bool show )
{ {
dir->setShowingDotFiles( show ); dir->setShowingHiddenFiles( show );
updateDir(); updateDir();
if ( m_fileView ) if ( m_fileView )
m_fileView->listingCompleted(); m_fileView->listingCompleted();
@ -1486,7 +1486,7 @@ void KDirOperator::readConfig( TDEConfig *kc, const TQString& group )
if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"), if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"),
DefaultShowHidden ) ) { DefaultShowHidden ) ) {
showHiddenAction->setChecked( true ); showHiddenAction->setChecked( true );
dir->setShowingDotFiles( true ); dir->setShowingHiddenFiles( true );
} }
if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"), if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"),
DefaultSortReversed ) ) DefaultSortReversed ) )

@ -62,7 +62,7 @@ KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
m_root->setPixmap( 0, pix ); m_root->setPixmap( 0, pix );
m_root->setText( 0, name ); m_root->setText( 0, name );
setShowingDotFiles( showHidden ); setShowingHiddenFiles( showHidden );
connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)), connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)),
this, TQT_SLOT ( slotRefreshItems( const KFileItemList& ))); this, TQT_SLOT ( slotRefreshItems( const KFileItemList& )));

@ -44,7 +44,7 @@ public:
complete = false; complete = false;
autoUpdate = false; autoUpdate = false;
isShowingDotFiles = false; isShowingHiddenFiles = false;
dirOnlyMode = false; dirOnlyMode = false;
autoErrorHandling = false; autoErrorHandling = false;
@ -79,7 +79,7 @@ public:
bool complete; bool complete;
bool autoUpdate; bool autoUpdate;
bool isShowingDotFiles; bool isShowingHiddenFiles;
bool dirOnlyMode; bool dirOnlyMode;
bool autoErrorHandling; bool autoErrorHandling;
@ -106,6 +106,16 @@ public:
TQWidget *window; // Main window ths lister is associated with 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; TQString nameFilter;
TQPtrList<TQRegExp> lstFilters, oldFilters; TQPtrList<TQRegExp> lstFilters, oldFilters;
TQStringList mimeFilter, oldMimeFilter; TQStringList mimeFilter, oldMimeFilter;

@ -26,7 +26,7 @@
#include "tdefilefilter.h" #include "tdefilefilter.h"
KSimpleFileFilter::KSimpleFileFilter() KSimpleFileFilter::KSimpleFileFilter()
: m_filterDotFiles( true ), : m_filterHiddenFiles( true ),
m_filterSpecials( true ), m_filterSpecials( true ),
m_modeFilter( 0 ) 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 ) void KSimpleFileFilter::setFilterSpecials( bool filter )
@ -84,7 +84,7 @@ bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
const TQString& name = item->name(); const TQString& name = item->name();
if ( m_filterDotFiles && item->isHidden() ) if ( m_filterHiddenFiles && item->isHidden() )
return false; return false;
if ( m_filterSpecials && (name == dot || name == dotdot) ) if ( m_filterSpecials && (name == dot || name == dotdot) )

@ -60,27 +60,27 @@ class TDEIO_EXPORT KSimpleFileFilter : public KFileFilter
{ {
public: 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 "..". * and "." and "..".
*/ */
KSimpleFileFilter(); KSimpleFileFilter();
virtual ~KSimpleFileFilter(); virtual ~KSimpleFileFilter();
/** /**
* Enable or disable filtering hidden dot files. * Enable or disable filtering hidden files.
* This option is enabled by default. * 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 * 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. * This option is enabled by default.
* @return true if filtering is enabled, false otherwise * @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. * Filters "." and "..", default is true.
@ -158,7 +158,7 @@ protected:
private: private:
TQStringList m_mimeFilters; TQStringList m_mimeFilters;
bool m_filterDotFiles :1; bool m_filterHiddenFiles :1;
bool m_filterSpecials :1; bool m_filterSpecials :1;
mode_t m_modeFilter; mode_t m_modeFilter;
protected: protected:

Loading…
Cancel
Save