aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-05 22:18:28 -0400
committerTed Gould <ted@canonical.com>2009-10-05 22:18:28 -0400
commit6d6d74a630bc7212b506089d4b0cf8f6d6d9ec60 (patch)
tree8d009d9255af1bb5e3d71c5761ca07090912710e /tools
parent6a4bff121edff594b2e8a458fe0ae681ee23efbe (diff)
downloadlibdbusmenu-6d6d74a630bc7212b506089d4b0cf8f6d6d9ec60.tar.gz
libdbusmenu-6d6d74a630bc7212b506089d4b0cf8f6d6d9ec60.tar.bz2
libdbusmenu-6d6d74a630bc7212b506089d4b0cf8f6d6d9ec60.zip
Putting a couple second timeout in to make sure we get all the properties.
Diffstat (limited to 'tools')
-rw-r--r--tools/dbusmenu-dumper.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c
index 9d0d420..3cff162 100644
--- a/tools/dbusmenu-dumper.c
+++ b/tools/dbusmenu-dumper.c
@@ -60,6 +60,19 @@ print_menuitem (DbusmenuMenuitem * item, int depth)
return;
}
+static gboolean
+root_timeout (gpointer data)
+{
+ DbusmenuMenuitem * newroot = DBUSMENU_MENUITEM(data);
+
+ g_print("{\n");
+ print_menuitem(newroot, 2);
+ g_print("\n}\n");
+
+ g_main_quit(mainloop);
+ return FALSE;
+}
+
static void
new_root_cb (DbusmenuClient * client, DbusmenuMenuitem * newroot)
{
@@ -69,11 +82,7 @@ new_root_cb (DbusmenuClient * client, DbusmenuMenuitem * newroot)
return;
}
- g_print("{\n");
- print_menuitem(newroot, 2);
- g_print("\n}\n");
-
- g_main_quit(mainloop);
+ g_timeout_add_seconds(2, root_timeout, newroot);
return;
}