┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-12-18 18:13:31 +0000
committerDavid Faure <[email protected]>2007-12-18 18:13:31 +0000
commit00bded7c8d9c97dcaf726347d663032de3402b03 (patch)
tree52370e5481def986da3b26b03c45d12a937bec8a /src
parentfe09a37c59f3f326556b31e76974758badcc1dad (diff)
Fix discrepancy in total size between statusbar and infosidebarpage; reported by _mika, approved by Peter.
svn path=/trunk/KDE/kdebase/apps/; revision=750121
Diffstat (limited to 'src')
-rw-r--r--src/infosidebarpage.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp
index bed20b1f5..7b0d2d40c 100644
--- a/src/infosidebarpage.cpp
+++ b/src/infosidebarpage.cpp
@@ -333,9 +333,10 @@ void InfoSidebarPage::showMetaInfo()
unsigned long int totalSize = 0;
foreach (const KFileItem& item, selectedItems) {
- // TODO: what to do with directories (same with the one-item-selected-code)?,
- // item.size() does not return the size of the content : not very instinctive for users
- totalSize += item.size();
+ // Only count the size of files, not dirs; to match what
+ // DolphinViewContainer::selectionStatusBarText does.
+ if (!item.isDir() && !item.isLink())
+ totalSize += item.size();
}
addInfoLine(text, i18nc("@label", "Total size:"), KIO::convertSize(totalSize));
}