diff options
author | Ted Gould <ted@canonical.com> | 2009-10-02 16:31:22 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-02 16:31:22 -0500 |
commit | bc69362aa594cce5507ae1fbe8132576fb22df3e (patch) | |
tree | f92ff07ae143390163f70b88dff16412074b6013 /tests/test-glib-simple-items.c | |
parent | aa94500715e83db9933fabc09f7df188098985b4 (diff) | |
parent | a1b3e6d9400764292ea6f4252e4fa93f98da3c5a (diff) | |
download | libdbusmenu-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.c | 9 |
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); |