diff options
author | Christian Neumair <cneumair@gnome.org> | 2007-09-27 17:19:21 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@src.gnome.org> | 2007-09-27 17:19:21 +0000 |
commit | 55d0314bb88779f6e945003d006760056c147d46 (patch) | |
tree | ab79aab713b602817d9eba8f78b14f7bc6e75582 | |
parent | a4dfb1b204cfc071ac8891bc1eaae68ed5fa4ac6 (diff) | |
download | nautilus-55d0314bb88779f6e945003d006760056c147d46.tar.gz |
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=/branches/gnome-2-20/; revision=13236
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-factory.c | 12 |
2 files changed, 18 insertions, 0 deletions
@@ -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: diff --git a/libnautilus-private/nautilus-icon-factory.c b/libnautilus-private/nautilus-icon-factory.c index 4f30bbe1a..a955dba83 100644 --- a/libnautilus-private/nautilus-icon-factory.c +++ b/libnautilus-private/nautilus-icon-factory.c @@ -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); |