diff options
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/test-gtk-submenu-server.c | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 9f621cb..839305f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,7 +10,6 @@ TESTS = \ test-glib-proxy \ test-glib-simple-items \ test-glib-submenu \ - test-json \ test-gtk-objects-test \ test-gtk-label \ test-gtk-shortcut \ 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 <http://www.gnu.org/licenses/>. #include <libdbusmenu-glib/menuitem.h> #include <libdbusmenu-glib/server.h> +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"); |