gnome-control-center r9141 - trunk/capplets/keybindings



Author: matthiasc
Date: Tue Nov 11 05:14:51 2008
New Revision: 9141
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9141&view=rev

Log:
Respect lockdown for keybindings


Modified:
   trunk/capplets/keybindings/ChangeLog
   trunk/capplets/keybindings/gnome-keybinding-properties.c

Modified: trunk/capplets/keybindings/gnome-keybinding-properties.c
==============================================================================
--- trunk/capplets/keybindings/gnome-keybinding-properties.c	(original)
+++ trunk/capplets/keybindings/gnome-keybinding-properties.c	Tue Nov 11 05:14:51 2008
@@ -1750,7 +1750,7 @@
   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 @@
   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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]