diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am index 89d89e0f89..369bf6f348 100644 --- a/testsuite/reftests/Makefile.am +++ b/testsuite/reftests/Makefile.am @@ -506,6 +506,7 @@ libreftest_la_SOURCES = \ statusbar-remove-all.c \ textview-border-windows.c \ textview-tags.c \ + label-attributes.c \ $(NULL) -include $(top_srcdir)/git.mk diff --git a/testsuite/reftests/animation-direction.ref.ui b/testsuite/reftests/animation-direction.ref.ui index 6d8dc7b86a..c43ed1c11a 100644 --- a/testsuite/reftests/animation-direction.ref.ui +++ b/testsuite/reftests/animation-direction.ref.ui @@ -15,6 +15,7 @@ True False XXX + @@ -29,6 +30,7 @@ True False XXX + @@ -43,6 +45,7 @@ True False XXX + @@ -57,6 +60,7 @@ True False XXX + @@ -71,6 +75,7 @@ True False XXX + @@ -85,6 +90,7 @@ True False XXX + @@ -99,6 +105,7 @@ True False XXX + @@ -113,6 +120,7 @@ True False XXX + @@ -127,6 +135,7 @@ True False XXX + @@ -141,6 +150,7 @@ True False XXX + @@ -155,6 +165,7 @@ True False XXX + @@ -169,6 +180,7 @@ True False XXX + @@ -183,6 +195,7 @@ True False XXX + @@ -197,6 +210,7 @@ True False XXX + @@ -211,6 +225,7 @@ True False XXX + @@ -225,6 +240,7 @@ True False XXX + @@ -239,6 +255,7 @@ True False XXX + @@ -253,6 +270,7 @@ True False XXX + @@ -267,6 +285,7 @@ True False XXX + @@ -281,6 +300,7 @@ True False XXX + @@ -295,6 +315,7 @@ True False XXX + @@ -309,6 +330,7 @@ True False XXX + @@ -323,6 +345,7 @@ True False XXX + @@ -337,6 +360,7 @@ True False XXX + @@ -351,6 +375,7 @@ True False XXX + @@ -365,6 +390,7 @@ True False XXX + @@ -379,6 +405,7 @@ True False XXX + @@ -393,6 +420,7 @@ True False XXX + @@ -407,6 +435,7 @@ True False XXX + @@ -421,6 +450,7 @@ True False XXX + @@ -435,6 +465,7 @@ True False XXX + @@ -449,6 +480,7 @@ True False XXX + diff --git a/testsuite/reftests/label-attributes.c b/testsuite/reftests/label-attributes.c new file mode 100644 index 0000000000..7ee9902ed7 --- /dev/null +++ b/testsuite/reftests/label-attributes.c @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2016 Red Hat Inc. + * + * Author: + * Matthias Clasen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library. If not, see . + */ + +#include "config.h" + +#include + +#include "gtk-reftest.h" + +static gboolean +unblock (gpointer data) +{ + reftest_uninhibit_snapshot (); + return G_SOURCE_REMOVE; +} + +G_MODULE_EXPORT void +strip_attributes_if_no_animation (GtkWidget *widget) +{ + gboolean enabled; + + g_object_get (gtk_widget_get_settings (widget), "gtk-enable-animations", &enabled, NULL); + if (enabled) + return; + + reftest_inhibit_snapshot (); + gtk_label_set_attributes (GTK_LABEL (widget), NULL); + g_timeout_add (500, unblock, NULL); +}