From: Timm Bäder Date: Sat, 25 May 2019 14:51:30 +0000 (+0200) Subject: icontheme: Save the min_suffix for the min_dir X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~910 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d98e05b91af1a19954f10047d35c78148ddf16d7;p=gtk4.git icontheme: Save the min_suffix for the min_dir We already have to compute that value in the loop before, so just save it. --- diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 78714d7c01..0fab4eddd6 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -2919,6 +2919,7 @@ theme_lookup_icon (IconTheme *theme, gchar *file; gint min_difference, difference; IconSuffix suffix; + IconSuffix min_suffix; min_difference = G_MAXINT; min_dir = NULL; @@ -2941,6 +2942,7 @@ theme_lookup_icon (IconTheme *theme, size, scale)) { min_dir = dir; + min_suffix = suffix; min_difference = difference; } } @@ -2956,7 +2958,7 @@ theme_lookup_icon (IconTheme *theme, icon_info->min_size = min_dir->min_size; icon_info->max_size = min_dir->max_size; - suffix = theme_dir_get_icon_suffix (min_dir, icon_name); + suffix = min_suffix; suffix = best_suffix (suffix, allow_svg); g_assert (suffix != ICON_SUFFIX_NONE);