Respect lockdown for keybindings

svn path=/trunk/; revision=9141
This commit is contained in:
Matthias Clasen 2008-11-11 05:14:51 +00:00
parent bf65e99ba7
commit f4efa053da
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-11-11 Matthias Clasen <mclasen@redhat.com>
* 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 <sandmann@redhat.com>

View file

@ -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 */