]> Pileus Git - ~andy/gtk/commit
Bug 663856 - Make option-foo accelerators use the right symbol
authorMichael Natterer <mitch@lanedo.com>
Fri, 18 Nov 2011 11:25:03 +0000 (12:25 +0100)
committerMichael Natterer <mitch@gimp.org>
Fri, 18 Nov 2011 12:06:27 +0000 (13:06 +0100)
commit1c8481a6ea52f34210177f54159d231ea4ba0b7d
tree9583e4b0b6f7453593281f24f69b290c8e68e7c3
parent43dd705308c0c30b573e82cffb67992081c81b7b
Bug 663856 - Make option-foo accelerators use the right symbol

If the keyboard group shifting modifier is *also* a normal
accelerator modifier, we need to special case it when calling
gdk_keymap_translate_keyboard_state(), so we get the right
key symbol for accelerators (for example we want Option-O,
not Option-Ø displayed in menu items). This patch should only
affect quartz where the Alt key both shifts the group and can
be used as accel modifier, and not X11 or Win32 where AltGr
is not used for accelerators.

- fix quartz' gdk_keymap_translate_keyboard_state() to return
  the right consumed_modifiers
- add _gtk_translate_keyboard_accel_state() which does the
  special casing
- use it everywhere instead of gdk_keymap_translate_keyboard_state()
gdk/quartz/gdkkeys-quartz.c
gtk/gtkcellrendereraccel.c
gtk/gtkkeyhash.c
gtk/gtkmenu.c
gtk/gtkprivate.c
gtk/gtkprivate.h