aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-19 15:16:29 -0600
committerTed Gould <ted@gould.cx>2010-02-19 15:16:29 -0600
commit5e7f04b944d0fd52b38697a6bfdf7df0e61aa83a (patch)
treedcd76b8d7545fa52f5bfec5beb7e2229a84686ef /tests
parentfeada06b32e4bcf70a05de8a3669ff07449dc750 (diff)
downloadlibdbusmenu-5e7f04b944d0fd52b38697a6bfdf7df0e61aa83a.tar.gz
libdbusmenu-5e7f04b944d0fd52b38697a6bfdf7df0e61aa83a.tar.bz2
libdbusmenu-5e7f04b944d0fd52b38697a6bfdf7df0e61aa83a.zip
No dummy update
Diffstat (limited to 'tests')
-rw-r--r--tests/test-glib-proxy-server.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c
index 4fa0844..f32b426 100644
--- a/tests/test-glib-proxy-server.c
+++ b/tests/test-glib-proxy-server.c
@@ -79,12 +79,12 @@ timer_func (gpointer data)
return FALSE;
}
-static gboolean
+static void
layout_change (DbusmenuMenuitem * oldroot, guint timestamp, gpointer data)
{
if (layouts[layouton].id == -1) {
g_main_loop_quit(mainloop);
- return FALSE;
+ return;
}
g_debug("Updating to Layout %d", layouton);
@@ -96,10 +96,12 @@ layout_change (DbusmenuMenuitem * oldroot, guint timestamp, gpointer data)
layouton++;
/* Extend our death */
- g_source_remove(death_timer);
- death_timer = g_timeout_add_seconds(2, timer_func, data);
+ if (death_timer != 0) {
+ g_source_remove(death_timer);
+ }
+ death_timer = g_timeout_add_seconds(4, timer_func, data);
- return TRUE;
+ return;
}
int
@@ -126,12 +128,7 @@ main (int argc, char ** argv)
}
server = dbusmenu_server_new("/org/test");
-
- DbusmenuMenuitem * root = dbusmenu_menuitem_new();
- g_signal_connect(G_OBJECT(root), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(layout_change), NULL);
- dbusmenu_server_set_root(server, root);
-
- death_timer = g_timeout_add_seconds(2, timer_func, NULL);
+ layout_change(NULL, 0, NULL);
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);