Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gthumb for openSUSE:Factory checked 
in at 2026-01-26 11:05:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gthumb (Old)
 and      /work/SRC/openSUSE:Factory/.gthumb.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gthumb"

Mon Jan 26 11:05:38 2026 rev:128 rq:1329057 version:3.12.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/gthumb/gthumb.changes    2025-12-05 
16:58:19.416650243 +0100
+++ /work/SRC/openSUSE:Factory/.gthumb.new.1928/gthumb.changes  2026-01-26 
11:05:44.918595837 +0100
@@ -1,0 +2,13 @@
+Fri Jan 23 08:31:04 UTC 2026 - Bjørn Lie <[email protected]>
+
+- Update to version 3.12.9:
+  + Bugfixes:
+    - Fixed compilation when lcms2 is disabled
+    - Lossless rotation: make sure to modify the orientation tags
+      only
+    - Do not change the file modification time if the content did
+      not change
+    - Sharpen: allow to view the image at natural size
+    - Rotation: fixed bilinear filter
+
+-------------------------------------------------------------------

Old:
----
  gthumb-3.12.8.2.obscpio

New:
----
  gthumb-3.12.9.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gthumb.spec ++++++
--- /var/tmp/diff_new_pack.g97a5A/_old  2026-01-26 11:05:45.966639686 +0100
+++ /var/tmp/diff_new_pack.g97a5A/_new  2026-01-26 11:05:45.966639686 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gthumb
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           gthumb
-Version:        3.12.8.2
+Version:        3.12.9
 Release:        0
 # FIXME: Add libchamplain BuildRequires once the map feature is considered 
stable.
 Summary:        An Image Viewer and Browser for GNOME

++++++ _service ++++++
--- /var/tmp/diff_new_pack.g97a5A/_old  2026-01-26 11:05:45.998641025 +0100
+++ /var/tmp/diff_new_pack.g97a5A/_new  2026-01-26 11:05:46.002641192 +0100
@@ -3,7 +3,7 @@
   <service name="obs_scm" mode="manual">
     <param name="scm">git</param>
     <param name="url">https://gitlab.gnome.org/GNOME/gthumb.git</param>
-    <param name="revision">3.12.8.2</param>
+    <param name="revision">3.12.9</param>
     <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
     <param name="versionrewrite-pattern">v?(.*)\+0</param>
     <param name="versionrewrite-replacement">\1</param>

++++++ gthumb-3.12.8.2.obscpio -> gthumb-3.12.9.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/NEWS new/gthumb-3.12.9/NEWS
--- old/gthumb-3.12.8.2/NEWS    2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/NEWS      2026-01-23 08:54:29.000000000 +0100
@@ -1,3 +1,14 @@
+Version 3.12.9
+~~~~~~~~~~~~~~
+Released: 2026-01-23
+
+Bugfixes:
+ * Fixed compilation when lcms2 is disabled
+ * Lossless rotation: make sure to modify the orientation tags only
+ * Do not change the file modification time if the content did not change
+ * Sharpen: allow to view the image at natural size
+ * Rotation: fixed bilinear filter
+
 Version 3.12.8.2
 ~~~~~~~~~~~~~~~~
 Released: 2025-11-30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/cairo_io/cairo-image-surface-tiff.c 
new/gthumb-3.12.9/extensions/cairo_io/cairo-image-surface-tiff.c
--- old/gthumb-3.12.8.2/extensions/cairo_io/cairo-image-surface-tiff.c  
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/cairo_io/cairo-image-surface-tiff.c    
2026-01-23 08:54:29.000000000 +0100
@@ -259,6 +259,7 @@
                                orientation = exif_orientation;
                        }
 
+#if HAVE_LCMS2
                        uint16_t colorspace;
                        if ((profile == NULL) && (TIFFGetField (tif, 
EXIFTAG_COLORSPACE, &colorspace) == 1)) {
                                //g_print ("> colorspace: %u\n", colorspace);
@@ -266,6 +267,7 @@
                                        profile = gth_icc_profile_new_srgb ();
                                }
                        }
+#endif
                }
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/change_date/gth-change-date-task.c 
new/gthumb-3.12.9/extensions/change_date/gth-change-date-task.c
--- old/gthumb-3.12.8.2/extensions/change_date/gth-change-date-task.c   
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/change_date/gth-change-date-task.c     
2026-01-23 08:54:29.000000000 +0100
@@ -309,7 +309,7 @@
 
                attributes = _g_string_array_join (attribute_v, ",");
                _g_write_metadata_async (self->priv->file_list,
-                                        GTH_METADATA_WRITE_DEFAULT,
+                                        GTH_METADATA_WRITE_NOT_MODIFIED,
                                         attributes,
                                         gth_task_get_cancellable (GTH_TASK 
(self)),
                                         write_metadata_ready_cb,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/extensions/comments/gth-comment.c 
new/gthumb-3.12.9/extensions/comments/gth-comment.c
--- old/gthumb-3.12.8.2/extensions/comments/gth-comment.c       2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/comments/gth-comment.c 2026-01-23 
08:54:29.000000000 +0100
@@ -38,7 +38,7 @@
        GthTime    *time_of_day;
        gboolean    changed;
        gboolean    utf8;
-       GDateTime  *last_modified;
+       GDateTime  *last_changed;
 };
 
 
@@ -86,8 +86,8 @@
        g_ptr_array_unref (self->priv->categories);
        g_date_free (self->priv->date);
        gth_time_free (self->priv->time_of_day);
-       if (self->priv->last_modified != NULL) {
-               g_date_time_unref (self->priv->last_modified);
+       if (self->priv->last_changed != NULL) {
+               g_date_time_unref (self->priv->last_changed);
        }
 
        G_OBJECT_CLASS (gth_comment_parent_class)->finalize (obj);
@@ -112,7 +112,7 @@
        self->priv->categories = g_ptr_array_new ();
        self->priv->date = g_date_new ();
        self->priv->time_of_day = gth_time_new ();
-       self->priv->last_modified = NULL;
+       self->priv->last_changed = NULL;
 }
 
 
@@ -299,16 +299,16 @@
                return NULL;
        }
        GFileInfo *info = g_file_query_info (comment_file,
-               G_FILE_ATTRIBUTE_TIME_MODIFIED "," 
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
+               G_FILE_ATTRIBUTE_TIME_CHANGED "," 
G_FILE_ATTRIBUTE_TIME_CHANGED_USEC,
                G_FILE_QUERY_INFO_NONE,
                NULL,
                NULL);
-       GDateTime *last_modified = g_file_info_get_modification_date_time 
(info);
+       GDateTime *last_changed = _g_file_info_get_changed_time (info);
        g_object_unref (comment_file);
 
        if ((zipped_buffer != NULL) && (((char *) zipped_buffer)[0] != '<')) {
                if (! zlib_decompress_buffer (zipped_buffer, zipped_size, 
&buffer, &size)) {
-                       g_date_time_unref (last_modified);
+                       g_date_time_unref (last_changed);
                        return NULL;
                }
        }
@@ -323,7 +323,7 @@
        doc = dom_document_new ();
        if (dom_document_load (doc, buffer, size, error)) {
                dom_domizable_load_from_element (DOM_DOMIZABLE (comment), 
DOM_ELEMENT (doc)->first_child);
-               gth_comment_set_last_modified (comment, last_modified);
+               gth_comment_set_last_changed (comment, last_changed);
        }
        else {
                buffer = NULL;
@@ -334,7 +334,7 @@
        g_object_unref (doc);
        g_free (buffer);
        g_free (zipped_buffer);
-       g_date_time_unref (last_modified);
+       g_date_time_unref (last_changed);
 
        return comment;
 }
@@ -502,23 +502,23 @@
 
 
 void
-gth_comment_set_last_modified (GthComment *comment,
-                              GDateTime *last_modified)
+gth_comment_set_last_changed (GthComment *comment,
+                             GDateTime *last_changed)
 {
        g_return_if_fail (GTH_IS_COMMENT (comment));
-       comment->priv->last_modified = g_date_time_ref (last_modified);
+       comment->priv->last_changed = g_date_time_ref (last_changed);
 }
 
 
 gboolean
 gth_comment_file_is_older (GthComment *comment,
-                              GDateTime *timestamp)
+                          GDateTime  *timestamp)
 {
        g_return_val_if_fail (GTH_IS_COMMENT (comment), FALSE);
-       if (comment->priv->last_modified == NULL) {
+       if ((timestamp == NULL) || (comment->priv->last_changed == NULL)) {
                return FALSE;
        }
-       gint64 diff = g_date_time_difference (timestamp, 
comment->priv->last_modified);
+       gint64 diff = g_date_time_difference (timestamp, 
comment->priv->last_changed);
        return diff > 1000000;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/extensions/comments/gth-comment.h 
new/gthumb-3.12.9/extensions/comments/gth-comment.h
--- old/gthumb-3.12.8.2/extensions/comments/gth-comment.h       2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/comments/gth-comment.h 2026-01-23 
08:54:29.000000000 +0100
@@ -73,8 +73,8 @@
                                                          const char    *value);
 void              gth_comment_set_time_from_time_t       (GthComment    
*comment,
                                                          time_t         value);
-void              gth_comment_set_last_modified          (GthComment    
*comment,
-                                                         GDateTime     
*last_modified);
+void              gth_comment_set_last_changed           (GthComment    
*comment,
+                                                         GDateTime     
*last_changed);
 gboolean          gth_comment_file_is_older          (GthComment    *comment,
                                                          GDateTime     
*timestamp);
 const char *      gth_comment_get_caption                (GthComment    
*comment);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/comments/gth-metadata-provider-comment.c 
new/gthumb-3.12.9/extensions/comments/gth-metadata-provider-comment.c
--- old/gthumb-3.12.8.2/extensions/comments/gth-metadata-provider-comment.c     
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/comments/gth-metadata-provider-comment.c       
2026-01-23 08:54:29.000000000 +0100
@@ -161,14 +161,14 @@
        else
                g_file_info_remove_attribute (file_data->info, "comment::time");
 
-       // Update the general attributes if the comment file is not older
-       // than the image file or the attributes were not updated from the
-       // embedded data.
+       // Do not update the general attributes if the current attributes were
+       // updated from the embedded data and the comment file is older than
+       // the image file.
        gboolean update_general_attributes = TRUE;
        if (g_file_info_has_attribute (file_data->info, 
"embedded::updated-general-attributes")) {
                if (g_file_info_get_attribute_boolean (file_data->info, 
"embedded::updated-general-attributes")) {
-                       GDateTime *file_modification_time = 
g_file_info_get_modification_date_time (file_data->info);
-                       if (gth_comment_file_is_older (comment, 
file_modification_time)) {
+                       GDateTime *file_changed_time = 
_g_file_info_get_changed_time (file_data->info);
+                       if (gth_comment_file_is_older (comment, 
file_changed_time)) {
                                update_general_attributes = FALSE;
                        }
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/edit_metadata/gth-tag-task.c 
new/gthumb-3.12.9/extensions/edit_metadata/gth-tag-task.c
--- old/gthumb-3.12.8.2/extensions/edit_metadata/gth-tag-task.c 2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/edit_metadata/gth-tag-task.c   2026-01-23 
08:54:29.000000000 +0100
@@ -121,7 +121,7 @@
 
        gth_task_progress (GTH_TASK (self), _("Assigning tags to the selected 
files"), _("Writing files"), TRUE, 0.0);
        _g_write_metadata_async (self->priv->file_data_list,
-                                GTH_METADATA_WRITE_DEFAULT,
+                                GTH_METADATA_WRITE_NOT_MODIFIED,
                                 "general::tags",
                                 gth_task_get_cancellable (GTH_TASK (self)),
                                 write_metadata_ready_cb,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/exiv2_tools/exiv2-utils.cpp 
new/gthumb-3.12.9/extensions/exiv2_tools/exiv2-utils.cpp
--- old/gthumb-3.12.8.2/extensions/exiv2_tools/exiv2-utils.cpp  2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/exiv2_tools/exiv2-utils.cpp    2026-01-23 
08:54:29.000000000 +0100
@@ -1556,11 +1556,14 @@
 exiv2_write_metadata_to_buffer (void      **buffer,
                                gsize      *buffer_size,
                                GFileInfo  *info,
+                               gboolean    update_from_general_attributes,
                                GthImage   *image_data,
                                GError    **error)
 {
        try {
-               update_exif_tags_from_general_attributes (info);
+               if (update_from_general_attributes) {
+                       update_exif_tags_from_general_attributes (info);
+               }
 
 #if EXIV2_TEST_VERSION(0,28,0)
                Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open 
((Exiv2::byte*) *buffer, *buffer_size);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/extensions/exiv2_tools/exiv2-utils.h 
new/gthumb-3.12.9/extensions/exiv2_tools/exiv2-utils.h
--- old/gthumb-3.12.8.2/extensions/exiv2_tools/exiv2-utils.h    2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/exiv2_tools/exiv2-utils.h      2026-01-23 
08:54:29.000000000 +0100
@@ -49,6 +49,7 @@
 gboolean   exiv2_write_metadata_to_buffer   (void              **buffer,
                                             gsize              *buffer_size,
                                             GFileInfo          *info,
+                                            gboolean            
update_from_general_attributes,
                                             GthImage           *image_data, /* 
optional */
                                             GError           **error);
 gboolean   exiv2_clear_metadata             (void             **buffer,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/exiv2_tools/gth-metadata-provider-exiv2.c 
new/gthumb-3.12.9/extensions/exiv2_tools/gth-metadata-provider-exiv2.c
--- old/gthumb-3.12.8.2/extensions/exiv2_tools/gth-metadata-provider-exiv2.c    
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/exiv2_tools/gth-metadata-provider-exiv2.c      
2026-01-23 08:54:29.000000000 +0100
@@ -159,8 +159,7 @@
        if (self->priv->general_settings == NULL)
                self->priv->general_settings = g_settings_new 
(GTHUMB_GENERAL_SCHEMA);
 
-       if (! (flags & GTH_METADATA_WRITE_FORCE_EMBEDDED)
-           && ! g_settings_get_boolean (self->priv->general_settings, 
PREF_GENERAL_STORE_METADATA_IN_FILES))
+       if (! g_settings_get_boolean (self->priv->general_settings, 
PREF_GENERAL_STORE_METADATA_IN_FILES))
                return;
 
        if (! exiv2_can_write (gth_file_data_get_mime_type (file_data)))
@@ -172,6 +171,7 @@
        if (exiv2_write_metadata_to_buffer (&buffer,
                                            &size,
                                            file_data->info,
+                                           TRUE,
                                            NULL,
                                            &error))
        {
@@ -182,6 +182,25 @@
                               size,
                               cancellable,
                               &error);
+
+               if (flags & GTH_METADATA_WRITE_NOT_MODIFIED) {
+                       // Restore the modified time because the content was 
not modified.
+                       GFileInfo *tmp_info = g_file_info_new ();
+                       g_file_info_set_attribute_uint64 (
+                               tmp_info,
+                               G_FILE_ATTRIBUTE_TIME_MODIFIED,
+                               g_file_info_get_attribute_uint64 
(file_data->info, G_FILE_ATTRIBUTE_TIME_MODIFIED));
+                       g_file_info_set_attribute_uint32 (tmp_info,
+                               G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
+                               g_file_info_get_attribute_uint32 
(file_data->info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC));
+                       g_file_set_attributes_from_info (file_data->file,
+                               tmp_info,
+                               G_FILE_QUERY_INFO_NONE,
+                               NULL,
+                               NULL);
+
+                       g_object_unref (tmp_info);
+               }
        }
 
        if (buffer != NULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/extensions/exiv2_tools/main.c 
new/gthumb-3.12.9/extensions/exiv2_tools/main.c
--- old/gthumb-3.12.8.2/extensions/exiv2_tools/main.c   2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/exiv2_tools/main.c     2026-01-23 
08:54:29.000000000 +0100
@@ -245,6 +245,7 @@
                &data->buffer,
                &data->buffer_size,
                data->file_data->info,
+               TRUE,
                data->image,
                data->error);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/extensions/file_tools/cairo-rotate.c 
new/gthumb-3.12.9/extensions/file_tools/cairo-rotate.c
--- old/gthumb-3.12.8.2/extensions/file_tools/cairo-rotate.c    2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/file_tools/cairo-rotate.c      2026-01-23 
08:54:29.000000000 +0100
@@ -188,7 +188,7 @@
        double           x2, y2;
        int              x2min, y2min;
        int              x2max, y2max;
-       double           fx, fy;
+       double           fx, fy, gx, gy;
        guchar          *p_src, *p_new;
        guchar          *p_src2, *p_new2;
        guchar           r00, r01, r10, r11;
@@ -264,12 +264,10 @@
  *    |               |
  *    v10------------v11
  */
-#define INTERPOLATE(v, v00, v01, v10, v11, fx, fy) \
-       tmp = (1.0 - (fy)) * \
-             ((1.0 - (fx)) * (v00) + (fx) * (v01)) \
-              + \
-              (fy) * \
-              ((1.0 - (fx)) * (v10) + (fx) * (v11)); \
+#define INTERPOLATE(v, v00, v01, v10, v11) \
+       tmp = gy * (gx * v00 + fx * v01) \
+             + \
+             fy * (gx * v10 + fx * v11); \
        v = CLAMP (tmp, 0, 255);
 
 #define GET_VALUES(r, g, b, a, x, y) \
@@ -318,8 +316,8 @@
                        if (high_quality) {
                                /* Bilinear interpolation. */
 
-                               x2min = (int) x2;
-                               y2min = (int) y2;
+                               x2min = (int) floor (x2);
+                               y2min = (int) floor (y2);
                                x2max = x2min + 1;
                                y2max = y2min + 1;
 
@@ -330,11 +328,13 @@
 
                                fx = x2 - x2min;
                                fy = y2 - y2min;
+                               gx = 1.0 - fx;
+                               gy = 1.0 - fy;
 
-                               INTERPOLATE (r, r00, r01, r10, r11, fx, fy);
-                               INTERPOLATE (g, g00, g01, g10, g11, fx, fy);
-                               INTERPOLATE (b, b00, b01, b10, b11, fx, fy);
-                               INTERPOLATE (a, a00, a01, a10, a11, fx, fy);
+                               INTERPOLATE (r, r00, r01, r10, r11);
+                               INTERPOLATE (g, g00, g01, g10, g11);
+                               INTERPOLATE (b, b00, b01, b10, b11);
+                               INTERPOLATE (a, a00, a01, a10, a11);
 
                                pixel = CAIRO_RGBA_TO_UINT32 (r, g, b, a);
                                memcpy (p_new2, &pixel, sizeof (guint32));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/file_tools/data/ui/sharpen-options.ui 
new/gthumb-3.12.9/extensions/file_tools/data/ui/sharpen-options.ui
--- old/gthumb-3.12.8.2/extensions/file_tools/data/ui/sharpen-options.ui        
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/file_tools/data/ui/sharpen-options.ui  
2026-01-23 08:54:29.000000000 +0100
@@ -26,6 +26,21 @@
                     <property name="can_focus">False</property>
                     <property name="orientation">vertical</property>
                     <child>
+                      <object class="GtkHBox" id="preview_hbox">
+                        <property name="height_request">300</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
                       <object class="GtkCheckButton" id="preview_checkbutton">
                         <property name="label" 
translatable="yes">_Preview</property>
                         <property name="use_action_appearance">False</property>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/file_tools/gth-file-tool-sharpen.c 
new/gthumb-3.12.9/extensions/file_tools/gth-file-tool-sharpen.c
--- old/gthumb-3.12.8.2/extensions/file_tools/gth-file-tool-sharpen.c   
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/file_tools/gth-file-tool-sharpen.c     
2026-01-23 08:54:29.000000000 +0100
@@ -43,6 +43,10 @@
        gboolean            show_preview;
        cairo_surface_t    *preview_source;
        cairo_surface_t    *original_source;
+       cairo_surface_t    *scaled_source;
+       GtkWidget          *preview;
+       gboolean            image_centered;
+       GtkWidget          *image_navigator;
 };
 
 
@@ -123,10 +127,13 @@
                g_source_remove (self->priv->apply_event);
                self->priv->apply_event = 0;
        }
+       GthImageViewer *preview = GTH_IMAGE_VIEWER (self->priv->preview);
        if (self->priv->show_preview) {
-               cairo_surface_destroy (self->priv->preview_source);
-               self->priv->preview_source = _cairo_image_surface_copy 
(self->priv->original_source);
                SharpenData *sharpen_data = sharpen_data_new (self);
+
+               // Big preview
+               cairo_surface_destroy (self->priv->preview_source);
+               self->priv->preview_source = _cairo_image_surface_copy 
(self->priv->scaled_source);
                _cairo_image_surface_sharpen (self->priv->preview_source,
                        sharpen_data->radius,
                        sharpen_data->amount,
@@ -134,11 +141,42 @@
                        NULL);
                gth_preview_tool_set_image (GTH_PREVIEW_TOOL 
(self->priv->preview_tool), self->priv->preview_source);
 
+               // Small preview
+               int x, y;
+               gth_image_viewer_get_scroll_offset (preview, &x, &y);
+               int w = MIN (gtk_adjustment_get_page_size (preview->hadj), 
cairo_image_surface_get_width (self->priv->original_source));
+               int h = MIN (gtk_adjustment_get_page_size (preview->vadj), 
cairo_image_surface_get_height (self->priv->original_source));
+               if ((w < 0) || (h < 0))
+                       return FALSE;
+
+               cairo_surface_t *destination = _cairo_image_surface_copy 
(self->priv->original_source);
+               _cairo_image_surface_copy_metadata 
(self->priv->original_source, destination);
+
+               cairo_surface_t *preview_surface = 
_cairo_image_surface_copy_subsurface (destination, x, y, w, h);
+               if (preview_surface != NULL) {
+                       _cairo_image_surface_sharpen (preview_surface,
+                               sharpen_data->radius,
+                               sharpen_data->amount,
+                               sharpen_data->threshold,
+                               NULL);
+
+                       cairo_t *cr = cairo_create (destination);
+                       cairo_set_source_surface (cr, preview_surface, x, y);
+                       cairo_rectangle (cr, x, y, w, h);
+                       cairo_fill (cr);
+                       cairo_destroy (cr);
+               }
+               gth_image_viewer_set_surface (preview, destination, -1, -1);
+
+               cairo_surface_destroy (preview_surface);
+               cairo_surface_destroy (destination);
                sharpen_data_free (sharpen_data);
        }
        else {
-               gth_preview_tool_set_image (GTH_PREVIEW_TOOL 
(self->priv->preview_tool), self->priv->original_source);
+               gth_preview_tool_set_image (GTH_PREVIEW_TOOL 
(self->priv->preview_tool), self->priv->scaled_source);
+               gth_image_viewer_set_surface (preview, 
self->priv->original_source, -1, -1);
        }
+       gtk_widget_queue_resize (self->priv->image_navigator);
        return FALSE;
 }
 
@@ -163,6 +201,17 @@
        apply_cb (self);
 }
 
+static void
+preview_size_allocate_cb (GtkWidget    *widget,
+                         GdkRectangle *allocation,
+                         gpointer      user_data)
+{
+       GthFileToolSharpen *self = user_data;
+       if (self->priv->image_centered || gth_image_viewer_is_void 
(GTH_IMAGE_VIEWER (self->priv->preview)))
+               return;
+       gth_image_viewer_scroll_to_center (GTH_IMAGE_VIEWER 
(self->priv->preview));
+       self->priv->image_centered = TRUE;
+}
 
 static GtkWidget *
 gth_file_tool_sharpen_get_options (GthFileTool *base)
@@ -170,12 +219,15 @@
        GthFileToolSharpen *self = (GthFileToolSharpen *) base;
 
        _cairo_clear_surface (&self->priv->original_source);
+       _cairo_clear_surface (&self->priv->scaled_source);
        _cairo_clear_surface (&self->priv->preview_source);
 
        cairo_surface_t *source = gth_image_viewer_page_tool_get_source 
(GTH_IMAGE_VIEWER_PAGE_TOOL (self));
        if (source == NULL)
                return NULL;
 
+       self->priv->original_source = cairo_surface_reference (source);
+
        GtkWidget *window = gth_file_tool_get_window (base);
        GthViewerPage *viewer_page = gth_browser_get_viewer_page (GTH_BROWSER 
(window));
        if (! GTH_IS_IMAGE_VIEWER_PAGE (viewer_page))
@@ -186,18 +238,32 @@
        GtkAllocation allocation;
        gtk_widget_get_allocation (GTK_WIDGET (viewer), &allocation);
        if (scale_keeping_ratio (&width, &height, PREVIEW_SIZE * 
allocation.width, PREVIEW_SIZE * allocation.height, FALSE))
-               self->priv->original_source = _cairo_image_surface_scale_fast 
(source, width, height);
+               self->priv->scaled_source = _cairo_image_surface_scale_fast 
(source, width, height);
        else
-               self->priv->original_source = cairo_surface_reference (source);
+               self->priv->scaled_source = cairo_surface_reference (source);
 
        self->priv->builder = _gtk_builder_new_from_file ("sharpen-options.ui", 
"file_tools");
        GtkWidget *options = _gtk_builder_get_widget (self->priv->builder, 
"options");
        gtk_widget_show (options);
 
        self->priv->preview_tool = gth_preview_tool_new ();
-       gth_preview_tool_set_image (GTH_PREVIEW_TOOL 
(self->priv->preview_tool), self->priv->original_source);
+       gth_preview_tool_set_image (GTH_PREVIEW_TOOL 
(self->priv->preview_tool), self->priv->scaled_source);
        gth_image_viewer_set_tool (GTH_IMAGE_VIEWER (viewer), 
self->priv->preview_tool);
 
+       self->priv->preview = gth_image_viewer_new ();
+       gth_image_viewer_set_reset_scrollbars (GTH_IMAGE_VIEWER 
(self->priv->preview), FALSE);
+       gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->preview), 
GTH_FIT_NONE);
+       gth_image_viewer_set_zoom_change (GTH_IMAGE_VIEWER 
(self->priv->preview), GTH_ZOOM_CHANGE_KEEP_PREV);
+       gth_image_viewer_set_zoom (GTH_IMAGE_VIEWER (self->priv->preview), 1.0);
+       gth_image_viewer_set_zoom_enabled (GTH_IMAGE_VIEWER 
(self->priv->preview), FALSE);
+       gth_image_viewer_set_surface (GTH_IMAGE_VIEWER (self->priv->preview), 
self->priv->preview_source, -1, -1);
+
+       self->priv->image_navigator = gth_image_navigator_new (GTH_IMAGE_VIEWER 
(self->priv->preview));
+       gtk_widget_show_all (self->priv->image_navigator);
+       gtk_box_pack_start (GTK_BOX (GET_WIDGET ("preview_hbox")), 
self->priv->image_navigator, TRUE, TRUE, 0);
+
+       self->priv->image_centered = FALSE;
+
        self->priv->amount_adj = gth_color_scale_label_new (GET_WIDGET 
("amount_hbox"),
                                                            GTK_LABEL 
(GET_WIDGET ("amount_label")),
                                                            
GTH_COLOR_SCALE_DEFAULT,
@@ -227,7 +293,19 @@
                          "clicked",
                          G_CALLBACK (preview_checkbutton_toggled_cb),
                          self);
-
+       g_signal_connect (self->priv->preview,
+                         "size-allocate",
+                         G_CALLBACK (preview_size_allocate_cb),
+                         self);
+       g_signal_connect (GTH_IMAGE_VIEWER (self->priv->preview)->hadj,
+                       "value-changed",
+                       G_CALLBACK (value_changed_cb),
+                       self);
+       g_signal_connect (GTH_IMAGE_VIEWER (self->priv->preview)->vadj,
+                       "value-changed",
+                       G_CALLBACK (value_changed_cb),
+                       self);
+       value_changed_cb (NULL, self);
        return options;
 }
 
@@ -251,6 +329,7 @@
 
        _g_clear_object (&self->priv->builder);
        _cairo_clear_surface (&self->priv->original_source);
+       _cairo_clear_surface (&self->priv->scaled_source);
        _cairo_clear_surface (&self->priv->preview_source);
 }
 
@@ -374,11 +453,11 @@
        self->priv->builder = NULL;
        self->priv->show_preview = TRUE;
        self->priv->original_source = NULL;
+       self->priv->scaled_source = NULL;
        self->priv->preview_source = NULL;
 
        gth_file_tool_construct (GTH_FILE_TOOL (self),
                                 "image-sharpen-symbolic",
                                 _("Enhance Focus"),
                                 GTH_TOOLBOX_SECTION_COLORS);
-       gth_file_tool_set_zoomable (GTH_FILE_TOOL (self), TRUE);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/file_tools/gth-image-rotator.c 
new/gthumb-3.12.9/extensions/file_tools/gth-image-rotator.c
--- old/gthumb-3.12.8.2/extensions/file_tools/gth-image-rotator.c       
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/file_tools/gth-image-rotator.c 2026-01-23 
08:54:29.000000000 +0100
@@ -465,7 +465,6 @@
                cairo_save (cr);
                cairo_set_antialias (cr, CAIRO_ANTIALIAS_DEFAULT);
                cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
-               cairo_restore (cr);
 
                center.x = self->priv->center.x * self->priv->preview_zoom + 
self->priv->preview_image_area.x;
                center.y = self->priv->center.y * self->priv->preview_zoom + 
self->priv->preview_image_area.y;
@@ -475,6 +474,7 @@
                paint_point (self, cr, &self->priv->drag_p1);
                paint_point (self, cr, &self->priv->drag_p2);
                */
+               cairo_restore (cr);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/image_rotation/rotation-utils.c 
new/gthumb-3.12.9/extensions/image_rotation/rotation-utils.c
--- old/gthumb-3.12.8.2/extensions/image_rotation/rotation-utils.c      
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/image_rotation/rotation-utils.c        
2026-01-23 08:54:29.000000000 +0100
@@ -132,13 +132,20 @@
                return;
        }
 
+       const char *mime_type = gth_file_data_get_mime_type (tdata->file_data);
+       gboolean change_orientation_tag = !(tdata->flags & 
GTH_TRANSFORM_FLAG_CHANGE_IMAGE) &&
+               (g_content_type_equals (mime_type, "image/jpeg")
+                       || g_content_type_equals (mime_type, "image/tiff")
+                       || g_content_type_equals (mime_type, "image/webp"));
+       // Do not update the general attributes when 
exiv2_write_metadata_to_buffer is used
+       // to change the orientation.
+       gboolean update_general_attributes = !change_orientation_tag;
+
        // Read the exif orientation
-       if (!(tdata->flags & GTH_TRANSFORM_FLAG_SKIP_METADATA)) {
-               if (!exiv2_read_metadata_from_buffer (buffer, size, 
tdata->file_data->info, FALSE, &error)) {
-                       g_free (buffer);
-                       g_task_return_error (task, error);
-                       return;
-               }
+       if (!exiv2_read_metadata_from_buffer (buffer, size, 
tdata->file_data->info, update_general_attributes, &error)) {
+               g_free (buffer);
+               g_task_return_error (task, error);
+               return;
        }
 
        // Change orientation
@@ -172,16 +179,10 @@
        }
        g_free (raw_orientation);
 
-       const char *mime_type = gth_file_data_get_mime_type (tdata->file_data);
-       gboolean change_orientation_tag = !(tdata->flags & 
GTH_TRANSFORM_FLAG_CHANGE_IMAGE) &&
-               (g_content_type_equals (mime_type, "image/jpeg")
-                       || g_content_type_equals (mime_type, "image/tiff")
-                       || g_content_type_equals (mime_type, "image/webp"));
-
        if (change_orientation_tag) {
                // Change the exif orientation.
                update_exif_dimensions (tdata->file_data->info, 
tdata->transform);
-               if (!exiv2_write_metadata_to_buffer ((void **) &buffer, &size, 
tdata->file_data->info, NULL, &error)) {
+               if (!exiv2_write_metadata_to_buffer ((void **) &buffer, &size, 
tdata->file_data->info, update_general_attributes, NULL, &error)) {
                        g_free (buffer);
                        g_task_return_error (task, error);
                        return;
@@ -233,7 +234,7 @@
        // Save buffer to file.
        gboolean file_saved = _g_file_write (tdata->file_data->file,
                FALSE,
-               G_FILE_CREATE_REPLACE_DESTINATION,
+               G_FILE_CREATE_NONE,
                buffer,
                size,
                cancellable,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/gthumb-3.12.8.2/extensions/image_rotation/rotation-utils.h 
new/gthumb-3.12.9/extensions/image_rotation/rotation-utils.h
--- old/gthumb-3.12.8.2/extensions/image_rotation/rotation-utils.h      
2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/extensions/image_rotation/rotation-utils.h        
2026-01-23 08:54:29.000000000 +0100
@@ -29,9 +29,8 @@
 typedef enum {
        GTH_TRANSFORM_FLAG_DEFAULT = 0,
        GTH_TRANSFORM_FLAG_CHANGE_IMAGE = 1 << 0,
-       GTH_TRANSFORM_FLAG_SKIP_METADATA = 1 << 1,
-       GTH_TRANSFORM_FLAG_RESET = 1 << 2,
-       GTH_TRANSFORM_FLAG_ALWAYS_SAVE = 1 << 3,
+       GTH_TRANSFORM_FLAG_RESET = 1 << 1,
+       GTH_TRANSFORM_FLAG_ALWAYS_SAVE = 1 << 2,
 } GthTransformFlags;
 
 GthTransform   get_next_transformation         (GthTransform  original,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/gthumb/glib-utils.c 
new/gthumb-3.12.9/gthumb/glib-utils.c
--- old/gthumb-3.12.8.2/gthumb/glib-utils.c     2025-11-30 20:56:01.000000000 
+0100
+++ new/gthumb-3.12.9/gthumb/glib-utils.c       2026-01-23 08:54:29.000000000 
+0100
@@ -1773,6 +1773,22 @@
 }
 
 
+GDateTime *
+_g_file_info_get_changed_time (GFileInfo *info)
+{
+       if (!g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_CHANGED)) {
+               return NULL;
+       }
+       GDateTime *date_time = g_date_time_new_from_unix_utc 
(g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_CHANGED));
+       if (g_file_info_has_attribute (info, 
G_FILE_ATTRIBUTE_TIME_CHANGED_USEC)) {
+               GDateTime *tmp_time = g_date_time_add (date_time, 
g_file_info_get_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_CHANGED_USEC));
+               g_date_time_unref (date_time);
+               date_time = tmp_time;
+       }
+       return date_time;
+}
+
+
 const char *
 _g_content_type_guess_from_name (const char *filename)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/gthumb/glib-utils.h 
new/gthumb-3.12.9/gthumb/glib-utils.h
--- old/gthumb-3.12.8.2/gthumb/glib-utils.h     2025-11-30 20:56:01.000000000 
+0100
+++ new/gthumb-3.12.9/gthumb/glib-utils.h       2026-01-23 08:54:29.000000000 
+0100
@@ -59,6 +59,8 @@
        "time::created-usec," \
        "time::modified," \
        "time::modified-usec," \
+       "time::changed," \
+       "time::changed-usec," \
        "access::*" \
        rest
 
@@ -288,6 +290,7 @@
                                                (GFileInfo       *info);
 void           _g_file_info_update             (GFileInfo       *dest_info,
                                                 GFileInfo       *src_info);
+GDateTime *    _g_file_info_get_changed_time   (GFileInfo       *info);
 
 /* MIME type utils */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/gthumb/gth-image.c 
new/gthumb-3.12.9/gthumb/gth-image.c
--- old/gthumb-3.12.8.2/gthumb/gth-image.c      2025-11-30 20:56:01.000000000 
+0100
+++ new/gthumb-3.12.9/gthumb/gth-image.c        2026-01-23 08:54:29.000000000 
+0100
@@ -481,6 +481,8 @@
 /* -- gth_image_apply_icc_profile -- */
 
 
+#if HAVE_LCMS2
+
 static gboolean
 gth_image_apply_tranform (GthImage *image,
                          GthICCTransform *transform,
@@ -513,6 +515,8 @@
        return applied;
 }
 
+#endif
+
 
 gboolean
 gth_image_apply_icc_profile (GthImage      *image,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/gthumb/gth-metadata-provider.c 
new/gthumb-3.12.9/gthumb/gth-metadata-provider.c
--- old/gthumb-3.12.8.2/gthumb/gth-metadata-provider.c  2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/gthumb/gth-metadata-provider.c    2026-01-23 
08:54:29.000000000 +0100
@@ -366,6 +366,7 @@
 
        wmd = g_new0 (WriteMetadataData, 1);
        wmd->files = _g_object_list_ref (files);
+       wmd->flags = flags;
        wmd->attributes = g_strdup (attributes);
        wmd->attributes_v = gth_main_get_metadata_attributes (attributes);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/gthumb/gth-metadata-provider.h 
new/gthumb-3.12.9/gthumb/gth-metadata-provider.h
--- old/gthumb-3.12.8.2/gthumb/gth-metadata-provider.h  2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/gthumb/gth-metadata-provider.h    2026-01-23 
08:54:29.000000000 +0100
@@ -30,8 +30,8 @@
 G_BEGIN_DECLS
 
 typedef enum {
-       GTH_METADATA_WRITE_DEFAULT        = 0,
-       GTH_METADATA_WRITE_FORCE_EMBEDDED = (1 << 0)
+       GTH_METADATA_WRITE_DEFAULT      = 0,
+       GTH_METADATA_WRITE_NOT_MODIFIED = (1 << 0)
 } GthMetadataWriteFlags;
 
 #define GTH_TYPE_METADATA_PROVIDER (gth_metadata_provider_get_type ())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/gthumb/gth-save-file-data-task.c 
new/gthumb-3.12.9/gthumb/gth-save-file-data-task.c
--- old/gthumb-3.12.8.2/gthumb/gth-save-file-data-task.c        2025-11-30 
20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/gthumb/gth-save-file-data-task.c  2026-01-23 
08:54:29.000000000 +0100
@@ -109,7 +109,7 @@
 
        files = g_list_prepend (NULL, file);
        _g_write_metadata_async (files,
-                                GTH_METADATA_WRITE_DEFAULT,
+                                GTH_METADATA_WRITE_NOT_MODIFIED,
                                 self->priv->attributes,
                                 gth_task_get_cancellable (GTH_TASK (self)),
                                 write_metadata_ready_cb,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gthumb-3.12.8.2/meson.build 
new/gthumb-3.12.9/meson.build
--- old/gthumb-3.12.8.2/meson.build     2025-11-30 20:56:01.000000000 +0100
+++ new/gthumb-3.12.9/meson.build       2026-01-23 08:54:29.000000000 +0100
@@ -1,6 +1,6 @@
 project('gthumb', ['c', 'cpp'],
   license : 'GPL2+',
-  version : '3.12.8.2',
+  version : '3.12.9',
   meson_version : '>=0.59'
 )
 

++++++ gthumb.obsinfo ++++++
--- /var/tmp/diff_new_pack.g97a5A/_old  2026-01-26 11:05:47.490703451 +0100
+++ /var/tmp/diff_new_pack.g97a5A/_new  2026-01-26 11:05:47.494703618 +0100
@@ -1,5 +1,5 @@
 name: gthumb
-version: 3.12.8.2
-mtime: 1764532561
-commit: b3405b2dd0dae152847fe3fb08358423b70287d3
+version: 3.12.9
+mtime: 1769154869
+commit: b1490527e8638611da65fcf0431bf58e07d23286
 

Reply via email to