[dconf] GDBus porting fixups
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] GDBus porting fixups
- Date: Tue, 18 May 2010 20:22:11 +0000 (UTC)
commit 3ff27b0f836468e5c160a6b47a963d51416f45ad
Author: Ryan Lortie <desrt desrt ca>
Date: Tue May 18 16:17:31 2010 -0400
GDBus porting fixups
- fix signal emission
- adapt the backend code to deal with the fact that we are
using GVariant* containing 'variant' now.
gsettings/dconfdatabase.c | 10 ++++++++--
service/dconf-rebuilder.c | 8 +++++++-
2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/gsettings/dconfdatabase.c b/gsettings/dconfdatabase.c
index fcd2ba6..44ce35a 100644
--- a/gsettings/dconfdatabase.c
+++ b/gsettings/dconfdatabase.c
@@ -266,6 +266,7 @@ dconf_database_incoming_signal (DConfDatabase *database,
{
const gchar **keys;
const gchar *name;
+ gboolean is_path;
guint64 serial;
if (strcmp (g_dbus_message_get_interface (message),
@@ -276,6 +277,8 @@ dconf_database_incoming_signal (DConfDatabase *database,
g_variant_get (g_dbus_message_get_body (message),
"(t&s^a&s)", &serial, &name, &keys);
+ is_path = g_str_has_suffix (name, "/");
+
if (serial != database->anti_expose)
{
GSList *node;
@@ -283,9 +286,12 @@ dconf_database_incoming_signal (DConfDatabase *database,
if (keys[0] == NULL)
{
for (node = database->backends; node; node = node->next)
- g_settings_backend_changed (node->data, name, NULL);
+ if (is_path)
+ g_settings_backend_path_changed (node->data, name, NULL);
+ else
+ g_settings_backend_changed (node->data, name, NULL);
}
- else
+ else if (is_path)
{
for (node = database->backends; node; node = node->next)
g_settings_backend_keys_changed (node->data, name, keys, NULL);
diff --git a/service/dconf-rebuilder.c b/service/dconf-rebuilder.c
index e9a8923..4bcad6b 100644
--- a/service/dconf-rebuilder.c
+++ b/service/dconf-rebuilder.c
@@ -74,6 +74,7 @@ dconf_rebuilder_insert (GHashTable *table,
const gchar *key,
GVariant *value)
{
+ GVariant *ouch;
GvdbItem *item;
gchar *mykey;
gint length;
@@ -88,7 +89,12 @@ dconf_rebuilder_insert (GHashTable *table,
gvdb_item_set_parent (item,
dconf_rebuilder_get_parent (table, mykey, length));
- gvdb_item_set_value (item, value);
+ ouch = g_variant_get_variant (value);
+ gvdb_item_set_value (item, ouch);
+ g_variant_unref (ouch);
+
+ g_variant_ref_sink (value);
+ g_variant_unref (value);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]