keyboard: Honor immutable command/name in custom commands

If the gsettings key for the command or name of a custom shortcut is not
writable, the keyboard panel still lets you edit them. This commits
makes the corresponding widgets unsensitive when the gsettings key is
not writable.

https://bugzilla.gnome.org/show_bug.cgi?id=749381
This commit is contained in:
Christophe Fergeau 2015-05-14 16:12:03 +02:00
parent 4257d8723d
commit 5f7ee29a44

View file

@ -986,6 +986,10 @@ edit_custom_shortcut (CcKeyboardItem *item)
g_settings_delay (settings);
gtk_widget_set_sensitive (custom_shortcut_name_entry,
item->desc_editable);
gtk_widget_set_sensitive (custom_shortcut_command_entry,
item->cmd_editable);
gtk_window_present (GTK_WINDOW (custom_shortcut_dialog));
result = gtk_dialog_run (GTK_DIALOG (custom_shortcut_dialog));
switch (result)