aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-05-19 04:42:50 +0200
committerTed Gould <ted@canonical.com>2009-05-19 04:42:50 +0200
commit0386af8ac00626ace16cd3c882a1bc261a4cc256 (patch)
tree3f1f230e6b13286afa684ae06efcec3cfacd8e33 /tests
parent85ff79a58f531a5173565bbe1b97b5a9c7e4148e (diff)
downloadlibdbusmenu-0386af8ac00626ace16cd3c882a1bc261a4cc256.tar.gz
libdbusmenu-0386af8ac00626ace16cd3c882a1bc261a4cc256.tar.bz2
libdbusmenu-0386af8ac00626ace16cd3c882a1bc261a4cc256.zip
Making it so that the verifcation hapens slightly after the update, as it takes a couple of milliseconds for the properties to trasfer over DBus.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-glib-properties-client.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c
index 145e4fd..4439788 100644
--- a/tests/test-glib-properties-client.c
+++ b/tests/test-glib-properties-client.c
@@ -113,12 +113,20 @@ timer_func (gpointer data)
return FALSE;
}
+static gboolean layout_verify_timer (gpointer data);
+
static void
layout_updated (DbusmenuClient * client, gpointer data)
{
g_debug("Layout Updated");
+ g_timeout_add (250, layout_verify_timer, client);
+ return;
+}
- DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(client);
+static gboolean
+layout_verify_timer (gpointer data)
+{
+ DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(DBUSMENU_CLIENT(data));
proplayout_t * layout = &layouts[layouton];
if (!verify_root_to_layout(menuroot, layout)) {
@@ -127,7 +135,7 @@ layout_updated (DbusmenuClient * client, gpointer data)
} else {
/* Extend our death */
g_source_remove(death_timer);
- death_timer = g_timeout_add_seconds(10, timer_func, client);
+ death_timer = g_timeout_add_seconds(10, timer_func, data);
}
layouton++;
@@ -136,7 +144,7 @@ layout_updated (DbusmenuClient * client, gpointer data)
g_main_loop_quit(mainloop);
}
- return;
+ return FALSE;
}
int