Merge lp:~pitti/libdbusmenu/fix-dbusmenu-dumper into lp:libdbusmenu/0.5

Proposed by Martin Pitt
Status: Merged
Merged at revision: 210
Proposed branch: lp:~pitti/libdbusmenu/fix-dbusmenu-dumper
Merge into: lp:libdbusmenu/0.5
Diff against target: 26 lines (+4/-2)
1 file modified
tools/dbusmenu-dumper.c (+4/-2)
To merge this branch: bzr merge lp:~pitti/libdbusmenu/fix-dbusmenu-dumper
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+49992@code.launchpad.net

Description of the change

This fixes tools/dbusmenu-dumper to actually work. A GDBus call needs a tuple GVariant for the arguments, not a single argument. Also, the return value is always a tuple; a gvariant is always just one object, i. e. "so" is not a valid signature, but "(so)" is.

Now it works fine for me.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

  review approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/dbusmenu-dumper.c'
2--- tools/dbusmenu-dumper.c 2011-01-13 15:53:15 +0000
3+++ tools/dbusmenu-dumper.c 2011-02-16 19:40:41 +0000
4@@ -270,10 +270,12 @@
5
6 error = NULL;
7 GVariant * retval;
8+ GVariant * args[1];
9+ args[0] = g_variant_new("u", window);
10
11 retval = g_dbus_proxy_call_sync(proxy,
12 "GetMenuForWindow",
13- g_variant_new("u", window),
14+ g_variant_new_tuple(args, 1),
15 G_DBUS_CALL_FLAGS_NONE,
16 -1,
17 NULL,
18@@ -285,7 +287,7 @@
19 return FALSE;
20 }
21
22- g_variant_get(retval, "so", &dbusname, &dbusobject);
23+ g_variant_get(retval, "(so)", &dbusname, &dbusobject);
24
25 g_variant_unref(retval);
26 g_object_unref(proxy);

Subscribers

People subscribed via source and target branches