Bug 379170 - 2.6.0 - Regression: "Spacebar calculates disk space" feature is missing
Summary: 2.6.0 - Regression: "Spacebar calculates disk space" feature is missing
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
: 380042 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-24 18:27 UTC by szecsodimlaszlo
Modified: 2018-08-03 19:26 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description szecsodimlaszlo 2017-04-24 18:27:39 UTC
Krusader version: 2.6.0
KDE: 17.04.0
KDE Frameworks: 5.33.0
OS: Arch Linux 64-bit

After upgrading Krusader from 2.5.0 to 2.6.0 the "Spacebar calculates disk space" feature is not available anymore. Its setting is missing from "Konfigurator / Panel / Selection Mode" as well.

Pressing space on any file or directory only select it and moves down.

Prevously, pressing space calculated the selected item's size and displayed it in the "Size" column.

Reproducible: Always

Downgrading to 2.5.0 solves the problem.
Comment 1 Alex Bikadorov 2017-04-25 16:53:54 UTC
"Edit->Calculate Occupied Space" is doing the same thing and you can assign a shortcut to it (e.g. "CTRL+SPACE"). Please tell me thats good enough:)

As a bonus its non-blocking anymore - you can use Krusader for something else while the space calculation is busy.
Comment 2 szecsodimlaszlo 2017-04-25 20:21:10 UTC
(In reply to Alex Bikadorov from comment #1)
> "Edit->Calculate Occupied Space" is doing the same thing and you can assign
> a shortcut to it (e.g. "CTRL+SPACE"). Please tell me thats good enough:)
> 
> As a bonus its non-blocking anymore - you can use Krusader for something
> else while the space calculation is busy.


Thank you for your response...

Do you mean it is not a bug?


Well, I had found "Calculate Occupied Space" in the menus and tried to live with it for a day assigning the "SPACE" to it before I sent my report and downgraded Krusader 2.5.0.

"Calculate Occupied Space" works but it is very inconvenient for me, indeed.

I used to use the missing feature above a lot to calculate the occupied space of a mixed selection of files and subdirectories in a directory very fast. It was handy. I could select the items quickly using the spacebar and the arrow keys, and see the occupied space of the selection in bytes at the bottom of the panel instantly and continuously. I loved this feature. I got used to it.

Now, I have to make some selection first, then run the calculation. Then select more or deselect some. And run the calculation again. That is not instant and not continuous.

The "bonus" is actually killing me because at each calculation I even have to press "OK" in a popup window which is grabbing the focus blocking me like hell.

Displaying the calculation in the system tray would be much better. I mean, for me.


Anyway, the best would be to have the old and the new feature both.
Comment 3 Alex Bikadorov 2017-04-26 19:20:59 UTC
Well, removing the "space key" feature was intended. My assumption was that it is not really needed: Instead of pressing space a lot of times you select all dirs at once and press the shortcut one time.
I thought its a better solution - no waiting anymore for each dir - but I guess I was wrong.

>Displaying the calculation in the system tray would be much better. I mean, for me.

I already thought about it: a progress bar in the status bar with a cancel button, so the user can abort the calculation if it takes too long.

>Anyway, the best would be to have the old and the new feature both.

I generally agree. It's not that I like to annoy users by remove features. But the code was really ugly, believe me. And the simplified code will become a bit more complicated now.

Anyway, I will re-implement the "calc dir size key press". Please be patient.
Comment 4 szecsodimlaszlo 2017-04-26 19:31:06 UTC
(In reply to Alex Bikadorov from comment #3)

> Anyway, I will re-implement the "calc dir size key press". Please be patient.

OK. :)

Thank you very much indeed.
Comment 5 henricoetzee 2017-04-29 08:29:15 UTC
I would also very much appreciate it if this feature can return. Thank you!
Comment 6 Alex Bikadorov 2017-05-05 17:25:56 UTC
Git commit c447f1813f288fdf41ecbdbbc349086faa76dd25 by Alexander Bikadorov.
Committed on 05/05/2017 at 17:16.
Pushed by abikadorov into branch 'master'.

Panel: re-added quick disk space calculation with space key

Was removed in version 2.6.0. New implementation.

Uses old (fixed) shortcut. Calculation is async. UI is extended by new panel
progress bar and cancel button.
Space key for ".." dummy selection does a default, verbose calculation (with
popup dialog) for all files and folders in panel (and selects all; this was
the old behaviour).

FIXED: [ 379170 ] 2.6.0 - Regression: "Spacebar calculates disk space" feature is missing

This partially reverts commit 83d3b67274b24dd18fdcb4adf740a0e8452d5ce0.
Changed layout.xml.

M  +5    -1    krusader/Konfigurator/kgpanel.cpp
M  +1    -0    krusader/Panel/krselectionmode.cpp
M  +8    -1    krusader/Panel/krselectionmode.h
M  +4    -0    krusader/Panel/krview.cpp
M  +2    -0    krusader/Panel/krview.h
M  +47   -18   krusader/Panel/listpanel.cpp
M  +7    -3    krusader/Panel/listpanel.h
M  +1    -1    krusader/Panel/listpanelactions.cpp
M  +32   -7    krusader/Panel/panelfunc.cpp
M  +12   -7    krusader/Panel/panelfunc.h
M  +2    -0    krusader/defaults.h
M  +9    -3    krusader/layout.xml

https://commits.kde.org/krusader/c447f1813f288fdf41ecbdbbc349086faa76dd25
Comment 7 Toni Asensi Esteve 2017-05-21 07:22:18 UTC
*** Bug 380042 has been marked as a duplicate of this bug. ***
Comment 8 csabi 2017-07-14 15:44:47 UTC
Hi, I'm generally glad to see that krusader is getting updates.

I also very much miss calculating the folder size using the space key (it's one of the most useful features), and I see that it is fixed.

So how can I get the new version, will it be soon in a new release, or should I build krusader from the source?
Comment 9 Toni Asensi Esteve 2017-07-15 17:17:14 UTC
> So how can I get the new version, will it be soon in a new release, or should I
> build krusader from the source?

If you are able to follow the steps of
    https://cgit.kde.org/krusader.git/tree/INSTALL
then you can build Krusader and get the latest features :-) , tell Krusader developers about what you find, add improvements :-), etc.
Comment 10 waldauf 2017-07-24 11:34:26 UTC
Hello,

I assumed that if I want to choose dirs/files without calculating space I have to use "insert" key. In case I wish to calculate occupied space I have to use space - and in status bar I can see SUM of all marked dirs/files. 
I set keyboard shortcut ctrl+space but the window is really really annoying. I think default keyboard shortcut to ctrl+space is great idea and space just for marking dirs/files. That is how I can imagine that. :]
Comment 11 Alex Bikadorov 2017-07-24 18:12:10 UTC
@waldauf
You can change the spacebar behaviour:
Settings->Configure Krusader->Panel->Selection Mode->Spacebar calculates disk space

@csabi
It can take some time until the next release. At least some months.
Comment 12 torbjorn 2017-08-17 08:51:48 UTC
Speaking of nothing, it seems disk space calculation shows 4kb for an empty folder(yes, hidden files are not the culprits) So the result when I selected 20 or so empty folders and selected Edit->Calculate disk space was ~300kb space used, and 0 files. ..which I think can be kind of frustrating. I'd expect empty folders to have a size of 0kb. The filesystem in my case was ext4, don't know if that matters.

Should I file a separate report about this, or is it ok here?
Comment 13 Christoph Feck 2017-09-06 21:29:55 UTC
torbjorn, what does "ls -l" show for the size of the folders? Empty directories indeed need disk space.
Comment 14 torbjorn 2017-09-07 16:28:50 UTC
Den 2017-09-06 kl. 23:29, skrev Christoph Feck:
> https://bugs.kde.org/show_bug.cgi?id=379170
>
> --- Comment #13 from Christoph Feck <cfeck@kde.org> ---
> torbjorn, what does "ls -l" show for the size of the folders? Empty directories
> indeed need disk space.
>
(The folders I used for testing before were empty, as in no files in them)

Technically they do, no arguing there. But I'd expect next to everyone 
to expect the reported size to be for the folder *contents*, not the 
number of bytes/blocks used in total for the folder structures on disk. 
Like I said before, the way it is now the returned value/functionality 
is unusable when looking for empty - as in folders with no files, or at 
the most files with no contents - folders.

/Regards, Torbjörn Stabo
Comment 15 Christoph Feck 2017-09-17 23:05:27 UTC
> expect the reported size to be for the folder *contents*, not the number of bytes/blocks used in total for the folder structures on disk.

If you are not expecting the size of data stored on disk, then "disk space calculation" is not the tool you wanted.
Comment 16 torbjorn 2017-09-18 16:31:35 UTC
Den 2017-09-18 kl. 01:05, skrev Christoph Feck:
> https://bugs.kde.org/show_bug.cgi?id=379170
>
> --- Comment #15 from Christoph Feck <cfeck@kde.org> ---
>> expect the reported size to be for the folder *contents*, not the number of bytes/blocks used in total for the folder structures on disk.
> If you are not expecting the size of data stored on disk, then "disk space
> calculation" is not the tool you wanted.

That's getting bogged down in semantics, in a ridiculous way. Are you 
saying that "the total file size" is an invalid definition of "data 
stored on disk"? I repeat what I said earlier - and I stand by it: If 
you're including the size of file system structures, then you make the 
tool worthless for people that wonder if there are files inside some folder.

I guess the expected size of a hard disk drive after reading the label 
is a similar discussion.

/Regards, Torbjörn Stabo
Comment 17 Alex Bikadorov 2017-10-03 15:18:27 UTC
There is already a bug report about adding the size of directories itself when calculating disk space -> Bug 381337 

I'll answer there.
Comment 18 Ondrej Zizka 2018-01-06 18:55:02 UTC
Excuse me, how was this fixed?
I used this feature a lot. I don't mind if it's blocking. What I need is that when I press spacebar, Krusader starts computing the size, without any dialog, and displays it in the size column when done. Also, it should select the directory and move one item down. Just like it was before.

If this is RESOLVED FIXED, I assume the next release will have this regression fixed?
Comment 19 Martin Kostolný 2018-01-06 22:40:27 UTC
> I assume the next release will have this regression fixed?

Yes, this issue is fixed in git so in the next release it will be working :).
Comment 20 Ondrej Zizka 2018-01-07 01:08:27 UTC
Great, thanks! :)
Comment 21 szecsodimlaszlo 2018-05-30 16:28:43 UTC
I can confirm that this issue is fixed in the version 2.7.0.

Thank you, @Alex Bikadorov. I do appreciate your work.
Comment 22 altosch 2018-08-03 19:26:54 UTC
Awesome! I've just upgraded to 2.7.0 from Kubuntu Backports PPA and it works. Many thanks.