From 0386af8ac00626ace16cd3c882a1bc261a4cc256 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 19 May 2009 04:42:50 +0200 Subject: 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. --- tests/test-glib-properties-client.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3