aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-08 15:48:01 -0500
committerTed Gould <ted@gould.cx>2010-06-08 15:48:01 -0500
commit4ea766fce2d289cedcc6f8de8d7b6e0071786703 (patch)
treecb104718b6175b20a844f845e6985838ef361797
parent842ccdb932c28bb57976c70929c817b190001b90 (diff)
downloadlibdbusmenu-4ea766fce2d289cedcc6f8de8d7b6e0071786703.tar.gz
libdbusmenu-4ea766fce2d289cedcc6f8de8d7b6e0071786703.tar.bz2
libdbusmenu-4ea766fce2d289cedcc6f8de8d7b6e0071786703.zip
Some more debugging messages. Cleaning up a bit.
-rw-r--r--tests/test-glib-submenu-client.c23
1 files changed, 16 insertions, 7 deletions
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) {