mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
media-video/cheese: Add patch to build against gnome-desktop-43
Closes: https://bugs.gentoo.org/873688 Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
@@ -62,6 +62,7 @@ BDEPEND="
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.38.0-buildfix.patch
|
||||
"${FILESDIR}"/${PV}-thumb-view-update-for-new-gnome-desktop-API.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user