Bug 385242 - Custom shortcut ESC can ostensibly be set, but will not work
Summary: Custom shortcut ESC can ostensibly be set, but will not work
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Unclassified
Component: general (show other bugs)
Version: 17.04.2
Platform: Archlinux Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 422606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-30 17:20 UTC by andydecleyre
Modified: 2020-07-01 15:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE Applications 18.04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andydecleyre 2017-09-30 17:20:34 UTC
To Reproduce:

1. Open Gwenview
2. Set an alternate shortcut for Quitting the app to ESC; apply
3. Hit ESC
4. Hit ESC
5. Check for ambiguous shortcut settings

What Happens:

After step 3, nothing happens. After step 4, a dialog states

"The key sequence 'Esc' is ambiguous. Use 'Configure Shortcuts'
from the 'Settings' menu to solve the ambiguity.
No action will be triggered."

After step 5, no ambiguous shortcuts are discovered.

This bug was introduced in the commit linked below, which was intended to address an unrelated issue.

What Should Happen:

After step 3, Gwenview should be closed.

Related Links:

https://bugs.kde.org/show_bug.cgi?id=313806
https://phabricator.kde.org/D5824
https://commits.kde.org/gwenview/f2a611e0c184dc30b66102c51c3bac71653af224
https://streamable.com/l57fu
https://bugs.kde.org/show_bug.cgi?id=163410
Comment 1 andydecleyre 2018-01-14 03:56:52 UTC
No change as far as 17.12.1. I am disappointed that the unrelated fix that introduced this bug was accepted, as I quit gwenview more often than I crop.
Comment 2 Nate Graham 2018-01-17 16:50:07 UTC
Then you might be heartened to hear that a recent KDE contributor has proposed a patch to fix this: https://phabricator.kde.org/D9943

KDE is mostly sustained by volunteers, like me and the fellow who's trying to fix this issue. And in the future, perhaps you too? ;)

https://community.kde.org/Get_Involved#Ways_to_contribute
Comment 3 andydecleyre 2018-01-17 18:03:20 UTC
Thank you, that's great news. I'll be a code contributor if/when Python or Kotlin becomes a first class tool in the KDE ecosystem and/or PUCK or some other sane alternative to QML is available.

I wish I could work directly on KDE and Plasma.
Comment 4 Nate Graham 2018-01-17 18:34:05 UTC
I'd never written a line of C++ or QML in my life before I decided to dive in. They're not so bad, really. Choice of language won't hold you back with sufficient motivation! I programmed in Perl for 7 years...
Comment 5 Peter Mühlenpfordt 2018-01-22 09:30:18 UTC
Git commit 5bcb8cc92d3774263fe9c24cf9cbbf64da22b2f6 by Peter Mühlenpfordt.
Committed on 22/01/2018 at 09:30.
Pushed by muhlenpfordt into branch 'master'.

Add browse mode action to action collection again

Summary:
The browse mode action with default shortcut {nav Esc} is not added to action collection (removed in D5824) and therefore not visible/changeable in {nav Settings > Configure Shortcuts}.
Using {nav Esc} as shortcut for e.g. Quit does not work.
This patch re-adds the browse mode action to action collection, but also checks for `ShortcutOverride` events to handle active tool dialogs.

Test Plan:
1. Open gwenview
2. Set alternate shortcut {nav Esc} in {nav Settings -> Configure Shortcuts} for Quit command
3. Press {nav Esc}
-> Should exit gwenview

If tool dialog (crop, red eye reduction) is active, pressing {nav Esc} should not exit gwenview, but the tool dialog first.

Reviewers: cfeck, rkflx, ngraham

Reviewed By: rkflx, ngraham

Subscribers: ngraham

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

M  +1    -0    app/mainwindow.cpp
M  +19   -13   app/viewmainpage.cpp
M  +3    -1    app/viewmainpage.h

https://commits.kde.org/gwenview/5bcb8cc92d3774263fe9c24cf9cbbf64da22b2f6
Comment 6 andydecleyre 2018-02-18 02:28:35 UTC
Is the fix slated for any particular version?
Comment 7 Christoph Feck 2018-02-18 02:34:37 UTC
Yes, see the 'Version Fixed In:' field on this page.
Comment 8 andydecleyre 2018-02-18 02:36:20 UTC
Thank you for adding that just now!
Comment 9 Christoph Feck 2020-07-01 15:21:14 UTC
*** Bug 422606 has been marked as a duplicate of this bug. ***