[gtk+] testicontheme: Use rtl/ltr lookup flags
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testicontheme: Use rtl/ltr lookup flags
- Date: Sun, 21 Sep 2014 18:09:51 +0000 (UTC)
commit 39349cdea37c052906c3a76eceebfdc1c8d66c55
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Sep 21 14:09:16 2014 -0400
testicontheme: Use rtl/ltr lookup flags
This should help with diagnosing
https://bugzilla.gnome.org/show_bug.cgi?id=737000
tests/testicontheme.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/tests/testicontheme.c b/tests/testicontheme.c
index 216a398..0413135 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>");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]