From fbc15a5c51c31a9a9d92ba7d89de9e9c5a5e21e9 Mon Sep 17 00:00:00 2001 From: Theo Linkspfeifer Date: Sun, 19 May 2019 23:09:22 +0200 Subject: [PATCH 1/1] Allow to load non-theme icons (Bug #15294) --- src/xfdesktop-regular-file-icon.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c index 5c14ea6f..c1b53bea 100644 --- a/src/xfdesktop-regular-file-icon.c +++ b/src/xfdesktop-regular-file-icon.c @@ -402,10 +402,8 @@ xfdesktop_load_icon_from_desktop_file(XfdesktopRegularFileIcon *regular_icon) /* check if the icon theme includes the icon name as-is */ if(gicon == NULL) { - if(gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon_name)) { - /* load it */ - gicon = g_themed_icon_new(icon_name); - } + /* load it */ + gicon = g_themed_icon_new(icon_name); } /* drop any suffix (e.g. '.png') from themed icons and try to laod that */ @@ -417,7 +415,7 @@ xfdesktop_load_icon_from_desktop_file(XfdesktopRegularFileIcon *regular_icon) tmp_name = g_strndup(icon_name, p - icon_name); /* check if the icon theme includes the icon name */ - if(tmp_name && gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), tmp_name)) { + if(tmp_name) { /* load it */ gicon = g_themed_icon_new(tmp_name); } -- 2.20.1