diff options
author | Ted Gould <ted@gould.cx> | 2010-11-11 21:25:00 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-11-11 21:25:00 -0600 |
commit | d089c385b260d54d7521c277ebc875a3017d7f96 (patch) | |
tree | b5ecb6be910082ab1de9395f71d3cedb759a60d4 /tests | |
parent | 5a29eceb8e560ce4319924094dcdbc6d157153c8 (diff) | |
download | libayatana-appindicator-d089c385b260d54d7521c277ebc875a3017d7f96.tar.gz libayatana-appindicator-d089c385b260d54d7521c277ebc875a3017d7f96.tar.bz2 libayatana-appindicator-d089c385b260d54d7521c277ebc875a3017d7f96.zip |
Switching to be dbusmenu based instead of GTK menu based
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-libappindicator.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c index 82f3d05..00a8f19 100644 --- a/tests/test-libappindicator.c +++ b/tests/test-libappindicator.c @@ -353,15 +353,26 @@ test_libappindicator_desktop_menu (void) app_indicator_build_menu_from_desktop(ci, SRCDIR "/test-libappindicator.desktop", "Test Program"); - GtkMenu * menu = app_indicator_get_menu(ci); - g_assert(menu != NULL); + GValue serverval = {0}; + g_value_init(&serverval, DBUSMENU_TYPE_SERVER); + g_object_get_property(G_OBJECT(ci), "dbus-menu-server", &serverval); + + DbusmenuServer * server = DBUSMENU_SERVER(g_value_get_object(&serverval)); + g_assert(server != NULL); + + GValue rootval = {0}; + g_value_init(&rootval, DBUSMENU_TYPE_MENUITEM); + g_object_get_property(G_OBJECT(server), DBUSMENU_SERVER_PROP_ROOT_NODE, &rootval); + DbusmenuMenuitem * root = DBUSMENU_MENUITEM(g_value_get_object(&rootval)); + g_assert(root != NULL); - GList * children = gtk_container_get_children(GTK_CONTAINER(menu)); + GList * children = dbusmenu_menuitem_get_children(root); g_assert(children != NULL); g_assert(g_list_length(children) == 3); - g_object_unref(G_OBJECT(ci)); + + g_object_unref(G_OBJECT(ci)); return; } |