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 552318 - menubar mnemonics consumed even when gtk-enable-mnemonics=false
menubar mnemonics consumed even when gtk-enable-mnemonics=false
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.14.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 557084 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-15 08:03 UTC by Andreas Moog
Modified: 2008-10-20 14:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
testcase.c (2.42 KB, text/plain)
2008-10-13 14:36 UTC, Christian Persch
  Details
a patch (1.93 KB, patch)
2008-10-13 19:43 UTC, Matthias Clasen
committed Details | Review

Description Andreas Moog 2008-09-15 08:03:10 UTC
Please describe the problem:
I went to Edit->Keyboard Shortcuts in gnome-terminal to configure alternate keyboard shortcuts using Alt instead of Ctrl, but not all shortcuts work. The shortcut editor allows me to configure the shortcut and the new shortcut appears in the menus, but shortcuts for alt+t (new tab) and alt+v (paste), do not work. The other custom-configured shortcuts do work - alt+n (new window), alt+w (close tab), alt+c (copy), and alt+q (close window) do work as expected.

I had to disable the alt-key menu-access option to allow me to create the shortcuts in the first place. After they were created, I left alt-key menu-access unchecked, and it still didn't work.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
This was reported on Launchpad:
https://bugs.launchpad.net/bugs/268012
Comment 1 bigdan 2008-10-13 14:16:12 UTC
I can verify this and it is causing me great pain. The fact that some short cuts work, and others do not is absurd. I can't find any reason why alt-v would stop working, and can confirm it has worked for at least since at least 2002 or so - now it's regressed.
Comment 2 Christian Persch 2008-10-13 14:35:47 UTC
This appears to be either a gtk+ bug, or by design. Moving to gtk+ for consideration.

What happens is that even if the gtk-enable-mnemonics setting is FALSE, the mnemonics of menubar items are catched (they don't activate the menu, but they're consumed).

Attached testcase reproduces the behaviour.

Steps:
0) Compile & run testcase
1) Press Alt-E
2) Press Alt-F
3) Dismiss menu and toggle the "Show mnemonics" checkbutton off
4) Press Alt-F

Results:
In step 1, the console prints "Action Item2 activated" showing that the mnemonic Alt-E works.
In step 4, nothing is printed, showing that the Alt-F mnemonic is still consumed by the menu even though the mnemonics are not shown.
Comment 3 Christian Persch 2008-10-13 14:36:20 UTC
Created attachment 120507 [details]
testcase.c
Comment 4 Matthias Clasen 2008-10-13 19:43:45 UTC
Created attachment 120526 [details] [review]
a patch

Here is a patch that might do the right thing.
Comment 5 Christian Persch 2008-10-13 20:09:57 UTC
Yes, that looks right. It fixes the testcase as well as the original problem in gnome-terminal in my testing.
Comment 6 Matthias Clasen 2008-10-14 02:03:57 UTC
2008-10-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 552318 – menubar mnemonics consumed even when
        gtk-enable-mnemonics=false

        * gtk/gtkwindow.c (gtk_window_activate_key): Don't let mnemonic
        entries block accelerator activation when gtk-enable-mnemonics is
        FALSE. Problem reported by Andreas Moog.
Comment 7 Christian Persch 2008-10-20 14:04:33 UTC
*** Bug 557084 has been marked as a duplicate of this bug. ***