summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-04-26 15:20:45 +0100
committerBastien Nocera <hadess@hadess.net>2011-04-26 15:20:45 +0100
commit53f78eec0b1472996cc2fbef4eb19afaf313a184 (patch)
treed6448e6a6a3d897ade00805f1a5d0a83e01cdfd6
parent4320dbfadf163b5555730bcfd843473580376894 (diff)
downloadgnome-control-center-53f78eec0b1472996cc2fbef4eb19afaf313a184.tar.gz
keyboard: Always add the "Custom shortcuts" section
Even if it is empty by default. https://bugzilla.gnome.org/show_bug.cgi?id=648091
-rw-r--r--panels/keyboard/keyboard-shortcuts.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c
index 298200772..ba9091187 100644
--- a/panels/keyboard/keyboard-shortcuts.c
+++ b/panels/keyboard/keyboard-shortcuts.c
@@ -253,7 +253,7 @@ append_section (GtkBuilder *builder,
is_new = TRUE;
}
- for (i = 0; keys_list[i].name != NULL; i++)
+ for (i = 0; keys_list != NULL && keys_list[i].name != NULL; i++)
{
CcKeyboardItem *item;
gboolean ret;
@@ -300,7 +300,7 @@ append_section (GtkBuilder *builder,
}
/* Add the keys to the hash table */
- if (is_new && keys_array->len > 0)
+ if (is_new)
{
static gboolean have_sep = FALSE;
@@ -649,6 +649,10 @@ append_sections_from_gconf (GtkBuilder *builder, const gchar *gconf_path)
g_free (keys[i].name);
}
}
+ else
+ {
+ append_section (builder, _("Custom Shortcuts"), BINDING_GROUP_USER, NULL);
+ }
g_array_free (entries, TRUE);
}