[gnome-panel] panel: Add helper API to write directly to dconf



commit 317d4a21dd28081a93e955a2e4a94f192231f7c8
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Oct 11 16:35:11 2011 +0200

    panel: Add helper API to write directly to dconf
    
    This will be used for initial setup of panel, for GSettings keys
    applying to a specific path, while we don't really have the schema yet.

 gnome-panel/libpanel-util/panel-dconf.c |   16 ++++++++++++++++
 gnome-panel/libpanel-util/panel-dconf.h |    4 ++++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-dconf.c b/gnome-panel/libpanel-util/panel-dconf.c
index 63a1c48..6d09dd6 100644
--- a/gnome-panel/libpanel-util/panel-dconf.c
+++ b/gnome-panel/libpanel-util/panel-dconf.c
@@ -36,6 +36,22 @@ panel_dconf_client_get (void)
 }
 
 gboolean
+panel_dconf_write_sync (const gchar  *key,
+                        GVariant     *value,
+                        GError      **error)
+{
+        gboolean     ret;
+        DConfClient *client = panel_dconf_client_get ();
+
+        ret = dconf_client_write (client, key, value,
+                                  NULL, NULL, error);
+
+        g_object_unref (client);
+
+        return ret;
+}
+
+gboolean
 panel_dconf_recursive_reset (const gchar  *dir,
                              GError      **error)
 {
diff --git a/gnome-panel/libpanel-util/panel-dconf.h b/gnome-panel/libpanel-util/panel-dconf.h
index 0cf8b35..e4ef1e4 100644
--- a/gnome-panel/libpanel-util/panel-dconf.h
+++ b/gnome-panel/libpanel-util/panel-dconf.h
@@ -29,6 +29,10 @@
 
 G_BEGIN_DECLS
 
+gboolean panel_dconf_write_sync (const gchar  *key,
+                                 GVariant     *value,
+                                 GError      **error);
+
 gboolean panel_dconf_recursive_reset (const gchar  *dir,
                                       GError     **error);
 



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