From d52e108200e0214e770e9cf151f5b96af5ee41f5 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Thu, 22 Jul 2010 21:05:53 +0200 Subject: Test fixes. --- tests/test-gtk-submenu-server.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/test-gtk-submenu-server.c') diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c index ed9cf79..ba3993e 100644 --- a/tests/test-gtk-submenu-server.c +++ b/tests/test-gtk-submenu-server.c @@ -29,6 +29,16 @@ with this program. If not, see . #include #include +static GMainLoop *mainloop = NULL; + +static gboolean +timer_func (gpointer data) +{ + g_main_loop_quit (mainloop); + + return FALSE; +} + DbusmenuMenuitem * add_item(DbusmenuMenuitem * parent, const char * label) { @@ -76,7 +86,9 @@ main (int argc, char ** argv) add_item(item, "2.2"); add_item(item, "2.3"); - GMainLoop * mainloop = g_main_loop_new(NULL, FALSE); + g_timeout_add_seconds(3, timer_func, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); g_debug("Quiting"); -- cgit v1.2.3