Drop gnome-desktop patch: applied in new release

This commit is contained in:
Jeremy Bicha 2022-08-05 08:31:44 -04:00
parent 5e537a44f4
commit 8f10c2de9a
2 changed files with 0 additions and 55 deletions

View File

@ -1,54 +0,0 @@
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Mon, 11 Apr 2022 17:16:58 -0500
Subject: M!104 - icon-factory: update for new gnome-desktop API
See gnome-desktop!132
Closes https://gitlab.gnome.org/GNOME/evolution/-/merge_requests/104
(cherry picked from commit 9e3019a0961e91e5fbffe190b973a47c7fafd361)
---
src/e-util/e-icon-factory.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/e-util/e-icon-factory.c b/src/e-util/e-icon-factory.c
index 25c2ecb..71ffd72 100644
--- a/src/e-util/e-icon-factory.c
+++ b/src/e-util/e-icon-factory.c
@@ -170,6 +170,9 @@ e_icon_factory_create_thumbnail (const gchar *filename)
static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL;
struct stat file_stat;
gchar *thumbnail = NULL;
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ GError *error = NULL;
+#endif
g_return_val_if_fail (filename != NULL, NULL);
@@ -194,10 +197,26 @@ e_icon_factory_create_thumbnail (const gchar *filename)
if (!thumbnail && gnome_desktop_thumbnail_factory_can_thumbnail (thumbnail_factory, uri, mime, file_stat.st_mtime)) {
GdkPixbuf *pixbuf;
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory, uri, mime, NULL, &error);
+ if (!pixbuf) {
+ g_warning ("Failed to generate thumbnail for %s: %s", uri, error ? error->message : "Unknown error");
+ g_clear_error (&error);
+ }
+#else
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory, uri, mime);
+#endif
if (pixbuf) {
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory, pixbuf, uri, file_stat.st_mtime, NULL, &error);
+ if (error) {
+ g_warning ("Failed to save thumbnail for %s: %s", uri, error ? error->message : "Unknown error");
+ g_clear_error (&error);
+ }
+#else
gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory, pixbuf, uri, file_stat.st_mtime);
+#endif
g_object_unref (pixbuf);
thumbnail = gnome_desktop_thumbnail_factory_lookup (thumbnail_factory, uri, file_stat.st_mtime);

View File

@ -1,3 +1,2 @@
10_revert_libevolution_avoid-version.patch
ubuntu_gettext_domain.patch
M-104-icon-factory-update-for-new-gnome-desktop-API.patch