summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-10-23 09:59:46 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-10-23 09:59:46 +0000
commitfb55cf75f0174ffd180d921bcdc0b256653770c5 (patch)
treeabf7ce7be4e82a73928024381c0381d4ceac4ddc /gtk/gtkfilesystem.c
parente108b3d2d944e61b6c836c075feb88eb5ee3b1dc (diff)
downloadgtk+-fb55cf75f0174ffd180d921bcdc0b256653770c5.tar.gz
Bug 528320 - Incorrect icons displayed for files with custom mimetype
2008-10-23 Alexander Larsson <alexl@redhat.com> Bug 528320 - Incorrect icons displayed for files with custom mimetype icons * gtk/gtkfilesystem.c: (_gtk_file_info_render_icon): Fall back on default file icon if there was no icon or it was not found in the theme. This goes with the corresponding change in glib to not add the fallback icon, but is useful in other cases too. svn path=/trunk/; revision=21702
Diffstat (limited to 'gtk/gtkfilesystem.c')
-rw-r--r--gtk/gtkfilesystem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c
index 2b2d44a3ba..3960be29bb 100644
--- a/gtk/gtkfilesystem.c
+++ b/gtk/gtkfilesystem.c
@@ -1738,6 +1738,14 @@ _gtk_file_info_render_icon (GFileInfo *info,
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;