summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-05-04 10:41:54 +0200
committerBastien Nocera <hadess@hadess.net>2015-05-04 10:43:27 +0200
commit0b4843b523c73eda325be430094c517fc943a654 (patch)
treec93a55344731d674f5eda4b2dedc6535fe1d9f76
parentbfc31c4fca16effd9dda1a191130c80bd86a2117 (diff)
downloadtotem-0b4843b523c73eda325be430094c517fc943a654.tar.gz
icon-helpers: Fix frames not getting applied for new thumbnails
When we called the thumbnailer ourselves, we forgot to apply the film frame to it.
-rw-r--r--src/icon-helpers.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/icon-helpers.c b/src/icon-helpers.c
index b8700543f..0263f42ba 100644
--- a/src/icon-helpers.c
+++ b/src/icon-helpers.c
@@ -189,7 +189,7 @@ thumbnail_media_async_thread (GTask *task,
gpointer user_data)
{
GrlMedia *media;
- GdkPixbuf *pixbuf;
+ GdkPixbuf *pixbuf, *tmp_pixbuf;
const char *uri;
GDateTime *mtime;
@@ -217,19 +217,23 @@ thumbnail_media_async_thread (GTask *task,
return;
}
- pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, "video/x-totem-stream");
+ tmp_pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, "video/x-totem-stream");
- if (!pixbuf) {
+ if (!tmp_pixbuf) {
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "Thumbnailing failed");
g_object_unref (task);
return;
}
- gnome_desktop_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, g_date_time_to_unix (mtime));
+ gnome_desktop_thumbnail_factory_save_thumbnail (factory, tmp_pixbuf, uri, g_date_time_to_unix (mtime));
/* Save the thumbnail URL for the bookmarks source */
save_bookmark_thumbnail (media, uri);
+ /* Add frame */
+ pixbuf = load_icon (tmp_pixbuf, FALSE, FILL_MOVIE);
+ g_object_unref (tmp_pixbuf);
+
g_task_return_pointer (task, pixbuf, g_object_unref);
g_object_unref (task);
}