gnome-shell-extension-deskt.../desktop-icons-show-iso-file-icon.patch

18 lines
807 B
Diff
Raw Normal View History

Index: desktop-icons-20.10.0/fileItem.js
===================================================================
--- desktop-icons-20.10.0.orig/fileItem.js
+++ desktop-icons-20.10.0/fileItem.js
@@ -443,7 +443,11 @@ var FileItem = GObject.registerClass({
}
_createEmblemedStIcon(icon, iconName) {
- if (icon == null) {
+ if (icon != null) {
+ let theme = Gtk.IconTheme.get_default();
+ if (theme.lookup_by_gicon(icon, null, Gtk.IconLookupFlags.GENERIC_FALLBACK) == null)
+ icon = Gio.ThemedIcon.new_with_default_fallbacks('text-x-generic');
+ } else {
if (GLib.path_is_absolute(iconName)) {
let iconFile = Gio.File.new_for_commandline_arg(iconName);
icon = new Gio.FileIcon({ file: iconFile });