From 4ea766fce2d289cedcc6f8de8d7b6e0071786703 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 8 Jun 2010 15:48:01 -0500 Subject: Some more debugging messages. Cleaning up a bit. --- tests/test-glib-submenu-client.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'tests/test-glib-submenu-client.c') diff --git a/tests/test-glib-submenu-client.c b/tests/test-glib-submenu-client.c index d4f498e..57762cd 100644 --- a/tests/test-glib-submenu-client.c +++ b/tests/test-glib-submenu-client.c @@ -34,6 +34,8 @@ static void realization (DbusmenuMenuitem * mi) { const gchar * value; + gboolean original = passed; + value = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY); if (layouton % 2 == 0) { @@ -45,6 +47,11 @@ realization (DbusmenuMenuitem * mi) passed = FALSE; } } + + if (original != passed) { + g_debug("Oops, this is where we failed"); + } + return; } @@ -54,19 +61,21 @@ layout_updated (DbusmenuClient * client, gpointer data) g_debug("Layout Updated"); DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(client); - + if (menuroot == NULL) { + g_debug("Root is NULL?"); + return; + } GList * children = dbusmenu_menuitem_get_children(menuroot); if (children == NULL) { + g_debug("No Children on root -- fail"); passed = FALSE; - goto exit; - } - - for (; children != NULL; children = g_list_next(children)) { - g_signal_connect(G_OBJECT(children->data), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(realization), NULL); + } else { + for (; children != NULL; children = g_list_next(children)) { + g_signal_connect(G_OBJECT(children->data), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(realization), NULL); + } } -exit: layouton++; if (layouts[layouton].id == -1) { -- cgit v1.2.3