summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_propsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkonq/konq_propsview.cpp')
-rw-r--r--libkonq/konq_propsview.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/libkonq/konq_propsview.cpp b/libkonq/konq_propsview.cpp
index f72aee191..61e454a40 100644
--- a/libkonq/konq_propsview.cpp
+++ b/libkonq/konq_propsview.cpp
@@ -74,6 +74,7 @@ struct KonqPropsView::Private
bool hiddenfirst:1;
bool descending:1;
TQString sortcriterion;
+ TQString hiddenfilecriteria;
};
KonqPropsView::KonqPropsView( TDEInstance * instance, KonqPropsView * defaultProps )
@@ -98,6 +99,7 @@ KonqPropsView::KonqPropsView( TDEInstance * instance, KonqPropsView * defaultPro
d->dirsfirst = config->readBoolEntry( "SortDirsFirst", true );
d->hiddenfirst = config->readBoolEntry( "SortHiddenFirst", true );
d->descending = config->readBoolEntry( "SortDescending", false );
+ d->hiddenfilecriteria = config->readEntry( "HiddenFileSpec", "w.*" ); // default is wildcard for dotfiles
m_bShowDot = config->readBoolEntry( "ShowDotFiles", false );
m_bShowDirectoryOverlays = config->readBoolEntry( "ShowDirectoryOverlays", false );
m_bShowFreeSpaceOverlays = config->readBoolEntry( "ShowFreeSpaceOverlays", true );
@@ -164,6 +166,11 @@ bool KonqPropsView::isDescending() const
return d->descending;
}
+const TQString& KonqPropsView::hiddenFileSpec() const
+{
+ return d->hiddenfilecriteria;
+}
+
TDEConfigBase * KonqPropsView::currentConfig()
{
if ( !m_currentConfig )
@@ -388,6 +395,23 @@ void KonqPropsView::setDescending( bool descend)
}
}
+void KonqPropsView::setHiddenFileSpec( const TQString &criteria )
+{
+ kdDebug(1203) << "KonqPropsView::setHiddenFileSpec " << criteria << endl;
+ d->hiddenfilecriteria = criteria;
+ if ( m_defaultProps && !m_bSaveViewPropertiesLocally ) {
+ kdDebug(1203) << "Saving in default properties" << endl;
+ m_defaultProps->setHiddenFileSpec( criteria );
+ }
+ else if (currentConfig())
+ {
+ kdDebug(1203) << "Saving in current config" << endl;
+ TDEConfigGroupSaver cgs(currentConfig(), currentGroup());
+ currentConfig()->writeEntry( "HiddenFileSpec", d->hiddenfilecriteria );
+ currentConfig()->sync();
+ }
+}
+
void KonqPropsView::setShowingDotFiles( bool show )
{
kdDebug(1203) << "KonqPropsView::setShowingDotFiles " << show << endl;