mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
Parse keyval name directly for mnemonic triggers
We don't need to parse the full accelerator format for mnemonic triggers.
This commit is contained in:
parent
96ccb25f97
commit
170e8bd605
@ -137,8 +137,9 @@ gtk_shortcut_trigger_parse_string (const char *string)
|
||||
|
||||
if (string[0] == '_')
|
||||
{
|
||||
if (gtk_accelerator_parse (string + 1, &keyval, &modifiers))
|
||||
return gtk_mnemonic_trigger_new (keyval);
|
||||
keyval = gdk_keyval_from_name (string + 1);
|
||||
if (keyval != GDK_KEY_VoidSymbol)
|
||||
return gtk_mnemonic_trigger_new (gdk_keyval_to_lower (keyval));
|
||||
}
|
||||
|
||||
if (gtk_accelerator_parse (string, &keyval, &modifiers))
|
||||
|
Loading…
Reference in New Issue
Block a user