aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-08 11:17:31 -0600
committerTed Gould <ted@gould.cx>2011-02-08 11:17:31 -0600
commit436d5042bbb97d2bec691a655e79875e8a1d7573 (patch)
tree1a646e8dd8b28cb96cc0a6eda11e707bf5b77a99
parent51e83f5cfca82f53478fd783943e2e972492595c (diff)
downloadlibdbusmenu-436d5042bbb97d2bec691a655e79875e8a1d7573.tar.gz
libdbusmenu-436d5042bbb97d2bec691a655e79875e8a1d7573.tar.bz2
libdbusmenu-436d5042bbb97d2bec691a655e79875e8a1d7573.zip
Unbox the variants if they're boxed
-rw-r--r--libdbusmenu-glib/client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index aa0b3f0..cb90789 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1048,7 +1048,12 @@ menuproxy_signal_cb (GDBusProxy * proxy, gchar * sender, gchar * signal, GVarian
GVariant * value;
while (g_variant_iter_next(&properties, "{sv}", &property, &value)) {
- id_prop_update(proxy, id, property, value, client);
+ GVariant * internalvalue = value;
+ if (G_LIKELY(g_variant_is_of_type(value, G_VARIANT_TYPE_VARIANT))) {
+ /* Unboxing if needed */
+ internalvalue = g_variant_get_variant(value);
+ }
+ id_prop_update(proxy, id, property, internalvalue, client);
}
}
} else if (g_strcmp0(signal, "ItemPropertyUpdated") == 0) {