[glib/gsettings] GSettings: make writes more granular



commit 6d51a8f33355e98d4bbe2aeffc1d7d2ac8f26f1a
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Oct 5 13:27:31 2009 -0400

    GSettings: make writes more granular
    
    avoid sending notifications to people who don't care

 gio/gsettings.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 1663371..bc46249 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -567,8 +567,9 @@ g_settings_set_value (GSettings   *settings,
 
   tree = g_settings_backend_create_tree ();
   path = g_strconcat (settings->priv->base_path, key, NULL);
-  g_tree_insert (tree, path, g_variant_ref_sink (value));
-  g_settings_backend_write (settings->priv->backend, "", tree, NULL);
+  g_tree_insert (tree, g_strdup (""), g_variant_ref_sink (value));
+  g_settings_backend_write (settings->priv->backend, path, tree, NULL);
+  g_free (path);
 }
 
 void



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