Bug 190580 - Would like ability to display sizes in terms of files and folders, not just "items" could display files and folders count
Summary: Would like ability to display sizes in terms of files and folders, not just "...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-25 02:33 UTC by Shaun Reich
Modified: 2020-05-04 05:27 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08


Attachments
dolphin file and directories count (39.03 KB, image/png)
2009-04-25 17:26 UTC, FiNeX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Reich 2009-04-25 02:33:26 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I feel that there is a problem with the current method of displaying extensive information, mostly seen in the details view mode, for example.

Lets set up a use case...

I have a "Pictures" folder, okay.. this has about 3,000 pictures or so. These are almost all files, with only ~4 TO ~5 folders contained within. The size and items have been calculated (through the properties dialog... I don't think it does it on its own afik), and now when I go up one level, and look at this folder, it displays "3000 items" under the size column.

Okay, now I have a "Music" folder, which has about 237 folders, with ~30-ish GB of music inside. There are only a few files *not* within it's own folder... these are merely in the aforementioned "Music" folder.

The size column views this as having "237 items".

But then, if I go within this folder, the status bar simply tells me that I have X amount of folders, and X amount files.

What I would like to have, is for it to tell me that I have "237 folders and 50 files". I am not sure if this would cause confusion though, since people will be like "wait, I have more files than that" but in which case, they would do the same for folders at the current state of things, one would guess...

I am not sure if background-calculation, or storing of calculatings (probably both) would be possible, as this is also another thing that would add to the benefit.

The main thing here is, it is not specifying whether there are folders, *or* files within here, it just gives a count number of "items", which could be either folders, or files, so you really have no idea.



I think this sounds like a wishlist, so I made it as one *shrug*... but I also hope that this is possible/practical.
Comment 1 FiNeX 2009-04-25 16:51:36 UTC
I'm not sure to have understood what you mean...

Do you suggest to display the count of ALL files/dirs recursively contained on the current directory ?

Example:

Parent folder
 |-Sub-folder A
 |  |-sub-sub-folder B
 |  |  |- 1...n files
 |  |
 |  |- sub-sub-folder C
 |     |- 1...m files
 |  
 |- 1...k files

When dolphin is on "Parent folder", on the status bar you'd like to read n+m+k+3 ?
(3 = { sub folder A, sub-sub-folder B, sub-sub-folder C} )
Comment 2 Shaun Reich 2009-04-25 17:14:57 UTC
Well, that is *also* something that I would like... it would add to the "greatness", but isn't required. It being recursive is another issue really(which it isn't recursive currently afik).

The real problem is, that it applies the generic term "items" to explain what is in a folder, whether it be files or folders. So you could have 250 files, it would say "250 items".

In another directory, you could have 250 folders and it would also say, "250 items". So it's very ambiguous, and obviously... files and folders are completely different objects.
Comment 3 FiNeX 2009-04-25 17:26:58 UTC
Created attachment 33093 [details]
dolphin file and directories count

On current trunk, dolphin displays the string "files" and/or "folders" correctly. It uses the pluralization too.

Isn't it what you want?
Comment 4 Shaun Reich 2009-04-25 17:34:16 UTC
No.. well, yeah, it has the information of what I want, if you notice, I already pointed out the status bar showing that information (I think I did).

Anyways, here is a screenie, this should clear up any confusion, and it's much easier to explain it this way :) .

http://picasaweb.google.com/predator106/KDE4Screenshots#5328652494764255346
Comment 5 FiNeX 2009-04-25 17:48:32 UTC
Ok, now I've understand :-)

You mean the size coulmn on the "details view". Thanks for the patience :-)
Comment 6 Lilian A. Moraru 2012-02-27 12:31:49 UTC
It will take more space on smaller screens. I find it pleasing as it is now.
Comment 7 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:21:35 UTC
Resetting assignee to default as per bug #305719
Comment 8 Nate Graham 2017-09-03 14:38:24 UTC
This makes sense to do Dolphin-wide, not just in Details mode columns. For example, the Information panel also displays Size information in terms of "n items".
Comment 9 Méven Car 2020-05-04 05:27:05 UTC
Git commit e6ea3ab4c41dcc115143a237aafd3a1152849433 by Méven Car.
Committed on 04/05/2020 at 05:26.
Pushed by meven into branch 'master'.

[Details mode] Allow to fill the column size of directories with actual size

Summary:
Allow to compute the recursive size of directories to fill the details view size column.
A setting allow to set a limit to the recursive level, allowing the user to have some power over the setting.

When sorting by size and the feature is on, we get progressive ordering as the directory size are gathered.

KDirectoryContentsCounter uses a cache internally to keep results so that it can display directory size faster, but counts the dir size of directories each time it is asked to count the size a directory nevertheless and when the size has changed, it is updated.
KDirectoryContentsCounter uses one worker per instance only, meaning one process per view makes the disk spin.

FIXED-IN: 20.08
Related: bug 158090

Test Plan:
With some recursion allowed:
{F8267580}

Without any recursion allowed (default):
{F8267581}

Reviewers: elvisangelaccio, ngraham, #dolphin

Reviewed By: elvisangelaccio, ngraham, #dolphin

Subscribers: feverfew, anthonyfieroni, iasensio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D25335

M  +8    -0    src/dolphinviewcontainer.cpp
M  +16   -4    src/kitemviews/kfileitemlistwidget.cpp
M  +15   -3    src/kitemviews/kfileitemmodel.cpp
M  +9    -11   src/kitemviews/kfileitemmodelrolesupdater.cpp
M  +1    -1    src/kitemviews/kfileitemmodelrolesupdater.h
M  +39   -32   src/kitemviews/private/kdirectorycontentscounter.cpp
M  +8    -13   src/kitemviews/private/kdirectorycontentscounter.h
M  +68   -30   src/kitemviews/private/kdirectorycontentscounterworker.cpp
M  +11   -3    src/kitemviews/private/kdirectorycontentscounterworker.h
M  +8    -0    src/settings/dolphin_detailsmodesettings.kcfg
M  +45   -5    src/settings/viewmodes/viewsettingstab.cpp
M  +5    -0    src/settings/viewmodes/viewsettingstab.h

https://commits.kde.org/dolphin/e6ea3ab4c41dcc115143a237aafd3a1152849433