Bug 291823

Summary: Change or remove "Unknown" text in size column while the size is being calculated.
Product: [Applications] dolphin Reporter: Nikita Skovoroda <chalkerx>
Component: view-engine: details modeAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 2.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1
Attachments: Crude example patch.

Description Nikita Skovoroda 2012-01-18 00:45:58 UTC
Created attachment 67947 [details]
Crude example patch.

Version:           2.0 (using Devel) 
OS:                Linux

In the details view every time i change the folder the text in the "Size" column (for folders) blinks from "Unknown" to the actual items count.
In other cases, "Unknown" may show up for like a second.
The same "Unknown" is displayed when the size of the folder is really unknown (for example, when the user doesn't have permissions to list it).

I think that it would be good to display some other text while calculating the folder size (or do not display any text at all).
For example: "Calculating…", "Updating…" or an empty string: "".

An example (crude) patch is attached. It does the thing, but it should be done in a cleaner way, i think.

Reproducible: Always

Steps to Reproduce:
Use details view.
Open/refresh a folder with some other folders, like /usr/lib/.

Actual Results:  
"Unknown" text blinks for a moment in the size column (or stays there for about a second).
It's the same text that is displayed when the size of the folder is really unknown.

Expected Results:  
Better descriptive text or no text at all (while loading).

If you remove the text at all, the user won't think "stop, what was there just now?", but the blink would be a little bit more visible.

This should probably be tested on various folders (small and large ones).
Comment 1 Peter Penz 2012-01-18 08:35:14 UTC
Thanks for the patch! I generally agree and think probably just showing an empty text temporary might reduce this "flicker" effect. But I need to try it ;-)
Comment 2 Peter Penz 2012-02-03 22:11:58 UTC
Git commit d9bc83e626dc2c789ad71c61f367495eaa2830d7 by Peter Penz.
Committed on 03/02/2012 at 23:07.
Pushed by ppenz into branch 'KDE/4.8'.

Show the value "Unknown" for the item-count only after it has been verified

During determining the item-count for directories just show an empty string
until either the item-count has been calculated or if the item-count is unknown.

Thanks to Nikita Skovoroda for the initial proof-of-concept patch.
FIXED-IN: 4.8.1

M  +7    -5    dolphin/src/kitemviews/kfileitemlistwidget.cpp
M  +10   -13   dolphin/src/kitemviews/kfileitemmodel.cpp
M  +0    -6    dolphin/src/kitemviews/kfileitemmodel.h
M  +7    -5    dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp

http://commits.kde.org/kde-baseapps/d9bc83e626dc2c789ad71c61f367495eaa2830d7
Comment 3 Peter Penz 2012-02-03 22:12:35 UTC
Git commit 9643e50ae7d49c1829290d7069c97dbcc3785f7f by Peter Penz.
Committed on 03/02/2012 at 23:07.
Pushed by ppenz into branch 'master'.

Show the value "Unknown" for the item-count only after it has been verified

During determining the item-count for directories just show an empty string
until either the item-count has been calculated or if the item-count is unknown.

Thanks to Nikita Skovoroda for the initial proof-of-concept patch.
FIXED-IN: 4.8.1

M  +7    -5    dolphin/src/kitemviews/kfileitemlistwidget.cpp
M  +10   -13   dolphin/src/kitemviews/kfileitemmodel.cpp
M  +0    -6    dolphin/src/kitemviews/kfileitemmodel.h
M  +7    -5    dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp

http://commits.kde.org/kde-baseapps/9643e50ae7d49c1829290d7069c97dbcc3785f7f