summaryrefslogtreecommitdiffstats
path: root/libkonq/konq_propsview.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-13 22:41:07 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-13 22:41:07 -0500
commit9e4aad6b3bc3c1b4781a3c1cef6968640d4f6e67 (patch)
tree93678c9bd7fd986e44911b920bc066c591274dae /libkonq/konq_propsview.cc
parent3df12cd87674fdfbc2afa21584e1f3e558fa873b (diff)
downloadtdebase-9e4aad6b3bc3c1b4781a3c1cef6968640d4f6e67.tar.gz
tdebase-9e4aad6b3bc3c1b4781a3c1cef6968640d4f6e67.zip
Add initial media device free space overlay to Konqueror icon view
Diffstat (limited to 'libkonq/konq_propsview.cc')
-rw-r--r--libkonq/konq_propsview.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/libkonq/konq_propsview.cc b/libkonq/konq_propsview.cc
index bc8aa4e9d..edaff588b 100644
--- a/libkonq/konq_propsview.cc
+++ b/libkonq/konq_propsview.cc
@@ -94,6 +94,7 @@ KonqPropsView::KonqPropsView( TDEInstance * instance, KonqPropsView * defaultPro
d->descending = config->readBoolEntry( "SortDescending", false );
m_bShowDot = config->readBoolEntry( "ShowDotFiles", false );
m_bShowDirectoryOverlays = config->readBoolEntry( "ShowDirectoryOverlays", false );
+ m_bShowFreeSpaceOverlays = config->readBoolEntry( "ShowFreeSpaceOverlays", false );
m_dontPreview = config->readListEntry( "DontPreview" );
m_dontPreview.remove("audio/"); //Use the separate setting.
@@ -222,6 +223,7 @@ bool KonqPropsView::enterDir( const KURL & dir )
m_bShowDot = config->readBoolEntry( "ShowDotFiles", m_bShowDot );
d->caseInsensitiveSort=config->readBoolEntry("CaseInsensitiveSort",d->caseInsensitiveSort);
m_bShowDirectoryOverlays = config->readBoolEntry( "ShowDirectoryOverlays", m_bShowDirectoryOverlays );
+ m_bShowFreeSpaceOverlays = config->readBoolEntry( "ShowFreeSpaceOverlays", m_bShowFreeSpaceOverlays );
if (config->hasKey( "DontPreview" ))
{
m_dontPreview = config->readListEntry( "DontPreview" );
@@ -393,6 +395,24 @@ void KonqPropsView::setShowingDirectoryOverlays( bool show )
}
}
+void KonqPropsView::setShowingFreeSpaceOverlays( bool show )
+{
+ kdDebug(1203) << "KonqPropsView::setShowingFreeSpaceOverlays " << show << endl;
+ m_bShowFreeSpaceOverlays = show;
+ if ( m_defaultProps && !m_bSaveViewPropertiesLocally )
+ {
+ kdDebug(1203) << "Saving in default properties" << endl;
+ m_defaultProps->setShowingFreeSpaceOverlays( show );
+ }
+ else if (currentConfig())
+ {
+ kdDebug(1203) << "Saving in current config" << endl;
+ TDEConfigGroupSaver cgs(currentConfig(), currentGroup());
+ currentConfig()->writeEntry( "ShowFreeSpaceOverlays", m_bShowFreeSpaceOverlays );
+ currentConfig()->sync();
+ }
+}
+
void KonqPropsView::setShowingPreview( const TQString &preview, bool show )
{
if ( m_dontPreview.contains( preview ) != show )