[gnome-control-center/gnome-3-8] region: Don't crash if the user disabled IS switch keybindings
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] region: Don't crash if the user disabled IS switch keybindings
- Date: Mon, 13 May 2013 14:19:42 +0000 (UTC)
commit f221132634a262638fe60762091329b6144b8404
Author: Rui Matos <tiagomatos gmail com>
Date: Mon May 13 15:32:18 2013 +0200
region: Don't crash if the user disabled IS switch keybindings
A 0 length string for a keybinding means it is disabled so the whole
adding <Shift> magic to the backward accelerator string is pointless
anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=700176
panels/region/cc-input-options.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/region/cc-input-options.c b/panels/region/cc-input-options.c
index d292593..83528ce 100644
--- a/panels/region/cc-input-options.c
+++ b/panels/region/cc-input-options.c
@@ -90,7 +90,7 @@ update_shortcuts (GtkWidget *options)
next = g_settings_get_strv (settings, "switch-input-source");
previous_shortcut = g_strdup (previous[0]);
- if (!previous_shortcut && next[0])
+ if (!previous_shortcut && next[0] && *next[0])
previous_shortcut = g_strconcat ("<Shift>", next[0], NULL);
update_shortcut_label (priv->previous_source, previous_shortcut);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]