gtk2/gtk+-2.14.4-fallback-file-icon.patch
Alexander Larsson 4f1767ea8a - Manually check for fallback file icon since we're not always returning
that from gio anymore (from upstream)
2008-10-24 09:30:51 +00:00

20 lines
586 B
Diff

Index: gtk/gtkfilesystem.c
===================================================================
--- gtk/gtkfilesystem.c (revision 21702)
+++ gtk/gtkfilesystem.c (revision 21703)
@@ -1738,6 +1738,14 @@ _gtk_file_info_render_icon (GFileInfo *i
if (icon)
pixbuf = get_pixbuf_from_gicon (icon, widget, icon_size, NULL);
+
+ if (!pixbuf)
+ {
+ /* Use general fallback for all files without icon */
+ icon = g_themed_icon_new ("text-x-generic");
+ pixbuf = get_pixbuf_from_gicon (icon, widget, icon_size, NULL);
+ g_object_unref (icon);
+ }
}
return pixbuf;