mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
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
This commit is contained in:
parent
a7369d3b8f
commit
3a1e67c82b
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
||||
2009-02-13 Cosimo Cecchi <cosimoc@gnome.org>
|
||||
|
||||
* libnautilus-private/nautilus-file.c: (nautilus_file_mount):
|
||||
|
|
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue