[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    [PATCH] - count of files and folders appears when size is counting
From:       Tim Edwards <tkedwards () optusnet ! com ! au>
Date:       2004-05-21 14:45:23
Message-ID: 1085150723.4257.5.camel () coolserver
[Download RAW message or body]

This is a follow on from my patch to add a count of files and folders to
the Konqueror folder properties dialog (see
http://bugs.kde.org/show_bug.cgi?id=81127). 
This patch makes it so that the count of files and folders is shown
actively counting up along with the size when the dialog box is showing
'calculating...'.

What do you guys think?



["konqueror_patch" (konqueror_patch)]

@@ -1100,9 +1100,13 @@ void KFilePropsPlugin::slotFoundMountPoi
 void KFilePropsPlugin::slotDirSizeUpdate()
 {
     KIO::filesize_t totalSize = d->dirSizeJob->totalSize();
-    m_sizeLabel->setText( i18n("Calculating... %1 (%2)")
+    KIO::filesize_t totalFiles = d->dirSizeJob->totalFiles();
+	  KIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs();
+    m_sizeLabel->setText( i18n("Calculating... %1 (%2) %3, %4")
 			  .arg(KIO::convertSize(totalSize))
-			  .arg(KGlobal::locale()->formatNumber(totalSize, 0)) );
+			  .arg(KGlobal::locale()->formatNumber(totalSize, 0))
+        .arg(i18n("1 file","%n files",totalFiles)) 
+        .arg(i18n("1 sub-folder","%n sub-folders",totalSubdirs)));
 }
 
 void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job ) 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic