Cherry-pick patch to fix build with gnome-desktop 43
This commit is contained in:
@ -177,10 +177,10 @@ index b609d8d..6476737 100644
|
|||||||
-DG_LOG_DOMAIN=\"evolution-mail-composer\"
|
-DG_LOG_DOMAIN=\"evolution-mail-composer\"
|
||||||
-DEVOLUTION_UIDIR=\"${uidir}\"
|
-DEVOLUTION_UIDIR=\"${uidir}\"
|
||||||
diff --git a/src/e-util/CMakeLists.txt b/src/e-util/CMakeLists.txt
|
diff --git a/src/e-util/CMakeLists.txt b/src/e-util/CMakeLists.txt
|
||||||
index cc8c06c..2146130 100644
|
index f1c8c53..6eff8b0 100644
|
||||||
--- a/src/e-util/CMakeLists.txt
|
--- a/src/e-util/CMakeLists.txt
|
||||||
+++ b/src/e-util/CMakeLists.txt
|
+++ b/src/e-util/CMakeLists.txt
|
||||||
@@ -603,6 +603,11 @@ add_dependencies(evolution-util
|
@@ -605,6 +605,11 @@ add_dependencies(evolution-util
|
||||||
${DEPENDENCIES}
|
${DEPENDENCIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
54
debian/patches/M-104-icon-factory-update-for-new-gnome-desktop-API.patch
vendored
Normal file
54
debian/patches/M-104-icon-factory-update-for-new-gnome-desktop-API.patch
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
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);
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -1,2 +1,3 @@
|
|||||||
10_revert_libevolution_avoid-version.patch
|
10_revert_libevolution_avoid-version.patch
|
||||||
ubuntu_gettext_domain.patch
|
ubuntu_gettext_domain.patch
|
||||||
|
M-104-icon-factory-update-for-new-gnome-desktop-API.patch
|
||||||
|
2
debian/patches/ubuntu_gettext_domain.patch
vendored
2
debian/patches/ubuntu_gettext_domain.patch
vendored
@ -10,7 +10,7 @@ Bug: https://bugzilla.gnome.org/784877
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 262409b..0da5fb0 100644
|
index 9106169..cc30a2b 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -35,7 +35,7 @@ else(_is_devel_version EQUAL 1)
|
@@ -35,7 +35,7 @@ else(_is_devel_version EQUAL 1)
|
||||||
|
Reference in New Issue
Block a user