Bug 313806 - Add an option to enable the <ENTER> key as the "action key" when cropping.
Summary: Add an option to enable the <ENTER> key as the "action key" when cropping.
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: Other (add details in bug description)
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 331504 358322 366580 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-24 06:48 UTC by Martín Cigorraga
Modified: 2017-09-30 17:22 UTC (History)
9 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 Martín Cigorraga 2013-01-24 06:48:37 UTC
Gwenview isn't anymore a simple image viewer of course, it has traveled a long road since it's first release and now it can be classified as a "light" picture editor - no doubt about it.
So, as I find myself using Gwenview more and more of the time for trivial image/photo editing I find too some usability issues.

The most annoying so far is when cropping pictures.
Usually everything goes fine until I -out of a habit- press the <ENTER> key to make the crop effective and... BAM! Instead effectively cropping the image Gwenview jumps to the Browse mode.
This is *really annoying* because:
1. if the directory holding the image contains a _lot_ of stuff then I need to navigate it to find the picture I was trying to crop. Most of the time I end up Ctrl^Quiting the app and clicking the picture again ¬¬
2. the picture I was trying to crop is indeed framed with a beatiful light blue frame... which is totally ineffective because it have absolutely no contrast with the rest of the pictures in the Browse area so, again, trying to find the picture I was about to crop is a mess when one have to navigate through  hundreds of pictures.
3. It would be ok that at least, once in the Browse window, pressing the <ENTER> key takes me back to the image I was about to crop - but that won't happen. Once in the Browser window the focus is changed to the path section so pressing <ENTER> won't do anything until you write down the path of some other place in your system.



Reproducible: Always

Steps to Reproduce:
1. Open a picture.
2. Select the crop tool.
3. Once you have highlighted the crop area press the <ENTER> key.
Actual Results:  
Gwenview will default to the Browse window.

Expected Results:  
I don't know if expected, but what I'm looking for (which by the way I think is a expected behaviour): the crop takes place.

(Once the crop tool is selected the <ENTER> key focus should switch to the Crop button).

If I want to use Gwenview as my everyday picture light editor I need it to be a swift tool - as ACDSee was back on the Windows platform.

From my own experience -as well as some of my buddies- Gwenview should integrate tightly the use of the keyboard to the evertday workflow.
You guys should analyze the way we use a complex tool like Gwenview and set it accordingly to our needs.

Other than this, Gwenview is just perfect.
Comment 1 Benni Hill 2013-01-24 18:39:26 UTC
I agree, using <ENTER> to do the crop would be nice.

> 1. if the directory holding the image contains a _lot_ of stuff then I need to navigate it to find
> the picture I was trying to crop. Most of the time I end up Ctrl^Quiting the app and clicking the picture again .

Which version of gwenview? This should (in theory) be fixed since 4.9.4.

> 2. the picture I was trying to crop is indeed framed with a beatiful light blue frame... which is totally ineffective
> because it have absolutely no contrast with the rest of the pictures in the Browse area so, again, trying to find
> the picture I was about to crop is a mess when one have to navigate through hundreds of pictures.

As a workaround try minimizing and restoring gwenview again.

> 3. It would be ok that at least, once in the Browse window, pressing the <ENTER> key takes me back to the image
> I was about to crop - but that won't happen. Once in the Browser window the focus is changed to the path section
> so pressing <ENTER> won't do anything until you write down the path of some other place in your system.

Probably related to bug 312631. Please try to make the url bar non-editable.
Comment 2 Martín Cigorraga 2013-04-12 22:18:30 UTC
(In reply to comment #1)
> Which version of gwenview? This should (in theory) be fixed since 4.9.4.

Oh, I see I forget to report that.
IIRC I reported this issue when I still was on KDE SC 4.9.4 or .5 - I think the Gwenview version at that time was something like 2.2

Now I'm running KDE SC 4.10.2 with Gwenview using the same versioning scheme, 4.10.2 and still have the same issue.

> > 2. the picture I was trying to crop is indeed framed with a beatiful light blue frame... which is totally ineffective
> > because it have absolutely no contrast with the rest of the pictures in the Browse area so, again, trying to find
> > the picture I was about to crop is a mess when one have to navigate through hundreds of pictures.
> 
> As a workaround try minimizing and restoring gwenview again.
> 
> > 3. It would be ok that at least, once in the Browse window, pressing the <ENTER> key takes me back to the image
> > I was about to crop - but that won't happen. Once in the Browser window the focus is changed to the path section
> > so pressing <ENTER> won't do anything until you write down the path of some other place in your system.
> 
> Probably related to bug 312631. Please try to make the url bar non-editable.

These two workarounds do work, thank you!
Comment 3 richlv 2014-07-24 15:30:05 UTC
this is still a problem in gwenview 4.11.4.

'enter' should just confirm the crop instead of going to the image browsing mode.
Comment 4 Trevor Parsons 2015-10-12 00:15:22 UTC
I'm using 15.08.1, which behaves in the same way, and would be very grateful if it were possible for this suggestion to be implemented.

I write user manuals for software and so take and crop a lot of screenshots!

"Shift-C, adjust crop area with mouse, Enter" is the learnt behaviour for long-time GIMP users like me. It's great that Gwenview has the facility to crop, as it means I don't have to sit out the GIMP's long load time to do such a simple operation. But I'm always falling foul of the unexpected outcome of Enter here!
Comment 5 andydecleyre 2016-09-13 16:55:17 UTC
Hi!

So it's been over three and a half years, and this behavior is *still* insane. Gwenview's been getting new releases, so I don't think it's abandoned. But this seems like a simple fix to an absolutely infuriatingly stupid problem. Please give this issue some love!
Comment 6 Christoph Feck 2016-09-13 18:57:05 UTC
Since Gwenview is part of the KDE Applications collection, it will get releases automatically, even when there is no developer who had time to improve it.

If the fix is simple, you can try creating a patch.
Comment 7 andydecleyre 2016-09-14 17:04:09 UTC
@Christoph

Is Gwenview a dead project? It's hard to tell with Weekend-at-Bernie's style release procedures.

I've been looking through the source, and I've found the crop widget where the crop button is defined, but I don't know where the response to the Enter key comes in. Any tips would be appreciated.

Yes, I believe the fix is simple for someone who knows C++ (and especially this project). I am not one of those people. I will try a few things and see if they work, however, if you can give me a hint about how keypresses are handled, and if there are no active Gwenview developers.
Comment 8 Christoph Feck 2016-09-14 17:55:07 UTC
You can see recent commits to Gwenview at https://quickgit.kde.org/?p=gwenview.git

Regarding the Enter key: It looks like the Crop button is already the default button, but even if the crop "dialog" is active, the Enter key is hijacked by some other widget. So just looking at the crop code will not help.
Comment 9 Christoph Feck 2017-05-12 15:56:03 UTC
*** Bug 358322 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2017-05-12 15:56:26 UTC
*** Bug 331504 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2017-05-12 15:56:37 UTC
*** Bug 366580 has been marked as a duplicate of this bug. ***
Comment 12 Christoph Feck 2017-05-12 16:06:31 UTC
https://phabricator.kde.org/D5824
Comment 13 andydecleyre 2017-05-12 17:36:19 UTC
(In reply to Christoph Feck from comment #12)
> https://phabricator.kde.org/D5824

You're a hero, CF, thank you!
Comment 14 Christoph Feck 2017-06-04 12:52:27 UTC
Git commit f2a611e0c184dc30b66102c51c3bac71653af224 by Christoph Feck.
Committed on 04/06/2017 at 12:49.
Pushed by cfeck into branch 'Applications/17.04'.

Fix Enter and Escape keys in tool dialogs (crop, red eye)

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

M  +0    -1    app/mainwindow.cpp
M  +37   -3    app/viewmainpage.cpp
M  +3    -0    app/viewmainpage.h
M  +19   -0    lib/crop/croptool.cpp
M  +1    -0    lib/crop/croptool.h
M  +19   -0    lib/redeyereduction/redeyereductiontool.cpp
M  +1    -0    lib/redeyereduction/redeyereductiontool.h

https://commits.kde.org/gwenview/f2a611e0c184dc30b66102c51c3bac71653af224
Comment 15 andydecleyre 2017-06-13 16:43:27 UTC
(In reply to Christoph Feck from comment #12)
> https://phabricator.kde.org/D5824

I think you broke escape as a custom shortcut!

First attempt has no visible effect. Second attempt warns of ambiguous configuration, but user-level configuration is not ambiguous.

Full demo: https://streamable.com/l57fu

Should I bother opening a new bug report, or can we squash this quickly, assuming it's down to that commit?
Comment 16 Christoph Feck 2017-06-13 19:20:08 UTC
Indeed I had to remove the default Escape shortcut assignment to allow it to be handlded by the inline dialogs.

Please open a new ticket. Make sure you add a text description of steps needed to reproduce.
Comment 17 andydecleyre 2017-09-30 17:22:00 UTC
I have submitted a report for the bug introduced by the fix for this bug: https://bugs.kde.org/show_bug.cgi?id=385242