1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
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 ("Didn’t 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
|