97b0323
From 599f25e51d967febddb4de3aa21db4258356a9f9 Mon Sep 17 00:00:00 2001
97b0323
From: Owen W. Taylor <otaylor@fishsoup.net>
97b0323
Date: Fri, 20 Nov 2009 10:19:03 -0500
97b0323
Subject: [PATCH] Accept an empty string as well as "disabled" for keybindings
97b0323
97b0323
Treat the empty string the same as "disabled" for GConf keybinding
97b0323
keys. gnome-keybinding-properties was changed to write disabled
97b0323
keys as the empty string a year or so ago.
97b0323
97b0323
https://bugzilla.gnome.org/show_bug.cgi?id=559816
97b0323
---
97b0323
 src/ui/ui.c |    4 ++--
97b0323
 1 files changed, 2 insertions(+), 2 deletions(-)
97b0323
97b0323
diff --git a/src/ui/ui.c b/src/ui/ui.c
97b0323
index 6df289f..1e68df0 100644
97b0323
--- a/src/ui/ui.c
97b0323
+++ b/src/ui/ui.c
97b0323
@@ -765,7 +765,7 @@ meta_ui_parse_accelerator (const char          *accel,
97b0323
   *keycode = 0;
97b0323
   *mask = 0;
97b0323
 
97b0323
-  if (strcmp (accel, "disabled") == 0)
97b0323
+  if (!accel[0] || strcmp (accel, "disabled") == 0)
97b0323
     return TRUE;
97b0323
   
97b0323
   meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
97b0323
@@ -852,7 +852,7 @@ meta_ui_parse_modifier (const char          *accel,
97b0323
   
97b0323
   *mask = 0;
97b0323
 
97b0323
-  if (accel == NULL || strcmp (accel, "disabled") == 0)
97b0323
+  if (accel == NULL || !accel[0] || strcmp (accel, "disabled") == 0)
97b0323
     return TRUE;
97b0323
   
97b0323
   meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
97b0323
-- 
97b0323
1.6.5.2
97b0323