[Debian-on-mobile-maintainers] [Git][DebianOnMobile-team/chatty][gd-43] 2 commits: utils: update for GNOME Desktop 43 thumbnail API changes
Guido Günther (@agx)
gitlab at salsa.debian.org
Tue Aug 2 12:34:08 BST 2022
Guido Günther pushed to branch gd-43 at Debian On Mobile / chatty
Commits:
4786d5d0 by Guido Günther at 2022-08-02T13:33:45+02:00
utils: update for GNOME Desktop 43 thumbnail API changes
Thanks to Jeremy Bicha for the patch.
Closes: #1016171
- - - - -
8b22a8ff by Guido Günther at 2022-08-02T13:33:45+02:00
Document changes and release 0.6.7-2
- - - - -
3 changed files:
- debian/changelog
- debian/patches/series
- + debian/patches/utils-update-for-GNOME-Desktop-43-thumbnail-API-changes.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+chatty (0.6.7-2) experimental; urgency=medium
+
+ * Upload to experimental
+ * utils: update for GNOME Desktop 43 thumbnail API changes.
+ Thanks to Jeremy Bicha for the patch. (Closes: #1016171)
+
+ -- Guido Günther <agx at sigxcpu.org> Tue, 02 Aug 2022 10:28:06 +0200
+
chatty (0.6.7-1) unstable; urgency=medium
* New upstream version 0.6.7
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
0001-Disable-clock-test.patch
+utils-update-for-GNOME-Desktop-43-thumbnail-API-changes.patch
=====================================
debian/patches/utils-update-for-GNOME-Desktop-43-thumbnail-API-changes.patch
=====================================
@@ -0,0 +1,48 @@
+From: Jeremy Bicha <jeremy.bicha at canonical.com>
+Date: Mon, 1 Aug 2022 10:05:56 -0400
+Subject: utils: update for GNOME Desktop 43 thumbnail API changes
+
+Fixes: #726
+---
+ src/chatty-utils.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/src/chatty-utils.c b/src/chatty-utils.c
+index c95d938..6d38ad1 100644
+--- a/src/chatty-utils.c
++++ b/src/chatty-utils.c
+@@ -550,6 +550,26 @@ utils_create_thumbnail (GTask *task,
+ return;
+ }
+
++#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
++ thumbnail = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, content_type, NULL, &error);
++ if (!thumbnail) {
++ g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "Failed to create thumbnail for file: %s (%s)", uri, error->message);
++
++ g_warning ("Failed to create thumbnail for file: %s", uri);
++
++ g_error_free (error);
++ return;
++ }
++
++ gnome_desktop_thumbnail_factory_save_thumbnail (factory, thumbnail, uri, mtime, NULL, &error);
++ if (error) {
++ g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "Failed to create thumbnail for file: %s (%s)", uri, error->message);
++ g_error_free (error);
++ return;
++ }
++
++ g_task_return_boolean (task, TRUE);
++#else
+ thumbnail = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, content_type);
+
+ if (thumbnail) {
+@@ -562,6 +582,7 @@ utils_create_thumbnail (GTask *task,
+ }
+
+ g_task_return_boolean (task, TRUE);
++#endif
+ }
+
+ void
View it on GitLab: https://salsa.debian.org/DebianOnMobile-team/chatty/-/compare/42d4f31dce31856195eda893ea20f6d0611d875e...8b22a8ff8d4654630b470fc6179dd5ee11b2ad5f
--
View it on GitLab: https://salsa.debian.org/DebianOnMobile-team/chatty/-/compare/42d4f31dce31856195eda893ea20f6d0611d875e...8b22a8ff8d4654630b470fc6179dd5ee11b2ad5f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-on-mobile-maintainers/attachments/20220802/43703d3c/attachment-0001.htm>
More information about the Debian-on-mobile-maintainers
mailing list