Frame asynchronously loaded thumbnails. Fixes #478363.

2007-09-27  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-icon-factory.c:
	(async_thumbnail_load_func): Frame asynchronously loaded thumbnails.
	Fixes #478363.

svn path=/trunk/; revision=13235
This commit is contained in:
Christian Neumair 2007-09-27 17:15:05 +00:00 committed by Christian Neumair
parent 420d34fcd7
commit f66eeaeba0
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2007-09-27 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-factory.c:
(async_thumbnail_load_func): Frame asynchronously loaded thumbnails.
Fixes #478363.
2007-09-18 Alexander Larsson <alexl@redhat.com>
* configure.in:

View file

@ -384,9 +384,21 @@ async_thumbnail_load_func (NautilusThumbnailAsyncLoadHandle *handle,
goto out;
}
if (!gdk_pixbuf_get_has_alpha (pixbuf)) {
/* we don't own the pixbuf, but nautilus_thumbnail_frame_image() assumes so and unrefs it. */
g_object_ref (pixbuf);
nautilus_thumbnail_frame_image (&pixbuf);
/* at this point, we own a pixbuf, which is the framed version of the passed-in pixbuf. */
}
cached_icon = cache_icon_new (pixbuf, NULL, scale_x, scale_y);
cached_icon->mtime = statbuf.st_mtime;
if (!gdk_pixbuf_get_has_alpha (pixbuf)) {
g_object_unref (pixbuf);
}
if (cached_icon != NULL) {
key = g_new (CacheKey, 1);
key->name = g_strdup (path);