summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-icon-info.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-02-16 08:50:12 +0000
committerAlexander Larsson <alexl@src.gnome.org>2009-02-16 08:50:12 +0000
commit3a1e67c82bd4bc3f552dadf829ad422a502114dc (patch)
tree81c960530a9fb00cd90477b3c708bc435e4e769f /libnautilus-private/nautilus-icon-info.c
parenta7369d3b8fa6916294c80197a5cca35ec8207398 (diff)
downloadnautilus-3a1e67c82bd4bc3f552dadf829ad422a502114dc.tar.gz
Handle GIcon types other than files and themed icons. Patch from David
2009-02-16 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-icon-info.c: (nautilus_icon_info_lookup): Handle GIcon types other than files and themed icons. Patch from David Zeuthen svn path=/trunk/; revision=14952
Diffstat (limited to 'libnautilus-private/nautilus-icon-info.c')
-rw-r--r--libnautilus-private/nautilus-icon-info.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-icon-info.c b/libnautilus-private/nautilus-icon-info.c
index 802c74582..f1ddd7cb8 100644
--- a/libnautilus-private/nautilus-icon-info.c
+++ b/libnautilus-private/nautilus-icon-info.c
@@ -410,8 +410,23 @@ nautilus_icon_info_lookup (GIcon *icon,
gtk_icon_info_free (gtkicon_info);
return g_object_ref (icon_info);
- }
- return nautilus_icon_info_new_for_pixbuf (NULL);
+ } else {
+ GdkPixbuf *pixbuf;
+ GtkIconInfo *gtk_icon_info;
+
+ gtk_icon_info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (),
+ icon,
+ size,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK);
+ if (gtk_icon_info != NULL) {
+ pixbuf = gtk_icon_info_load_icon (gtk_icon_info, NULL);
+ gtk_icon_info_free (gtk_icon_info);
+ } else {
+ pixbuf = NULL;
+ }
+
+ return nautilus_icon_info_new_for_pixbuf (pixbuf);
+ }
}
NautilusIconInfo *