mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +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 (string[0] == '_')
|
||||||
{
|
{
|
||||||
if (gtk_accelerator_parse (string + 1, &keyval, &modifiers))
|
keyval = gdk_keyval_from_name (string + 1);
|
||||||
return gtk_mnemonic_trigger_new (keyval);
|
if (keyval != GDK_KEY_VoidSymbol)
|
||||||
|
return gtk_mnemonic_trigger_new (gdk_keyval_to_lower (keyval));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gtk_accelerator_parse (string, &keyval, &modifiers))
|
if (gtk_accelerator_parse (string, &keyval, &modifiers))
|
||||||
|
Loading…
Reference in New Issue
Block a user