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