[metacity/gnome-3-24] Accept an empty string as well as "disabled" for keybindings
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/gnome-3-24] Accept an empty string as well as "disabled" for keybindings
- Date: Fri, 21 Jul 2017 13:17:01 +0000 (UTC)
commit 04f3e5fd98a076b251920e46471f5060f23ea0af
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Fri Nov 20 10:19:03 2009 -0500
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
src/ui/ui.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/ui.c b/src/ui/ui.c
index aeba136..3c13d5e 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -853,7 +853,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);
@@ -903,7 +903,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]