Only print warnings for non-custom keybindings, Set the GConf key for the
2009-01-28 Bastien Nocera <hadess@hadess.net> * gnome-keybinding-properties.c (append_keys_to_tree), (edit_custom_shortcut), (update_custom_shortcut): Only print warnings for non-custom keybindings, Set the GConf key for the description when editing existing custom key shortcuts, Avoid warnings when the description for a custom key shortcut is empty svn path=/trunk/; revision=9215
This commit is contained in:
parent
d6169f8cdb
commit
1069e323e8
2 changed files with 26 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2009-01-28 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* gnome-keybinding-properties.c (append_keys_to_tree),
|
||||
(edit_custom_shortcut), (update_custom_shortcut): Only print
|
||||
warnings for non-custom keybindings, Set the GConf key for
|
||||
the description when editing existing custom key shortcuts,
|
||||
Avoid warnings when the description for a custom key shortcut
|
||||
is empty
|
||||
|
||||
2009-01-28 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* gnome-keybinding-properties.c (append_keys_to_tree):
|
||||
|
|
|
@ -608,6 +608,8 @@ append_keys_to_tree (GladeXML *dialog,
|
|||
|
||||
if (description == NULL)
|
||||
{
|
||||
/* Only print a warning for keys that should have a schema */
|
||||
if (keys_list[j].description_name == NULL)
|
||||
g_warning ("No description for key '%s'", key_string);
|
||||
description = g_path_get_basename (key_string);
|
||||
}
|
||||
|
@ -1373,9 +1375,9 @@ edit_custom_shortcut (KeyEntry *key)
|
|||
const gchar *text;
|
||||
gboolean ret;
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (custom_shortcut_name_entry), key->description);
|
||||
gtk_entry_set_text (GTK_ENTRY (custom_shortcut_name_entry), key->description ? key->description : "");
|
||||
gtk_widget_set_sensitive (custom_shortcut_name_entry, key->desc_editable);
|
||||
gtk_entry_set_text (GTK_ENTRY (custom_shortcut_command_entry), key->command);
|
||||
gtk_entry_set_text (GTK_ENTRY (custom_shortcut_command_entry), key->command ? key->command : "");
|
||||
gtk_widget_set_sensitive (custom_shortcut_command_entry, key->cmd_editable);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (custom_shortcut_dialog));
|
||||
|
@ -1456,10 +1458,19 @@ update_custom_shortcut (GtkTreeModel *model, GtkTreeIter *iter)
|
|||
|
||||
edit_custom_shortcut (key);
|
||||
if (key->command == NULL || key->command[0] == '\0')
|
||||
{
|
||||
remove_custom_shortcut (model, iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
GConfClient *client;
|
||||
|
||||
gtk_tree_store_set (GTK_TREE_STORE (model), iter,
|
||||
KEYENTRY_COLUMN, key, -1);
|
||||
client = gconf_client_get_default ();
|
||||
gconf_client_set_string (client, key->desc_gconf_key, key->description, NULL);
|
||||
g_object_unref (client);
|
||||
}
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue