From 6d6d74a630bc7212b506089d4b0cf8f6d6d9ec60 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 5 Oct 2009 22:18:28 -0400 Subject: Putting a couple second timeout in to make sure we get all the properties. --- tools/dbusmenu-dumper.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'tools') 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; } -- cgit v1.2.3