[totem/gnome-3-14] icon-helpers: Fix frames not getting applied for new thumbnails



commit 26a0ad7711e6bccc4e70d617bad4bb90e3742bb4
Author: Bastien Nocera <hadess hadess net>
Date:   Mon May 4 10:41:54 2015 +0200

    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.

 src/icon-helpers.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/icon-helpers.c b/src/icon-helpers.c
index f073f26..f0e7d4b 100644
--- a/src/icon-helpers.c
+++ b/src/icon-helpers.c
@@ -156,7 +156,7 @@ thumbnail_media_async_thread (GTask    *task,
                              gpointer  user_data)
 {
        GrlMedia *media;
-       GdkPixbuf *pixbuf;
+       GdkPixbuf *pixbuf, *tmp_pixbuf;
        const char *uri;
        GDateTime *mtime;
 
@@ -184,19 +184,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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]