! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
File / Folder size text in statusbar sometimes is ambiguous
Status:
RESOLVED: FIXED

Comments

Description alexxcons editbugs 2018-02-06 14:28:12 CET
When entering(double-click) a directory "A" with files and folders inside, the statusbar shows e.g:
> 11 items (242.0 kB), Free space: 200.8 GB

.. actually the 242.0 kB only refer to the size of the files directly inside the directory "A".
It is not a recursive file-size ... folders are not taken into account !


Actually it would be much better to use the same string than for multi-file selection.
If I select all files and folders inside the directory, I get:
> 5 folders selected, 6 other items selected (242.0 kB)

That would be less ambiguous.

The related code is here:
thunar/thunar-list-model.c:2316
and here:
thunar/thunar-list-model.c:2439

Maybe it makes sense to move the code for string creation into a separate method so it can be reused.
Comment 1 Andre Miranda editbugs 2018-02-06 15:31:09 CET
LGTM :)
Comment 2 alexxcons editbugs 2018-08-11 23:58:29 CEST
Created attachment 7881 
patch

fix for this bug.

- Moved related string-building code to separate method to eliminate duplication.

Looks like that for a selection of files/folders:
> Selection: 5 folders, 6 files (242.0 kB)
Looks like that after opening a folder:
> 5 folders, 6 files (242.0 kB)

- Text is still a bit ambiguous, but its better than before.
Comment 3 Andre Miranda editbugs 2018-08-14 01:49:13 CEST
LGTM again.
Comment 4 Git Bot editbugs 2018-08-14 22:04:22 CEST
Alexander Schwinn referenced this bugreport in commit f0d6b65fabd8cba6695455cac3e0d36d4bd40f13

File / Folder size text in statusbar sometimes is ambiguous (Bug #14203)

https://git.xfce.org/xfce/thunar/commit?id=f0d6b65fabd8cba6695455cac3e0d36d4bd40f13
Comment 5 alexxcons editbugs 2018-08-14 22:06:24 CEST
Thanks again for testing!
Fixed only to master, since it is just a minor thing and will requires some translation work.
Comment 6 Andre Miranda editbugs 2018-08-19 06:09:50 CEST
I found a problem with empty folders, the statusbar will show "(null)".
Even worse, an empty Trash will emit the following:
thunar-CRITICAL **: 01:09:00.557: thunar_statusbar_set_text: assertion 'text != ((void *)0)' failed
Comment 7 Git Bot editbugs 2018-08-20 13:23:02 CEST
Alexander Schwinn referenced this bugreport in commit 130870f0dd6aa50b5849a282d2669be0d9a44579

File / Folder size text in statusbar sometimes is ambiguous II (Bug #14203) - fixed problem with empty folders ( no text returned )

https://git.xfce.org/xfce/thunar/commit?id=130870f0dd6aa50b5849a282d2669be0d9a44579
Comment 8 alexxcons editbugs 2018-08-20 13:23:57 CEST
fixed .. hope I got it right this time ;)

Bug #14203

Reported by:
alexxcons
Reported on: 2018-02-06
Last modified on: 2018-08-20

People

Assignee:
alexxcons
CC List:
3 users

Version

Attachments

patch (12.14 KB, patch)
2018-08-11 23:58 CEST , alexxcons
no flags

Additional information