[nautilus/gnome-42] Revert "thumbnail: update for gnome-desktop thumbnail API changes"



commit 5896e6af41b1fe89c9c5aef12793224d7492b482
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Fri Apr 22 21:58:45 2022 +0000

    Revert "thumbnail: update for gnome-desktop thumbnail API changes"
    
    This reverts commit fbc9bd6ff4ef32951391d4cdf89c27f58632f492

 meson.build               |  2 +-
 src/nautilus-thumbnails.c | 23 +++++------------------
 2 files changed, 6 insertions(+), 19 deletions(-)
---
diff --git a/meson.build b/meson.build
index 91b132987..6e19609cd 100644
--- a/meson.build
+++ b/meson.build
@@ -118,7 +118,7 @@ gio_unix = dependency('gio-unix-2.0', version: glib_ver)
 glib = dependency('glib-2.0', version: glib_ver)
 gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
 gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.0')
-gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 20.0.0')
+gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
 gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', version: '>= 42')
 gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
 libhandy = dependency('libhandy-1', version: '>= 1.5.0')
diff --git a/src/nautilus-thumbnails.c b/src/nautilus-thumbnails.c
index 1bad311e1..8b532f260 100644
--- a/src/nautilus-thumbnails.c
+++ b/src/nautilus-thumbnails.c
@@ -447,7 +447,6 @@ thumbnail_thread_func (GTask        *task,
     time_t current_orig_mtime = 0;
     time_t current_time;
     GList *node;
-    GError *error = NULL;
 
     thumbnail_factory = get_thumbnail_factory ();
 
@@ -530,9 +529,7 @@ thumbnail_thread_func (GTask        *task,
 
         pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory,
                                                                      info->image_uri,
-                                                                     info->mime_type,
-                                                                     NULL,
-                                                                     &error);
+                                                                     info->mime_type);
 
         if (pixbuf)
         {
@@ -542,27 +539,17 @@ thumbnail_thread_func (GTask        *task,
             gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory,
                                                             pixbuf,
                                                             info->image_uri,
-                                                            current_orig_mtime,
-                                                            NULL,
-                                                            &error);
-            if (error)
-            {
-                DEBUG ("(Thumbnail Thread) Saving thumbnail failed: %s (%s)\n",
-                       info->image_uri, error->message);
-                g_clear_error (&error);
-            }
+                                                            current_orig_mtime);
             g_object_unref (pixbuf);
         }
         else
         {
-            DEBUG ("(Thumbnail Thread) Thumbnail failed: %s (%s)\n",
-                   info->image_uri, error->message);
-            g_clear_error (&error);
+            DEBUG ("(Thumbnail Thread) Thumbnail failed: %s\n",
+                   info->image_uri);
 
             gnome_desktop_thumbnail_factory_create_failed_thumbnail (thumbnail_factory,
                                                                      info->image_uri,
-                                                                     current_orig_mtime,
-                                                                     NULL, NULL);
+                                                                     current_orig_mtime);
         }
         /* We need to call nautilus_file_changed(), but I don't think that is
          *  thread safe. So add an idle handler and do it from the main loop. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]