[gnome-control-center] keyboard: Use correct base for unsetting custom shortcuts
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: Use correct base for unsetting custom shortcuts
- Date: Tue, 26 Apr 2011 14:56:45 +0000 (UTC)
commit 15c5d5a96e2785ba8a88938d886cad9c543c88b6
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 26 15:30:31 2011 +0100
keyboard: Use correct base for unsetting custom shortcuts
panels/keyboard/keyboard-shortcuts.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c
index ba90911..a64843b 100644
--- a/panels/keyboard/keyboard-shortcuts.c
+++ b/panels/keyboard/keyboard-shortcuts.c
@@ -928,6 +928,7 @@ remove_custom_shortcut (GtkTreeModel *model, GtkTreeIter *iter)
gchar *base;
CcKeyboardItem *item;
GPtrArray *keys_array;
+ GError *err = NULL;
gtk_tree_model_get (model, iter,
DETAIL_KEYENTRY_COLUMN, &item,
@@ -938,10 +939,15 @@ remove_custom_shortcut (GtkTreeModel *model, GtkTreeIter *iter)
client = gconf_client_get_default ();
- base = g_path_get_dirname (item->gconf_key_dir);
+ base = g_strdup (item->gconf_key_dir);
g_object_unref (item);
- gconf_client_recursive_unset (client, base, 0, NULL);
+ if (gconf_client_recursive_unset (client, base, 0, &err) == FALSE)
+ {
+ g_warning ("Failed to unset GConf directory '%s': %s", base, err->message);
+ g_error_free (err);
+ }
+
g_free (base);
/* suggest sync now so the unset directory actually gets dropped;
* if we don't do this we may end up with 'zombie' shortcuts when
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]