Merge branch 'wip/gtk-icon-theme-no-svg-loader' into 'master'

gtk/icon-theme: Handle lack of SVG loader gracefully

Closes #2084

See merge request GNOME/gtk!1049
This commit is contained in:
Benjamin Otte 2019-08-08 07:27:10 +00:00
commit 68869a0e0f

View File

@ -1768,6 +1768,20 @@ real_choose_icon (GtkIconTheme *icon_theme,
icon_info->filename = g_strdup (unthemed_icon->svg_filename);
else if (unthemed_icon->no_svg_filename)
icon_info->filename = g_strdup (unthemed_icon->no_svg_filename);
else
{
static gboolean warned_once = FALSE;
if (!warned_once)
{
g_warning ("Found an icon but could not load it. "
"Most likely gdk-pixbuf does not provide SVG support.");
warned_once = TRUE;
}
g_clear_object (&icon_info);
goto out;
}
if (unthemed_icon->is_resource)
{