diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-02 00:27:14 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-02-04 16:41:36 +0100 |
commit | bbbe39fb44d2d9e40f0d92201f77e0680d2ff16a (patch) | |
tree | 14971b3436ceb5175562a502febabf6eab1c3d51 /tests/testicontheme.c | |
parent | b713b9f68dc443ca23e3fedaca7eb958741975d1 (diff) | |
download | gtk+-bbbe39fb44d2d9e40f0d92201f77e0680d2ff16a.tar.gz |
icontheme: Make text direction a lookup argument
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
Diffstat (limited to 'tests/testicontheme.c')
-rw-r--r-- | tests/testicontheme.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/testicontheme.c b/tests/testicontheme.c index 2d64de49d9..fe7c28f771 100644 --- a/tests/testicontheme.c +++ b/tests/testicontheme.c @@ -43,6 +43,7 @@ main (int argc, char *argv[]) int size = 48; int scale = 1; GtkIconLookupFlags flags; + GtkTextDirection direction; gtk_init (); @@ -55,9 +56,11 @@ main (int argc, char *argv[]) flags = GTK_ICON_LOOKUP_USE_BUILTIN; if (g_getenv ("RTL")) - flags |= GTK_ICON_LOOKUP_DIR_RTL; + direction = GTK_TEXT_DIR_RTL; + else if (g_getenv ("LTR")) + direction = GTK_TEXT_DIR_LTR; else - flags |= GTK_ICON_LOOKUP_DIR_LTR; + direction = GTK_TEXT_DIR_NONE; themename = argv[2]; @@ -83,7 +86,7 @@ main (int argc, char *argv[]) if (argc >= 6) scale = atoi (argv[5]); - icon = gtk_icon_theme_lookup_icon (icon_theme, argv[3], size, scale, flags); + icon = gtk_icon_theme_lookup_icon (icon_theme, argv[3], size, scale, direction, flags); if (!icon) { g_print ("Icon '%s' not found\n", argv[3]); @@ -131,7 +134,7 @@ main (int argc, char *argv[]) if (argc >= 6) scale = atoi (argv[5]); - icon = gtk_icon_theme_lookup_icon (icon_theme, argv[3], size, scale, flags); + icon = gtk_icon_theme_lookup_icon (icon_theme, argv[3], size, scale, direction, flags); g_print ("icon for %s at %dx%d@%dx is %s\n", argv[3], size, size, scale, icon ? gtk_icon_get_filename (icon) : "<none>"); |