mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
Differentiate keypad keysyms in accelerators
When displaying accelerators, differentiate keypad symbols with a 'KP' prefix. Fixing a 17 year old bug. Update expected output in accelerator tests. Fixes: #227
This commit is contained in:
parent
e4d684b116
commit
c58d9446f4
@ -937,6 +937,13 @@ gtk_accelerator_print_label (GString *gstring,
|
||||
if (seen_mod)
|
||||
append_separator (gstring);
|
||||
|
||||
if (accelerator_key >= GDK_KEY_KP_Space &&
|
||||
accelerator_key <= GDK_KEY_KP_Equal)
|
||||
{
|
||||
g_string_append (gstring, C_("keyboard label", "KP"));
|
||||
g_string_append (gstring, " ");
|
||||
}
|
||||
|
||||
switch (ch)
|
||||
{
|
||||
case ' ':
|
||||
|
@ -87,13 +87,13 @@ accel2 (void)
|
||||
static void
|
||||
accel3 (void)
|
||||
{
|
||||
test_one_accel ("KP_7", 0, GDK_KEY_KP_7, "7", TRUE);
|
||||
test_one_accel ("KP_7", 0, GDK_KEY_KP_7, "KP 7", TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
accel4 (void)
|
||||
{
|
||||
test_one_accel ("<Control>KP_7", GDK_CONTROL_MASK, GDK_KEY_KP_7, "Ctrl+7", TRUE);
|
||||
test_one_accel ("<Control>KP_7", GDK_CONTROL_MASK, GDK_KEY_KP_7, "Ctrl+KP 7", TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user