cpw.gillux.detachablepurple: 008d9c52: Fixed the GVariant array builder initial...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Sun May 20 13:20:52 EDT 2012


----------------------------------------------------------------------
Revision: 008d9c52b4bcfa1e365df664f0703c696583cf82
Parent:   c1d6a85361ddccc5e1361851344606bb306db4e3
Author:   gillux at soc.pidgin.im
Date:     05/20/12 11:00:49
Branch:   im.pidgin.cpw.gillux.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/008d9c52b4bcfa1e365df664f0703c696583cf82

Changelog: 

Fixed the GVariant array builder initializers.
They are now able to build empty arrays,
because their type is fully defined.

Changes against parent c1d6a85361ddccc5e1361851344606bb306db4e3

  patched  libpurple/dbus/constructor.c

-------------- next part --------------
============================================================
--- libpurple/dbus/constructor.c	91352bed077aba0b8ad442a6735dcde190bec2cc
+++ libpurple/dbus/constructor.c	a1c0043380a4b7fe8a644f32d6def539ed2d09c9
@@ -204,7 +204,7 @@ pack_pobject_properties(PurpleObject *po
 	PurpleObjectClass *pobjclass = PURPLE_OBJECT_GET_CLASS(pobject);
 	GType type;
 
-	g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+	g_variant_builder_init(&builder, (const GVariantType *) "a(sv)");
 
 	/* Step from the most derived type to PurpleObject's direct child
 	 * type and retreive each D-Bus property list. */
@@ -304,7 +304,7 @@ purple_constructor_get_all_accounts(void
 	GList *all = purple_accounts_all();;
 
 	/* Pack every account into an array of accounts. */
-	g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+	g_variant_builder_init(&builder, (const GVariantType *) "a(oa(sv))");
 	while (all) {
 		PurpleAccount *account = all->data;
 		g_variant_builder_add_value(&builder, pack_pobject(account));


More information about the Commits mailing list