Bug 395155 - In folder view the ‘Shift’ key doesn’t change the right-click menu item from ‘Move to Trash’ to ‘Delete’
Summary: In folder view the ‘Shift’ key doesn’t change the right-click menu item from ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.12.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 18:33 UTC by Karl Ove Hufthammer
Modified: 2018-10-24 19:03 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.14.3


Attachments
Video showing the ‘Move to Trash’/‘Delete’ feature in action (975.88 KB, video/mp4)
2018-06-12 14:49 UTC, Karl Ove Hufthammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2018-06-08 18:33:56 UTC
This is basically a duplicate of #307248, because we have been told we must re-report existing (non-fixed) bugs … :(

Actual behaviour:
In folder view, holding ‘Shift’ either during or after right-clicking on a file/folder has no effect.

Expected behaviour:
Holding ‘Shift’ either during or after right-clicking on a file/folder should switch the text, icon and action in the context-menu from ‘Move to Trash’ to ‘Delete’, just like it does in Dolphin. Letting go of ‘Shift’ should change the text, icon and action back to ‘Move to Trash’.
Comment 1 Eike Hein 2018-06-11 06:20:12 UTC
Re-reporting has the advantage that the maintainer of the current codebase actually sees the request, so there's some utility to it :)
Comment 2 Eike Hein 2018-06-11 07:42:18 UTC
I took a quick look at this now, and I can't reproduce it: Both Dolphin and Folder View show both the "Move to Trash" and "Delete" actions here in the context menu and don't change when the modifier is pressed.
Comment 3 Øystein Steffensen-Alværvik 2018-06-11 14:18:52 UTC
I can reproduce (on Neon 5.12.5). In both Folder View and Desktop View the 'Shift' key does *not* trigger 'Delete' in the right-click menu of a file/folder. Reproducible in Dolphin at least from 'desktop:/' and 'tags:/' (tags:/SOMETAG).

Also, from 'desktop:/' and 'tags:/' in Dolphin the right-click menu shows 'Delete   Shift+Del' – but users might expect the 'Move to trash' option since its default elsewhere?
Comment 4 Eike Hein 2018-06-12 07:12:59 UTC
I don't quite understand your comment. The point is the context menus shows both actions at all times (provided the protocol supports them) regardless of the modifier.
Comment 5 Øystein Steffensen-Alværvik 2018-06-12 10:21:02 UTC
(In reply to Eike Hein from comment #4)
> I don't quite understand your comment. The point is the context menus shows
> both actions at all times (provided the protocol supports them) regardless
> of the modifier.

Then I have likely misunderstood the bug report.
Comment 6 Karl Ove Hufthammer 2018-06-12 14:48:37 UTC
(In reply to Eike Hein from comment #4)
> I don't quite understand your comment. The point is the context menus shows
> both actions at all times (provided the protocol supports them) regardless
> of the modifier.

It only does if you have configured your system to show both actions. This is *not* the default, and (curiously) it is only possible to enable this setting from the settings dialogue in *Konqueror* (i.e. not in Dolphin, and not in the System Settings).

This bug is about the behaviour if one uses the default settings. By default, the action shown in the context menu is ‘Move to Trash’. One can then use the ‘Shift’ key to toggle the action between ‘Delete’ and ‘Move to Trash’ in Dolphin and Konqueror, but this doesn’t work for the folder/desktop view.

I’ll attach a video to show how the feature works in Dolphin.
Comment 7 Karl Ove Hufthammer 2018-06-12 14:49:55 UTC
Created attachment 113227 [details]
Video showing the ‘Move to Trash’/‘Delete’ feature in action
Comment 8 Eike Hein 2018-06-13 04:46:04 UTC
Thanks for the follow-up. I'll have another got at it then!
Comment 9 Eike Hein 2018-06-13 07:40:40 UTC
Patch under review: https://phabricator.kde.org/D13508

This will go into 5.12.x and 5.13.x once merged.
Comment 10 Eike Hein 2018-06-13 07:43:15 UTC
> [...] it is only possible to enable this setting from the settings dialogue in *Konqueror* (i.e. not in Dolphin [...]

BTW: I have the "Services" page where you can tick/untick "Delete" in Dolphin here as well.
Comment 11 Eike Hein 2018-06-13 10:50:36 UTC
Git commit 6f3a486330d02cd1feb10969ab56113a09f3e0af by Eike Hein.
Committed on 13/06/2018 at 07:40.
Pushed by hein into branch 'Plasma/5.12'.

Swap Trash for Delete action when only one is enabled and the Shift modifier is pressed

Summary:
Now matches Dolphin behavior.

Reviewers: broulik, davidedmundson, mart

Subscribers: plasma-devel

Tags: #plasma

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

M  +4    -4    containments/desktop/package/contents/ui/FolderView.qml
M  +3    -2    containments/desktop/plugins/folder/foldermodel.cpp
M  +2    -1    containments/desktop/plugins/folder/foldermodel.h

https://commits.kde.org/plasma-desktop/6f3a486330d02cd1feb10969ab56113a09f3e0af
Comment 12 Sasa Dermanovic 2018-10-11 11:10:00 UTC
KDE 5.50.0 / Plasma 5.14.0 and can still reproduce this issue.
Comment 13 Nate Graham 2018-10-11 18:59:34 UTC
Can confirm, it's broken again.
Comment 14 Karl Ove Hufthammer 2018-10-11 19:01:02 UTC
I too can confirm the bug on Plasma 5.14.0.

The action is switched if I hold ‘Shift’ *before* right-clicking on an element, but if I right-click and *then* press ‘Shift’, nothing happens.
Comment 15 Eike Hein 2018-10-11 19:05:48 UTC
This is probably due to the keyboard stuff being generically broken in 5.14, a fix for that just went in for 5.14.1.
Comment 16 Eike Hein 2018-10-11 19:06:23 UTC
(IOW, can't reproduce.)
Comment 17 Nate Graham 2018-10-11 19:36:47 UTC
Thanks for merging it back to master, Eike.

However, building plasma-desktop from source with either master or the Plasma/5.14 branches still doesn't fix this for me with a fairly fresh install of Neon dev unstable. I can indeed reproduce that holsing down Shift *before* opening the context menu makes the correct menu item appear, but that pressing Shift after the menu is already open does not make it dynamically change.
Comment 18 Eike Hein 2018-10-11 19:57:20 UTC
That's correct, but was also the case with 6f3a486330d0. It's not broken again, just not implemented that way.
Comment 19 Nate Graham 2018-10-11 19:58:52 UTC
Oh. Well... it should! :)

Dolphin implements it the way this bug requests, and consistency is good.
Comment 20 Eike Hein 2018-10-11 20:00:30 UTC
Yup, can look into that (maybe only next week and therefore maybe for 5.14.2, though).
Comment 21 Eike Hein 2018-10-24 07:57:13 UTC
Git commit c4285ed1b40714872f002f4fcbb067760c215928 by Eike Hein.
Committed on 24/10/2018 at 07:56.
Pushed by hein into branch 'Plasma/5.14'.

Swap Trash/Delete when Shift is used while the menu is open

Summary:
Matching Dolphin.

Reviewers: ngraham, broulik, davidedmundson

Reviewed By: davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

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

M  +38   -15   containments/desktop/plugins/folder/foldermodel.cpp
M  +2    -0    containments/desktop/plugins/folder/foldermodel.h

https://commits.kde.org/plasma-desktop/c4285ed1b40714872f002f4fcbb067760c215928