mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
Accept an empty string as well as "disabled" for keybindings
Treat the empty string the same as "disabled" for GConf keybinding keys. gnome-keybinding-properties was changed to write disabled keys as the empty string a year or so ago. https://bugzilla.gnome.org/show_bug.cgi?id=559816
This commit is contained in:
parent
cbac2e7bbb
commit
4d62977c7b
@ -773,7 +773,7 @@ meta_ui_parse_accelerator (const char *accel,
|
||||
*keycode = 0;
|
||||
*mask = 0;
|
||||
|
||||
if (strcmp (accel, "disabled") == 0)
|
||||
if (!accel[0] || strcmp (accel, "disabled") == 0)
|
||||
return TRUE;
|
||||
|
||||
meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
|
||||
@ -860,7 +860,7 @@ meta_ui_parse_modifier (const char *accel,
|
||||
|
||||
*mask = 0;
|
||||
|
||||
if (accel == NULL || strcmp (accel, "disabled") == 0)
|
||||
if (accel == NULL || !accel[0] || strcmp (accel, "disabled") == 0)
|
||||
return TRUE;
|
||||
|
||||
meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
|
||||
|
Loading…
Reference in New Issue
Block a user