diff options
author | Ted Gould <ted@gould.cx> | 2010-02-12 16:00:22 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-12 16:00:22 -0600 |
commit | 2016dbb8bcacf970d5a4636d922597164cd66704 (patch) | |
tree | ab053dc791a1dadc8297ab17a6c6f8b501a524ca /tests | |
parent | 865f4cb66f4d41b3ee15faf27bd4412c8356d7da (diff) | |
download | libdbusmenu-2016dbb8bcacf970d5a4636d922597164cd66704.tar.gz libdbusmenu-2016dbb8bcacf970d5a4636d922597164cd66704.tar.bz2 libdbusmenu-2016dbb8bcacf970d5a4636d922597164cd66704.zip |
Only changing layouts when they're updated.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-glib-proxy-client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-glib-proxy-client.c b/tests/test-glib-proxy-client.c index 0e52aa4..b37cd61 100644 --- a/tests/test-glib-proxy-client.c +++ b/tests/test-glib-proxy-client.c @@ -26,7 +26,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "test-glib-proxy.h" -static guint layouton = 0; +static guint layouton = -1; static GMainLoop * mainloop = NULL; static gboolean passed = TRUE; static guint death_timer = 0; @@ -114,6 +114,7 @@ static void layout_updated (DbusmenuClient * client, gpointer data) { g_debug("Layout Updated"); + layouton++; g_timeout_add (1500, layout_verify_timer, client); return; } @@ -121,6 +122,7 @@ layout_updated (DbusmenuClient * client, gpointer data) static gboolean layout_verify_timer (gpointer data) { + g_debug("Verifing Layout: %d", layouton); DbusmenuMenuitem * menuroot = dbusmenu_client_get_root(DBUSMENU_CLIENT(data)); proplayout_t * layout = &layouts[layouton]; @@ -133,9 +135,7 @@ layout_verify_timer (gpointer data) death_timer = g_timeout_add_seconds(10, timer_func, data); } - layouton++; - - if (layouts[layouton].id == -1) { + if (layouts[layouton+1].id == -1) { g_main_loop_quit(mainloop); } |