diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-10-28 04:02:48 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-10-28 04:02:48 +0000 |
commit | b009366e2177906dac21e94c69cf6f279665ed2f (patch) | |
tree | df156e601853e45162b7940c8a6e4c6ed1e9d8c2 /gtk | |
parent | 2703e420ae9519205cf1b351edcd19b0fd409dd0 (diff) | |
parent | 6cc0552ab8efe0b11f3db21224520dc97db17d9f (diff) | |
download | gtk+-b009366e2177906dac21e94c69cf6f279665ed2f.tar.gz |
Merge branch 'keypad-accels' into 'gtk-3-24'
Differentiate keypad keysyms in accelerators
See merge request GNOME/gtk!5176
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkaccellabel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index 0e2c50bb67..75b27a8726 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -883,6 +883,17 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass, if (seen_mod) g_string_append (gstring, klass->mod_separator); + if (accelerator_key >= GDK_KEY_KP_Space && + accelerator_key <= GDK_KEY_KP_Equal) + { + /* Translators: "KP" means "numeric key pad". This string will + * be used in accelerators such as "Ctrl+Shift+KP 1" in menus, + * and therefore the translation needs to be very short. + */ + g_string_append (gstring, C_("keyboard label", "KP")); + g_string_append (gstring, " "); + } + switch (ch) { case ' ': |