summaryrefslogtreecommitdiff
path: root/media-video/cheese/files/41.1-thumb-view-update-for-new-gnome-desktop-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/cheese/files/41.1-thumb-view-update-for-new-gnome-desktop-API.patch')
-rw-r--r--media-video/cheese/files/41.1-thumb-view-update-for-new-gnome-desktop-API.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/media-video/cheese/files/41.1-thumb-view-update-for-new-gnome-desktop-API.patch b/media-video/cheese/files/41.1-thumb-view-update-for-new-gnome-desktop-API.patch
new file mode 100644
index 000000000000..3796c721f892
--- /dev/null
+++ b/media-video/cheese/files/41.1-thumb-view-update-for-new-gnome-desktop-API.patch
@@ -0,0 +1,49 @@
+From d58071c56dc46299357c46da5ef9682d8d0abfa4 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Mon, 11 Apr 2022 17:07:21 -0500
+Subject: [PATCH] thumb-view: update for new gnome-desktop API
+
+See gnome-desktop!132
+---
+ src/thumbview/cheese-thumb-view.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
+index f01b33df..fce8687d 100644
+--- a/src/thumbview/cheese-thumb-view.c
++++ b/src/thumbview/cheese-thumb-view.c
+@@ -134,6 +134,23 @@ cheese_thumb_view_idle_append_item (gpointer data)
+
+ if (!thumb_loc)
+ {
++#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
++ pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, mime_type, NULL, &error);
++ if (!pixbuf)
++ {
++ g_warning ("could not generate thumbnail for %s (%s): %s\n", filename, mime_type, error->message);
++ g_clear_error (&error);
++ }
++ else
++ {
++ gnome_desktop_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, mtime.tv_sec, NULL, &error);
++ if (error)
++ {
++ g_warning ("could not save thumbnail for %s (%s): %s\n", filename, mime_type, error->message);
++ g_clear_error (&error);
++ }
++ }
++#else
+ pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, mime_type);
+ if (!pixbuf)
+ {
+@@ -143,6 +160,7 @@ cheese_thumb_view_idle_append_item (gpointer data)
+ {
+ gnome_desktop_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, mtime.tv_sec);
+ }
++#endif
+ }
+ else
+ {
+--
+2.35.1
+