diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-10-23 10:00:44 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-10-23 10:00:44 +0000 |
commit | f5e4abd61e848aacaefab639faa8f463e6065e2e (patch) | |
tree | 92170749e0d56208b2620c0d69b77c3991acf7c3 | |
parent | 5b0e467eaed2c5b9b02ef31168e52c51a4d0cf16 (diff) | |
download | gdk-pixbuf-f5e4abd61e848aacaefab639faa8f463e6065e2e.tar.gz |
Merged from trunk:
2008-10-23 Alexander Larsson <alexl@redhat.com>
Merged from trunk:
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=/branches/gtk-2-14/; revision=21703
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | gtk/gtkfilesystem.c | 8 |
2 files changed, 21 insertions, 0 deletions
@@ -1,3 +1,16 @@ +2008-10-23 Alexander Larsson <alexl@redhat.com> + + Merged from trunk: + + 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. + 2008-10-22 Matthias Clasen <mclasen@redhat.com> Merged from trunk: diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 2b2d44a3b..3960be29b 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; |