gentoo-ebuilds/gnome-extra/gnome-directory-thumbnailer/files/0.1.11-Update-for-gnome-desktop-43-API-change.patch
Matt Turner 61fb2967df
gnome-extra/gnome-directory-thumbnailer: Update for gnome-desktop-43 API change
Also update to EAPI=8.

Closes: https://bugs.gentoo.org/882471
Signed-off-by: Matt Turner <mattst88@gentoo.org>
2022-12-04 14:41:48 -05:00

37 lines
1.6 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

https://bugs.gentoo.org/882471
https://gitlab.gnome.org/GNOME/gnome-directory-thumbnailer/-/merge_requests/2
From 8b39714ff8fd5de6643b5fdcf7fb01da35b82334 Mon Sep 17 00:00:00 2001
From: Matt Turner <mattst88@gmail.com>
Date: Sun, 4 Dec 2022 14:20:23 -0500
Subject: [PATCH] Update for gnome-desktop-43 API change
Fixes: https://gitlab.gnome.org/GNOME/gnome-directory-thumbnailer/-/issues/8
---
src/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main.c b/src/main.c
index 64aa7da..c5c6d34 100644
--- a/src/main.c
+++ b/src/main.c
@@ -373,12 +373,16 @@ copy_thumbnail_from_file (GnomeDesktopThumbnailFactory *factory, const gchar *fi
g_setenv ("GNOME_DIRECTORY_THUMBNAILER_RECURSION_LIMIT", new_recursion_limit_str, TRUE);
g_free (new_recursion_limit_str);
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, file_uri, file_mime_type, NULL, error);
+#else
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, file_uri, file_mime_type);
if (pixbuf == NULL) {
/* gnome-desktop doesn't set an error so we have to. */
g_debug ("Error generating thumbnail.");
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT, _("Error generating thumbnail for file %s."), file_uri);
}
+#endif
} else {
g_debug ("Didnt generate thumbnail due to hitting the recursion limit.");
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT, _("Error generating thumbnail for file %s: recursion limit reached."), file_uri);
--
2.37.4