diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-12-19 15:35:18 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-12-19 15:35:18 +0000 |
commit | f6b60f14c68216d8db69b30da26f3f2bee6a7675 (patch) | |
tree | c3d5d376a16813eae6072484a49a855288da323d | |
parent | a1318f04870c5a1a07d386e4a5b336b846d701d3 (diff) | |
parent | b2d4deb6ed08dfb32db88d93ff4bf841eb7751e0 (diff) | |
download | libayatana-indicator-f6b60f14c68216d8db69b30da26f3f2bee6a7675.tar.gz libayatana-indicator-f6b60f14c68216d8db69b30da26f3f2bee6a7675.tar.bz2 libayatana-indicator-f6b60f14c68216d8db69b30da26f3f2bee6a7675.zip |
Don't treat deprecation warnings as errors and fix indicator-ng test for gtk 3.10. Fixes: https://bugs.launchpad.net/bugs/1262626.
Approved by PS Jenkins bot, Ted Gould.
-rw-r--r-- | libindicator/Makefile.am | 2 | ||||
-rw-r--r-- | tests/test-indicator-ng.c | 28 |
2 files changed, 28 insertions, 2 deletions
diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index 7bd37ef..d85bf7a 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -65,7 +65,7 @@ libindicator_la_CFLAGS = \ $(LIBINDICATOR_CFLAGS) \ $(COVERAGE_CFLAGS) \ -DG_LOG_DOMAIN=\"libindicator\" \ - -Wall -Werror + -Wall -Werror -Wno-error=deprecated-declarations libindicator_la_LIBADD = \ $(LIBINDICATOR_LIBS) diff --git a/tests/test-indicator-ng.c b/tests/test-indicator-ng.c index 7b677d3..cf1f59a 100644 --- a/tests/test-indicator-ng.c +++ b/tests/test-indicator-ng.c @@ -98,6 +98,32 @@ test_instantiation_with_profile (void) g_object_unref (indicator); } +/* From gtk+/testsuite/gtk/gtkmenu.c + * + * Returns the label of a GtkModelMenuItem, for which + * gtk_menu_item_get_label() returns NULL, because it uses its own + * widgets to accommodate an icon. + * + */ +static const gchar * +get_label (GtkMenuItem *item) +{ + GList *children = gtk_container_get_children (GTK_CONTAINER (item)); + const gchar *label = NULL; + + while (children) + { + if (GTK_IS_CONTAINER (children->data)) + children = g_list_concat (children, gtk_container_get_children (children->data)); + else if (GTK_IS_LABEL (children->data)) + label = gtk_label_get_text (children->data); + + children = g_list_delete_link (children, children); + } + + return label; +} + static void test_menu (void) { @@ -135,7 +161,7 @@ test_menu (void) item = children->data; g_assert (GTK_IS_MENU_ITEM (item)); g_assert (gtk_widget_is_sensitive (GTK_WIDGET (item))); - g_assert_cmpstr (gtk_menu_item_get_label (item), ==, "Show"); + g_assert_cmpstr (get_label (item), ==, "Show"); g_list_free (children); } |