[cheese/mcatanzaro/thummbnails] thumb-view: update for new gnome-desktop API
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/mcatanzaro/thummbnails] thumb-view: update for new gnome-desktop API
- Date: Mon, 11 Apr 2022 22:07:43 +0000 (UTC)
commit d58071c56dc46299357c46da5ef9682d8d0abfa4
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Mon Apr 11 17:07:21 2022 -0500
thumb-view: update for new gnome-desktop API
See gnome-desktop!132
src/thumbview/cheese-thumb-view.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
index f01b33df..fce8687d 100644
--- a/src/thumbview/cheese-thumb-view.c
+++ b/src/thumbview/cheese-thumb-view.c
@@ -134,6 +134,23 @@ cheese_thumb_view_idle_append_item (gpointer data)
if (!thumb_loc)
{
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, mime_type, NULL, &error);
+ if (!pixbuf)
+ {
+ g_warning ("could not generate thumbnail for %s (%s): %s\n", filename, mime_type, error->message);
+ g_clear_error (&error);
+ }
+ else
+ {
+ gnome_desktop_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, mtime.tv_sec, NULL, &error);
+ if (error)
+ {
+ g_warning ("could not save thumbnail for %s (%s): %s\n", filename, mime_type, error->message);
+ g_clear_error (&error);
+ }
+ }
+#else
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (factory, uri, mime_type);
if (!pixbuf)
{
@@ -143,6 +160,7 @@ cheese_thumb_view_idle_append_item (gpointer data)
{
gnome_desktop_thumbnail_factory_save_thumbnail (factory, pixbuf, uri, mtime.tv_sec);
}
+#endif
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]