aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-simple-items.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-02 16:31:22 -0500
committerTed Gould <ted@canonical.com>2009-10-02 16:31:22 -0500
commitbc69362aa594cce5507ae1fbe8132576fb22df3e (patch)
treef92ff07ae143390163f70b88dff16412074b6013 /tests/test-glib-simple-items.c
parentaa94500715e83db9933fabc09f7df188098985b4 (diff)
parenta1b3e6d9400764292ea6f4252e4fa93f98da3c5a (diff)
downloadlibdbusmenu-bc69362aa594cce5507ae1fbe8132576fb22df3e.tar.gz
libdbusmenu-bc69362aa594cce5507ae1fbe8132576fb22df3e.tar.bz2
libdbusmenu-bc69362aa594cce5507ae1fbe8132576fb22df3e.zip
Managing the lifecycle of the menu item more directly and making sure to remove them from the menu when they're not children of it anymore.
Diffstat (limited to 'tests/test-glib-simple-items.c')
-rw-r--r--tests/test-glib-simple-items.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-glib-simple-items.c b/tests/test-glib-simple-items.c
index 56536e9..5b9f538 100644
--- a/tests/test-glib-simple-items.c
+++ b/tests/test-glib-simple-items.c
@@ -25,6 +25,13 @@ dummy_users (DbusmenuMenuitem * root) {
return;
}
+static gboolean
+quititall (gpointer data)
+{
+ g_main_quit(mainloop);
+ return FALSE;
+}
+
int
main (int argc, char ** argv)
{
@@ -37,6 +44,8 @@ main (int argc, char ** argv)
dummy_users(root_menuitem);
+ g_timeout_add_seconds(1, quititall, NULL);
+
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);