summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-09-21 14:09:16 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-09-21 14:09:16 -0400
commit39349cdea37c052906c3a76eceebfdc1c8d66c55 (patch)
tree686396279d61d3e677c383017e4c5f492657aee6 /tests
parentee9e708cf6ea3f4ac780e0f7f3fc744a73918da0 (diff)
downloadgtk+-39349cdea37c052906c3a76eceebfdc1c8d66c55.tar.gz
testicontheme: Use rtl/ltr lookup flags
This should help with diagnosing https://bugzilla.gnome.org/show_bug.cgi?id=737000
Diffstat (limited to 'tests')
-rw-r--r--tests/testicontheme.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/testicontheme.c b/tests/testicontheme.c
index 216a398a96..0413135da5 100644
--- a/tests/testicontheme.c
+++ b/tests/testicontheme.c
@@ -67,6 +67,7 @@ main (int argc, char *argv[])
GList *list;
int size = 48;
int scale = 1;
+ GtkIconLookupFlags flags;
gtk_init (&argc, &argv);
@@ -76,6 +77,13 @@ main (int argc, char *argv[])
return 1;
}
+ flags = GTK_ICON_LOOKUP_USE_BUILTIN;
+
+ if (g_getenv ("RTL"))
+ flags |= GTK_ICON_LOOKUP_DIR_RTL;
+ else
+ flags |= GTK_ICON_LOOKUP_DIR_LTR;
+
themename = argv[2];
icon_theme = gtk_icon_theme_new ();
@@ -102,8 +110,7 @@ main (int argc, char *argv[])
scale = atoi (argv[5]);
error = NULL;
- pixbuf = gtk_icon_theme_load_icon_for_scale (icon_theme, argv[3], size, scale,
- GTK_ICON_LOOKUP_USE_BUILTIN, &error);
+ pixbuf = gtk_icon_theme_load_icon_for_scale (icon_theme, argv[3], size, scale, flags, &error);
if (!pixbuf)
{
g_print ("%s\n", error->message);
@@ -146,8 +153,7 @@ main (int argc, char *argv[])
G_CALLBACK (gtk_main_quit), window);
gtk_widget_show_all (window);
- info = gtk_icon_theme_lookup_icon_for_scale (icon_theme, argv[3], size, scale,
- GTK_ICON_LOOKUP_USE_BUILTIN);
+ info = gtk_icon_theme_lookup_icon_for_scale (icon_theme, argv[3], size, scale, flags);
if (info == NULL)
{
@@ -201,7 +207,7 @@ main (int argc, char *argv[])
if (argc >= 6)
scale = atoi (argv[5]);
- icon_info = gtk_icon_theme_lookup_icon_for_scale (icon_theme, argv[3], size, scale, GTK_ICON_LOOKUP_USE_BUILTIN);
+ icon_info = gtk_icon_theme_lookup_icon_for_scale (icon_theme, argv[3], size, scale, flags);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_print ("icon for %s at %dx%d@%dx is %s\n", argv[3], size, size, scale,
icon_info ? (gtk_icon_info_get_builtin_pixbuf (icon_info) ? "<builtin>" : gtk_icon_info_get_filename (icon_info)) : "<none>");