Bug 439174 - Delete an entry from klipper popup with Delete key
Summary: Delete an entry from klipper popup with Delete key
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard (show other bugs)
Version: 5.21.5
Platform: Manjaro Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-26 09:17 UTC by Corentin Girard
Modified: 2021-08-07 19:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Corentin Girard 2021-06-26 09:17:08 UTC
I use the klipper popup at mouse position and the arrows to navigate through the entries of the history.

Currently, this is not possible to press the Delete key to remove an entry from the history. Although we can do it from the tray popup with the "Remove from history" button.

SOFTWARE/OS VERSIONS
Linux: 5.12.9
KDE Plasma Version: 5.21.5
Comment 1 Podagric 2021-07-05 20:44:10 UTC
This would be very helpful!
An option to clear the entire history would also be welcome.
Comment 2 Nate Graham 2021-07-30 21:01:55 UTC
Good idea!
Comment 3 Nate Graham 2021-08-02 14:40:59 UTC
Working on this.
Comment 4 Bug Janitor Service 2021-08-04 17:31:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/995
Comment 5 Nate Graham 2021-08-06 16:16:41 UTC
Git commit 8416e3de662ee8075e2ffd0c71589ffdecd1f6b3 by Nate Graham.
Committed on 06/08/2021 at 16:15.
Pushed by ngraham into branch 'master'.

[applets/clipboard] Delete items with delete key

Pressing the delete key will now delete the highlighted list item under
any of the following circumstances:

1. A list item is selected and has focus
2. A list item is selected and the search field has focus but it is
   empty or the insertion point is at the end of the string (in either
   case, pressing the delete key would otherwise do nothing)

This allows quickly and easily deleting clipboard items using only the
keyboard, including after using the search field to filter it down.
FIXED-IN: 5.78

M  +3    -0    applets/clipboard/contents/ui/ClipboardItemDelegate.qml
M  +13   -0    applets/clipboard/contents/ui/ClipboardPage.qml

https://invent.kde.org/plasma/plasma-workspace/commit/8416e3de662ee8075e2ffd0c71589ffdecd1f6b3
Comment 6 Corentin Girard 2021-08-07 01:05:19 UTC
Thank you!!! :D
Comment 7 Nate Graham 2021-08-07 04:57:17 UTC
You're very welcome!
Comment 8 popov895 2021-08-07 09:14:43 UTC
Nate, I think what was meant was deleting the entry right in the Klipper popup that appears on the Meta+V hotkey.
Comment 9 Corentin Girard 2021-08-07 10:51:51 UTC
(In reply to popov895 from comment #8)
> Nate, I think what was meant was deleting the entry right in the Klipper
> popup that appears on the Meta+V hotkey.

Oh! Isn't it what Nate did?

Maybe the change he did in `ClipboardItemDelegate.qml` works for the popup and the standard "tray icon page" (which comes with Invoke action and Barcode).

If it's not the case, maybe the file that needs to be changed is `/klipper/klipperpopup.cpp`.

I can't test which was made because I don't know (and prefer not to) build it on my own.
Comment 10 Nate Graham 2021-08-07 19:23:58 UTC
Yes, I implemented this for the applet popup. Oops.

If you want it for the menu that appears under the mouse as well, please file another bug report for that. :)