/srv/mercurial-server/detachablepurple: ecead6f33cfb: Fix in the...

Gilles Bedel gillux at cpw.pidgin.im
Fri Jun 15 22:01:33 EDT 2012


Changeset: ecead6f33cfb9ac9d2d94830c08c4db9da0930a8
Author:	 Gilles Bedel <gillux at cpw.pidgin.im>
Date:	 2012-05-12 19:27 +0000
Branch:	 cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/ecead6f33cfb

Description:

Fix in the D-Bus property setter: handle boxed values.

diffstat:

 libpurple/pobject.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff --git a/libpurple/pobject.c b/libpurple/pobject.c
--- a/libpurple/pobject.c
+++ b/libpurple/pobject.c
@@ -464,6 +464,11 @@
 	if (!prop_info)
 		return FALSE;
 
+	/* The GDBusInterfaceVTable setter gives a boxed GVariant. */
+	if (g_variant_is_of_type(prop_value, G_VARIANT_TYPE_VARIANT))
+		prop_value = g_variant_get_variant(prop_value);
+
+	/* Convert this GVariant to a GValue. */
 	g_dbus_gvariant_to_gvalue(prop_value, &gval);
 	g_value_init(&gval2, G_PARAM_SPEC_VALUE_TYPE(pspec));
 	if (G_TYPE_IS_OBJECT(G_PARAM_SPEC_VALUE_TYPE(pspec))



More information about the Commits mailing list