After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728121 - Mismatched GAction and GtkAction accelerators after changing shortcuts
Mismatched GAction and GtkAction accelerators after changing shortcuts
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: Keybindings
3.12.x
Other Linux
: Normal minor
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 705078 727134 728543 728844 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-13 15:53 UTC by Tomas M.
Modified: 2014-04-29 15:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
accels: Consolidate code to edit and clear shortcuts (2.53 KB, patch)
2014-04-14 11:44 UTC, Debarshi Ray
committed Details | Review
window: Workaround mismatch in GAction and GtkAction accelerators (5.44 KB, patch)
2014-04-14 13:36 UTC, Debarshi Ray
committed Details | Review

Description Tomas M. 2014-04-13 15:53:00 UTC
i use the F1 key binding for something else with screen.

up to 3.10.x i disabled the keybinding for help in preferences / shortcuts.

in 3.12. i have set to disabled the keybinding but it is not honored (i get the help screen anyway).

steps to reproduce:
1. open gnome-terminal
2. go to preferences / keyboard shortcuts.
3. select the help shortcut. disable it by pressing backspace.
4. press F1. help opens.

expected behaviour:
the F1 keycode is sent to the running program (in this case: screen).

i even created a new binding just in case some default somewhere else was overriding: ALT-F1 for example. F1 would open the help screen for gnome-terminal.

distribution: archlinux.
Comment 1 Debarshi Ray 2014-04-14 09:21:23 UTC
My first guess is that this was caused by:

commit a319aeb66f36e728af1b4929ddd69574df838702
Author: Christian Persch <chpe@gnome.org>
Date:   Sun May 12 22:26:03 2013 +0200

    accels: Port accelerators to use GtkApplication
    
    Add GActions for the window actions, and use these as targets for the
    accelerators.
    
    Conflicts:
        src/terminal-accels.c
        src/terminal-window.c
Comment 2 Debarshi Ray 2014-04-14 11:44:33 UTC
Created attachment 274258 [details] [review]
accels: Consolidate code to edit and clear shortcuts
Comment 3 Debarshi Ray 2014-04-14 12:23:31 UTC
This is not specific to the help key. This is a mismatch between the GAction accelerators and the GtkAction accelerators. eg., the zoom in/out keys have the same problem.
Comment 4 Tomas M. 2014-04-14 13:31:28 UTC
Does this patch require testing? or is it verified and was posted for information only ? 

there are no instructions given.
Comment 5 Debarshi Ray 2014-04-14 13:36:26 UTC
Created attachment 274268 [details] [review]
window: Workaround mismatch in GAction and GtkAction accelerators
Comment 6 Debarshi Ray 2014-04-14 13:56:25 UTC
Comment on attachment 274268 [details] [review]
window: Workaround mismatch in GAction and GtkAction accelerators

Thanks for the review!
Comment 7 Egmont Koblinger 2014-04-14 15:37:19 UTC
Dupe of bug 727134?
Comment 8 Debarshi Ray 2014-04-14 16:16:56 UTC
(In reply to comment #7)
> Dupe of bug 727134?

Yes. Sorry for stepping on your toes, Egmont. I had not noticed the earlier bug and I just saw this one come in yesterday.
Comment 9 Debarshi Ray 2014-04-14 16:17:01 UTC
*** Bug 727134 has been marked as a duplicate of this bug. ***
Comment 10 Debarshi Ray 2014-04-14 16:17:54 UTC
(In reply to comment #7)
> Dupe of bug 727134?

Yes. Sorry for stepping on your toes, Egmont. I had not noticed the earlier bug and I just saw this one come in yesterday.
Comment 11 Tomas M. 2014-04-14 21:45:46 UTC
proposed patches fix the issue for me.

...but you already know that ;)
Comment 12 Debarshi Ray 2014-04-15 07:27:24 UTC
Thanks for testing, Tomas.
Comment 13 Debarshi Ray 2014-04-16 09:30:35 UTC
Review of attachment 274258 [details] [review]:

chpe OKed this in #vte on GIMPNet:

14:11 <rishi> chpe: Have you seen the 2nd patch on bug 728121 ? It combines 2   
      almost identical functions into one.
15:49 <chpe> rishi: that one's ok to commit too :-)
Comment 14 Egmont Koblinger 2014-04-16 16:46:14 UTC
Debarshi: Thanks for your worn on this.

A noticable regression compared to pre-3.12 is that the accel keys don't show up in the menu. Could you please address that too (or at least file a new bug)?

(I'm testing with gnome-3-12 branch, sorry if it's already fixed on master.)
Comment 15 Christian Persch 2014-04-19 06:47:18 UTC
That's expected since they were removed from the menu with the patch. Keeping them in the menu would be more work, since you'd have to synchronise the accel path enabled/disabled state between the gtkaccelerator based accel paths and the gtkuimanager accel paths.
Comment 16 Debarshi Ray 2014-04-19 11:50:14 UTC
(In reply to comment #14)

> A noticable regression compared to pre-3.12 is that the accel keys don't show
> up in the menu. Could you please address that too (or at least file a new bug)?
> 
> (I'm testing with gnome-3-12 branch, sorry if it's already fixed on master.)

As chpe says. I explained this in the commit message:

"Workaround mismatch in GAction and GtkAction accelerators

... by removing the ones in GtkActionEntry's. As a consequence of this
the accelerators will not show up in the menu, but on the positive side
changing a shortcut will actually make the old one go away.

This should all be nice and dandy when use GMenu in the future."
Comment 17 Egmont Koblinger 2014-04-19 12:12:52 UTC
I don't know anything about GAction, GtkAction, GMenu, gtkaccelerator, gtkuimanager and things like these... but I know that using any such technical term in reasoning why a user-facing feature broke is just plain wrong approach. I mean, the overall goal of development is out users, and not the simplicity/beauty of the code, right?

The hotkeys really should be there in the menu.

It used to work, then broke. What was the point of refactoring? Why not just revert the broken patch?

IMO you shouldn't just commit a fix with a known regression and mark as fixed and pretend everything's okay. Could you please at least file a bug report for the new issue (in case reverting or fixing is not feasible right away)? Thanks!
Comment 18 Christian Persch 2014-04-24 16:12:47 UTC
*** Bug 728844 has been marked as a duplicate of this bug. ***
Comment 19 Christian Persch 2014-04-25 11:06:15 UTC
Should be fixed now, please test with git master.
Comment 20 Christian Persch 2014-04-27 07:35:49 UTC
*** Bug 728543 has been marked as a duplicate of this bug. ***
Comment 21 Egmont Koblinger 2014-04-27 17:19:10 UTC
Reopening. The menu shortcuts are shown correctly on g-t startup. If you change them, though, you have to quit and restart g-t for them to be updated. They should be updated immediately. (Tested with git master.)
Comment 22 Christian Persch 2014-04-27 18:09:32 UTC
Hmm. That works here...
Comment 23 Egmont Koblinger 2014-04-27 18:26:32 UTC
Okay, I just figured out:

Works as expected with old-fashioned menu.

Doesn't work (but I'm quite sure it used to work) with Ubuntu's Unity menu in the desktop's upper row (--enable-distro-packaging).
Comment 24 Egmont Koblinger 2014-04-27 18:52:13 UTC
Sorry, I was wrong, a319aeb^ (before refactoring started) still produces this behavior. It could be that g-t does something a bit incorrectly which triggers this bug, but it's way more likely that simply Ubuntu's stuff is broken.
Comment 25 Christian Persch 2014-04-29 15:32:27 UTC
*** Bug 705078 has been marked as a duplicate of this bug. ***