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 61285 - No way to have change-on-the-fly menus with unmodified accels
No way to have change-on-the-fly menus with unmodified accels
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
1.3.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 52434
Blocks:
 
 
Reported: 2001-09-27 12:06 UTC by Thomas Leonard
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Leonard 2001-09-27 12:06:46 UTC
When a menu item is selected, it is normally possible to bind a key to it
by simply pressing the key.

However, in 1.3.9, it is not possible to bind an unmodified key (eg 'L'
rather than 'Shift+L'), unless a mouse button is held down while binding
the key.

Is this change intentional? It seems rather irritating and very unintuitive.

Maybe there could be an option for this?
Comment 1 Owen Taylor 2001-09-27 16:17:54 UTC
Well, there are two bugs here:

 - There is supposed to be no way to set a keybinding without
   a modiifer at all now, but this may be a problem for
   apps like the GIMP. (Note however, that allowing keybindings
   without accelerators basically makes it impossible to 
   have mnemonics (underlined characters) for accelerated
   keyboard handling.) There 

 - You aren't supposed to be able to set keybindings without
   modifiers even if you have a mouse button down. (gtkmenu.c
   has (event->state) where it should have
   (event->state & gtk_accelerator_get_default_mod_mask ())

Comment 2 Owen Taylor 2001-09-27 16:22:00 UTC
Resolution of this needs to be synchronized with resolutoin
of 52434 which is to set things up so that:
 
 - Menus are locked unless the app has infrastructure to handle them
 - menus are locked unless the user configures things to unlock them
Comment 3 Thomas Leonard 2001-11-26 12:00:00 UTC
OK, 1.3.11 doesn't allow the 'hold button down' trick anymore.
This means that editing the saved menu file is now the only way to set
these short-cuts. *Please* can we have a way to allow unmodified
accelerators on a per-menu basis before 2.0 (maybe a property on the
menu, or a signal to check whether a particular key is allowed?).

Otherwise, we have to override the GtkMenu key event handler, which is
very messy, as it does other stuff too :-(
Comment 4 Owen Taylor 2002-01-30 03:55:05 UTC
I believe what was decided is that we'll
 
 - Turn off changing accels by default
 - If they are on, be very liberal and allow unmodified accels
Comment 5 Thomas Leonard 2002-01-31 12:01:20 UTC
That sounds ideal!

Thanks,
Comment 6 Owen Taylor 2002-02-02 22:54:12 UTC
Sat Feb  2 17:43:00 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_key_press): Allow unmodified
	accelerators, now that accelerator changing can be turned
	off for those who won't expect it. (#61285)