summaryrefslogtreecommitdiffstats
path: root/libkonq
diff options
context:
space:
mode:
Diffstat (limited to 'libkonq')
-rw-r--r--libkonq/konq_propsview.cpp24
-rw-r--r--libkonq/konq_propsview.h10
2 files changed, 34 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;
diff --git a/libkonq/konq_propsview.h b/libkonq/konq_propsview.h
index 132c53a55..ae699f09a 100644
--- a/libkonq/konq_propsview.h
+++ b/libkonq/konq_propsview.h
@@ -104,6 +104,9 @@ public:
void setDescending (bool descending);
bool isDescending() const;
+ void setHiddenFileSpec( const TQString &criteria );
+ const TQString& hiddenFileSpec() const;
+
void setShowingDotFiles( bool show );
bool isShowingDotFiles() const { return m_bShowDot; }
@@ -188,6 +191,13 @@ private:
Private *d;
+ /**
+ * FIXME
+ *
+ * Why are some private class properties declared in the
+ * "Private" structure d in konq_propsview.cpp and not above?
+ */
+
private:
KonqPropsView( const KonqPropsView & );
KonqPropsView();