diff options
author | Ted Gould <ted@gould.cx> | 2010-08-20 16:52:02 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-08-20 16:52:02 -0500 |
commit | b8b16bdfc5f52a306bacaa34776c3d159e16fbc2 (patch) | |
tree | 0f09c1ea4933f0e104663d187d825c5c07fa3ff9 /tests/test-gtk-submenu-server.c | |
parent | 49ff3029a6cc08287e39371f079dc2109a896901 (diff) | |
download | libdbusmenu-b8b16bdfc5f52a306bacaa34776c3d159e16fbc2.tar.gz libdbusmenu-b8b16bdfc5f52a306bacaa34776c3d159e16fbc2.tar.bz2 libdbusmenu-b8b16bdfc5f52a306bacaa34776c3d159e16fbc2.zip |
Showing items as part of the test to ensure we don't break.
Diffstat (limited to 'tests/test-gtk-submenu-server.c')
-rw-r--r-- | tests/test-gtk-submenu-server.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test-gtk-submenu-server.c b/tests/test-gtk-submenu-server.c index ba3993e..11cede0 100644 --- a/tests/test-gtk-submenu-server.c +++ b/tests/test-gtk-submenu-server.c @@ -39,6 +39,17 @@ timer_func (gpointer data) return FALSE; } +static gboolean +show_item (gpointer pmi) +{ + DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(pmi); + g_debug("Showing item"); + + dbusmenu_menuitem_show_to_user(mi, 0); + + return FALSE; +} + DbusmenuMenuitem * add_item(DbusmenuMenuitem * parent, const char * label) { @@ -81,12 +92,16 @@ main (int argc, char ** argv) add_item(item, "1.2"); add_item(item, "1.3"); + g_timeout_add_seconds(2, show_item, item); + item = add_item(root, "Folder 2"); add_item(item, "2.1"); add_item(item, "2.2"); add_item(item, "2.3"); - g_timeout_add_seconds(3, timer_func, NULL); + g_timeout_add_seconds(4, show_item, item); + + g_timeout_add_seconds(6, timer_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); |