From f4efa053dabb4cbee2c35b325bb6a4b2fdd8237a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 11 Nov 2008 05:14:51 +0000 Subject: [PATCH] Respect lockdown for keybindings svn path=/trunk/; revision=9141 --- capplets/keybindings/ChangeLog | 5 +++++ capplets/keybindings/gnome-keybinding-properties.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/capplets/keybindings/ChangeLog b/capplets/keybindings/ChangeLog index d4b7d1def..12c0f1be2 100644 --- a/capplets/keybindings/ChangeLog +++ b/capplets/keybindings/ChangeLog @@ -1,3 +1,8 @@ +2008-11-11 Matthias Clasen + + * gnome-keybinding-properties.c: Respect the + /desktop/gnome/keybindings/allowed_keys key. + ==================== 2.25.1 ==================== Sun Oct 26 18:06:45 2008 Søren Sandmann diff --git a/capplets/keybindings/gnome-keybinding-properties.c b/capplets/keybindings/gnome-keybinding-properties.c index a337cb201..4b61af53a 100644 --- a/capplets/keybindings/gnome-keybinding-properties.c +++ b/capplets/keybindings/gnome-keybinding-properties.c @@ -1750,7 +1750,7 @@ setup_dialog (GladeXML *dialog) GtkTreeView *treeview = GTK_TREE_VIEW (WID ("shortcut_treeview")); gchar *wm_name; GtkTreeSelection *selection; - GSList *accepted_keys; + GSList *allowed_keys; client = gconf_client_get_default (); @@ -1817,6 +1817,17 @@ setup_dialog (GladeXML *dialog) g_signal_connect (selection, "changed", G_CALLBACK (selection_changed), WID ("remove-button")); + allowed_keys = gconf_client_get_list (client, + GCONF_BINDING_DIR "/allowed_keys", + GCONF_VALUE_STRING, + NULL); + if (allowed_keys != NULL) + { + g_slist_foreach (allowed_keys, (GFunc)g_free, NULL); + g_slist_free (allowed_keys); + gtk_widget_set_sensitive (WID ("add-button"), FALSE); + } + g_object_unref (client); /* setup the custom shortcut dialog */