diff options
author | Ted Gould <ted@gould.cx> | 2011-01-27 14:19:46 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-27 14:19:46 -0600 |
commit | 2a91021522eb038b3aa18f2532ac289b921c9a48 (patch) | |
tree | e196e319299579a539bcdcc439b180dea0d327a2 /libdbusmenu-glib/server.c | |
parent | 3354af7e467e14415756fc3e640b5c027af5ebde (diff) | |
parent | 35265154f7d70dc31837ff8fe4e45a810c393c2b (diff) | |
download | libdbusmenu-2a91021522eb038b3aa18f2532ac289b921c9a48.tar.gz libdbusmenu-2a91021522eb038b3aa18f2532ac289b921c9a48.tar.bz2 libdbusmenu-2a91021522eb038b3aa18f2532ac289b921c9a48.zip |
Import upstream version 0.3.94
Diffstat (limited to 'libdbusmenu-glib/server.c')
-rw-r--r-- | libdbusmenu-glib/server.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 095f333..adb9f91 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -975,11 +975,17 @@ serialize_menuitem(gpointer data, gpointer user_data) { DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(data); GVariantBuilder * builder = (GVariantBuilder *)(user_data); + GVariantBuilder tuple; + + g_variant_builder_init(&tuple, G_VARIANT_TYPE_TUPLE); gint id = dbusmenu_menuitem_get_id(mi); + g_variant_builder_add_value(&tuple, g_variant_new_int32(id)); + GVariant * props = dbusmenu_menuitem_properties_variant(mi); + g_variant_builder_add_value(&tuple, props); - g_variant_builder_add(builder, "ia{sv}", id, props); + g_variant_builder_add_value(builder, g_variant_builder_end(&tuple)); return; } @@ -1020,7 +1026,8 @@ bus_get_children (DbusmenuServer * server, GVariant * params, GDBusMethodInvocat g_list_foreach(children, serialize_menuitem, &builder); - ret = g_variant_new("(a(ia{svg}))", g_variant_builder_end(&builder)); + GVariant * end = g_variant_builder_end(&builder); + ret = g_variant_new_tuple(&end, 1); } else { GError * error = NULL; ret = g_variant_parse(g_variant_type_new("(a(ia{sv}))"), "([(0, {})],)", NULL, NULL, &error); |