gnome-control-center r9215 - trunk/capplets/keybindings
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r9215 - trunk/capplets/keybindings
- Date: Wed, 28 Jan 2009 12:01:15 +0000 (UTC)
Author: hadess
Date: Wed Jan 28 12:01:15 2009
New Revision: 9215
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9215&view=rev
Log:
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
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 Wed Jan 28 12:01:15 2009
@@ -608,7 +608,9 @@
if (description == NULL)
{
- g_warning ("No description for key '%s'", key_string);
+ /* 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 @@
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 @@
edit_custom_shortcut (key);
if (key->command == NULL || key->command[0] == '\0')
- remove_custom_shortcut (model, iter);
+ {
+ remove_custom_shortcut (model, iter);
+ }
else
- gtk_tree_store_set (GTK_TREE_STORE (model), iter,
- KEYENTRY_COLUMN, key, -1);
+ {
+ 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]