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-11-11 16:29:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gthumb (Old) and /work/SRC/openSUSE:Factory/.gthumb.new.3759290 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gthumb" Wed Nov 11 16:29:47 2026 rev:135 rq:1396861 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/gthumb/gthumb.changes 2026-11-02 16:40:04.620507285 +0100 +++ /work/SRC/openSUSE:Factory/.gthumb.new.3759290/gthumb.changes 2026-11-11 16:30:28.977843090 +0100 @@ -1,0 +2,9 @@ +Sun Nov 8 13:32:37 UTC 2026 - Bjørn Lie <[email protected]> + +- Update to version 4.0.2: + * Bugfixes: + + Import Files: fixed import process that never completes + + Import Files: fixed missing thumbnails + + Selection and Catalog: load next image after removing the current image + +------------------------------------------------------------------- Old: ---- gthumb-4.0.1.tar.xz gthumb-4.0.tar.xz New: ---- gthumb-4.0.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gthumb.spec ++++++ --- /var/tmp/diff_new_pack.mwlOXT/_old 2026-11-11 16:30:30.841921303 +0100 +++ /var/tmp/diff_new_pack.mwlOXT/_new 2026-11-11 16:30:30.843921387 +0100 @@ -17,7 +17,7 @@ Name: gthumb -Version: 4.0.1 +Version: 4.0.2 Release: 0 Summary: An Image Viewer and Browser for GNOME License: GPL-2.0-or-later ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.mwlOXT/_old 2026-11-11 16:30:30.903923904 +0100 +++ /var/tmp/diff_new_pack.mwlOXT/_new 2026-11-11 16:30:30.907924072 +0100 @@ -1,7 +1,7 @@ -mtime: 1793543661 -commit: e4c89a3f8d51b67d7a2ccfdbfafc7506478e2e6577ce2acdffefe172bb0467a7 +mtime: 1794144782 +commit: 42a56061a2a63844b18503c69a52fa8cdc17849cdddaf8886b312a4ccd4ae8f7 url: https://src.opensuse.org/GNOME/gthumb -revision: e4c89a3f8d51b67d7a2ccfdbfafc7506478e2e6577ce2acdffefe172bb0467a7 +revision: 42a56061a2a63844b18503c69a52fa8cdc17849cdddaf8886b312a4ccd4ae8f7 trackingbranch: factory projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj ++++++ _service ++++++ --- /var/tmp/diff_new_pack.mwlOXT/_old 2026-11-11 16:30:30.932925121 +0100 +++ /var/tmp/diff_new_pack.mwlOXT/_new 2026-11-11 16:30:30.936925289 +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">4.0.1</param> + <param name="revision">4.0.2</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">v?(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-11-08 14:33:02.000000000 +0100 @@ -0,0 +1,5 @@ +*.obscpio +*.osc +_build.* +.pbuild +osc-collab.* ++++++ gthumb-4.0.1.tar.xz -> gthumb-4.0.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/NEWS new/gthumb-4.0.2/NEWS --- old/gthumb-4.0.1/NEWS 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/NEWS 2026-11-08 12:13:20.000000000 +0100 @@ -1,3 +1,12 @@ +Version 4.0.2 +~~~~~~~~~~~~~ +Released: 2026-11-08 + +Bugfixes: + * Import Files: fixed import process that never completes + * Import Files: fixed missing thumbnails + * Selection and Catalog: load next image after removing the current image + Version 4.0.1 ~~~~~~~~~~~~~ Released: 2026-11-01 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/data/appdata/org.gnome.gthumb.metainfo.xml.in new/gthumb-4.0.2/data/appdata/org.gnome.gthumb.metainfo.xml.in --- old/gthumb-4.0.1/data/appdata/org.gnome.gthumb.metainfo.xml.in 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/data/appdata/org.gnome.gthumb.metainfo.xml.in 2026-11-08 12:13:20.000000000 +0100 @@ -69,6 +69,16 @@ </screenshot> </screenshots> <releases> + <release version="4.0.2" date="2026-11-08" type="stable"> + <description> + <p>This release fixes the following bugs:</p> + <ul> + <li>Import Files: fixed import process never completes</li> + <li>Import Files: fixed missing thumbnails</li> + <li>Selection and Catalog: load next image after removing the current image</li> + </ul> + </description> + </release> <release version="4.0.1" date="2026-11-01" type="stable"> <description> <p>This release adds the following features:</p> @@ -182,8 +192,5 @@ </kudos> <translation type="gettext">gthumb</translation> - <content_rating type="oars-1.1"> - <content_attribute id="social-info">mild</content_attribute> - <content_attribute id="social-audio">moderate</content_attribute> - </content_rating> + <content_rating type="oars-1.1" /> </component> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/meson.build new/gthumb-4.0.2/meson.build --- old/gthumb-4.0.1/meson.build 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/meson.build 2026-11-08 12:13:20.000000000 +0100 @@ -1,6 +1,6 @@ project('gthumb', [ 'vala', 'c', 'cpp' ], - version: '4.0.1', + version: '4.0.2', license: 'GPL2+', meson_version: '>=1.1.0' ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Browser.vala new/gthumb-4.0.2/src/Browser.vala --- old/gthumb-4.0.1/src/Browser.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Browser.vala 2026-11-08 12:13:20.000000000 +0100 @@ -1042,55 +1042,6 @@ action.activate.connect (() => reload ()); action_group.add_action (action); - action = new SimpleAction ("cut-files", null); - action.activate.connect (() => { - var files = file_grid.get_selected_files (); - window.cut_files_to_clipboard (files); - }); - action_group.add_action (action); - - action = new SimpleAction ("paste-files", null); - action.activate.connect (() => { - var local_job = window.new_job (_("Pasting Files"), JobFlags.FOREGROUND); - paste_files_from_clipboard.begin (folder_tree.current_folder.file, local_job, (_obj, res) => { - try { - paste_files_from_clipboard.end (res); - } - catch (Error error) { - window.show_error (error); - } - finally { - local_job.done (); - } - }); - }); - action_group.add_action (action); - - action = new SimpleAction ("duplicate-files", null); - action.activate.connect (() => { - if (!(folder_tree.current_source is FileSourceVfs)) { - window.show_error (new IOError.FAILED (_("Cannot move files here"))); - return; - } - var files = file_grid.get_selected_files (); - if (files.is_empty ()) { - return; - } - var local_job = window.new_job (_("Duplicating Files"), JobFlags.FOREGROUND); - window.file_manager.duplicate_files.begin (files, folder_tree.current_folder.file, local_job, (_obj, res) => { - try { - window.file_manager.duplicate_files.end (res); - } - catch (Error error) { - window.show_error (error); - } - finally { - local_job.done (); - } - }); - }); - action_group.add_action (action); - action = new SimpleAction ("file-list-select-all", null); action.activate.connect (() => { grid_model.select_all (); @@ -1109,44 +1060,12 @@ action.activate.connect (() => edit_file ()); action_group.add_action (action); - action = new SimpleAction ("add-to-catalog", null); - action.activate.connect (() => add_to_catalog.begin ()); - action_group.add_action (action); - - action = new SimpleAction ("remove-from-catalog", null); - action.activate.connect (() => remove_from_catalog ()); - action_group.add_action (action); - action = new SimpleAction.stateful ("reorder-files", null, new Variant.boolean (false)); action.activate.connect ((_action, _params) => { activate_reordering (Util.toggle_state (_action)); }); action_group.add_action (action); - action = new SimpleAction ("add-to-selection", VariantType.STRING); - action.activate.connect ((_action, _params) => { - add_to_selection (uint.parse (_params.get_string (), 10)); - }); - action_group.add_action (action); - - action = new SimpleAction ("remove-from-selection", VariantType.INT32); - action.activate.connect ((_action, _params) => { - remove_from_selection ((uint) _params.get_int32 ()); - }); - action_group.add_action (action); - - action = new SimpleAction ("remove-from-current-selection", null); - action.activate.connect ((_action, _params) => { - var is_selection = folder_tree.current_folder.file.has_uri_scheme ("selection"); - if (is_selection) { - var files = file_grid.get_selected_files (); - if (!files.is_empty ()) { - window.remove_files (files); - } - } - }); - action_group.add_action (action); - action = new SimpleAction ("open-selection", VariantType.INT32); action.activate.connect ((_action, _params) => { open_selection ((uint) _params.get_int32 ()); @@ -1229,9 +1148,9 @@ action = new SimpleAction ("paste", null); action.activate.connect ((_action, param) => { var local_job = window.new_job (_("Pasting Files"), JobFlags.FOREGROUND); - paste_files_from_clipboard.begin (folder_tree.context_file.file, local_job, (_obj, res) => { + window.paste_files_from_clipboard.begin (folder_tree.context_file.file, local_job, (_obj, res) => { try { - paste_files_from_clipboard.end (res); + window.paste_files_from_clipboard.end (res); } catch (Error error) { window.show_error (error); @@ -1902,6 +1821,7 @@ file_filter.after_removing_files (); update_total_files (); update_selection_info (); + window.viewer.files_removed_from_catalog (files); } } @@ -2087,37 +2007,6 @@ } } - async void paste_files_from_clipboard (File destination, Job job) throws Error { - unowned var clipboard = get_clipboard (); - unowned string mime_type; - var stream = yield clipboard.read_async ( - { "text/uri-list", "gthumb/cut-files" }, - Priority.DEFAULT, - job.cancellable, - out mime_type); - var bytes = yield Files.read_all_async (stream, job.cancellable); - unowned var data_as_string = (string) bytes.get_data (); - var text = data_as_string.substring (0, bytes.length); - //stdout.printf ("> text: '%s'\n", text); - //stdout.printf ("> type: '%s'\n", mime_type); - var uris = text.split_set ("\n\r"); - var files = new GenericList<File> (); - foreach (unowned var uri in uris) { - //stdout.printf ("> URI: %s\n", uri); - files.model.append (File.new_for_uri (uri)); - } - var source = app.get_source_for_file (destination); - if (mime_type == "gthumb/cut-files") { - if (!(source is FileSourceVfs)) { - throw new IOError.FAILED (_("Cannot move files here")); - } - yield window.file_manager.move_files (files, destination, job); - } - else { - yield source.add_files (window, destination, files, job); - } - } - public async void metadata_changed (File changed_file) { // stdout.printf ("> BROWSER: METADATA CHANGED: %s\n", changed_file.get_uri ()); var iter = folder_tree.current_children.iterator (); @@ -2352,40 +2241,6 @@ } } - async void add_to_catalog () { - var files = file_grid.get_selected_files (); - if (files.is_empty ()) { - return; - } - var local_job = window.new_job ("Add to Catalog"); - try { - var selector = new Gth.FolderSelector (FolderSelectorMode.CATALOGS_ONLY | FolderSelectorMode.FOR_COPYING); - selector.show_destination = app.settings.get_boolean (PREF_BROWSER_ADD_TO_CATALOG_SHOW_DESTINATION); - var last_catalog = Settings.get_file (app.settings, PREF_BROWSER_LAST_CATALOG); - var catalog_file = yield selector.select_folder (window, last_catalog, local_job); - yield Catalog.add_files (catalog_file, files, local_job); - app.settings.set_string (PREF_BROWSER_LAST_CATALOG, catalog_file.get_uri ()); - app.settings.set_boolean (PREF_BROWSER_ADD_TO_CATALOG_SHOW_DESTINATION, selector.show_destination); - if (selector.show_destination) { - yield open_location_async (catalog_file); - } - } - catch (Error error) { - window.show_error (error); - } - finally { - local_job.done (); - } - } - - void remove_from_catalog () { - var files = file_grid.get_selected_files (); - if (files.is_empty ()) { - return; - } - window.remove_files (files); - } - void activate_reordering (bool active) { file_grid.reordering = active; file_grid.view.enable_rubberband = !active; @@ -2481,26 +2336,6 @@ }); } - void add_to_selection (uint number) { - var files = file_grid.get_selected_files (); - if (files.is_empty ()) { - window.show_error (new IOError.FAILED (_("No files selected"))); - return; - } - var selection = app.selections.get_selection (number); - selection.add_files (files); - } - - void remove_from_selection (uint number) { - var files = file_grid.get_selected_files (); - if (files.is_empty ()) { - window.show_error (new IOError.FAILED (_("No files selected"))); - return; - } - var selection = app.selections.get_selection (number); - selection.remove_files (files); - } - WindowState state = null; void open_selection (uint number) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/DefaultTests.vala new/gthumb-4.0.2/src/DefaultTests.vala --- old/gthumb-4.0.1/src/DefaultTests.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/DefaultTests.vala 2026-11-08 12:13:20.000000000 +0100 @@ -7,7 +7,7 @@ } public override bool match (FileData file) { - return file.info.get_is_hidden () == false; + return !(file.info.has_attribute (FileAttribute.STANDARD_IS_HIDDEN) && file.info.get_is_hidden ()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Dialogs/FolderSelector.vala new/gthumb-4.0.2/src/Dialogs/FolderSelector.vala --- old/gthumb-4.0.1/src/Dialogs/FolderSelector.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Dialogs/FolderSelector.vala 2026-11-08 12:13:20.000000000 +0100 @@ -134,32 +134,37 @@ [GtkCallback] void on_select (Gtk.Button button) { - try_select_folder (folder_tree.get_selected_file_data ()); - } - - void try_select_folder (FileData file_data) { try { - if (file_data == null) { - throw new IOError.FAILED (_("No file selected")); - } - if (FolderSelectorMode.FOR_COPYING in mode) { - if (file_data.info.get_content_type () == "gthumb/library") { - // Cannot copy to libraries. - throw new IOError.FAILED (_("Invalid location")); - } - show_destination = show_destination_switch.active; - } - selected_folder = file_data.file; - selected (); + try_select_folder (folder_tree.get_selected_file_data ()); } catch (Error error) { show_message (error.message); } } + void try_select_folder (FileData file_data) throws Error { + if (file_data == null) { + throw new IOError.FAILED (_("No file selected")); + } + if (FolderSelectorMode.FOR_COPYING in mode) { + if (file_data.info.get_content_type () == "gthumb/library") { + // Cannot copy to libraries. + throw new IOError.FAILED (_("Invalid location")); + } + show_destination = show_destination_switch.active; + } + selected_folder = file_data.file; + selected (); + } + async void load_folder (FileData location, LoadAction load_action) throws Error { if (load_action == LoadAction.OPEN_AS_ROOT) { - try_select_folder (location); + try { + try_select_folder (location); + } + catch (Error error) { + // Ignored + } return; } yield folder_tree.load_folder (location.file, load_action); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Ext/Catalogs/Catalog.vala new/gthumb-4.0.2/src/Ext/Catalogs/Catalog.vala --- old/gthumb-4.0.1/src/Ext/Catalogs/Catalog.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Ext/Catalogs/Catalog.vala 2026-11-08 12:13:20.000000000 +0100 @@ -260,7 +260,7 @@ break; case "name": - name = child.get_inner_text (); + name = child.get_inner_text () ?? ""; break; } } @@ -276,9 +276,7 @@ public void save_catalog_to_doc (Dom.Element root) { // Name - if (name != null) { - root.append_child (new Dom.Element.with_text ("name", name)); - } + root.append_child (new Dom.Element.with_text ("name", name ?? "")); // Date if (date.is_valid ()) { @@ -317,16 +315,19 @@ // Display name var display_name = new StringBuilder (); - if (name != null) { + var with_name = !Strings.empty (name); + if (with_name) { display_name.append (name); } if (date.is_valid ()) { - if (display_name.len > 0) { - display_name.append (" "); + if (with_name) { + display_name.append (" ("); + display_name.append (date.to_display_string ()); + display_name.append (")"); + } + else { + display_name.append (date.to_display_string ()); } - display_name.append ("("); - display_name.append (date.to_display_string ()); - display_name.append (")"); } if ((display_name.len == 0) && (file != null)) { try { @@ -377,11 +378,16 @@ public async void save_async (Cancellable cancellable) throws Error { var previous_file = file; - // Update file - var extension = Util.get_extension (file.get_basename ()); - var filename = Util.clear_for_filename (name) + "." + extension; - var parent = file.get_parent (); - file = parent.get_child_for_display_name (filename); + if (!Strings.empty (name)) { + // Update file from name + var extension = Util.get_extension (file.get_basename ()); + var filename = Util.clear_for_filename (name) + "." + extension; + var parent = file.get_parent (); + file = parent.get_child_for_display_name (filename); + } + else if (file == null) { + throw new IOError.FAILED ("Catalog has no file"); + } // Save var gio_file = Catalog.to_gio_file (file); @@ -390,7 +396,7 @@ yield Files.save_file_async (gio_file, bytes, cancellable); // Delete the previous file if different - if (!file.equal (previous_file)) { + if ((previous_file != null) && !file.equal (previous_file)) { try { var previous_gio_file = Catalog.to_gio_file (previous_file); yield previous_gio_file.delete_async (Priority.DEFAULT, cancellable); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Ext/Catalogs/FileSourceCatalogs.vala new/gthumb-4.0.2/src/Ext/Catalogs/FileSourceCatalogs.vala --- old/gthumb-4.0.1/src/Ext/Catalogs/FileSourceCatalogs.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Ext/Catalogs/FileSourceCatalogs.vala 2026-11-08 12:13:20.000000000 +0100 @@ -70,7 +70,9 @@ if (info_list == null) break; foreach (var info in info_list) { - if (info.get_is_hidden ()) { + if (info.has_attribute (FileAttribute.STANDARD_IS_HIDDEN) + && info.get_is_hidden ()) + { continue; } if (cancellable.is_cancelled ()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Ext/Import/ImportFiles.vala new/gthumb-4.0.2/src/Ext/Import/ImportFiles.vala --- old/gthumb-4.0.1/src/Ext/Import/ImportFiles.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Ext/Import/ImportFiles.vala 2026-11-08 12:13:20.000000000 +0100 @@ -65,7 +65,9 @@ yield source.foreach_child (folder, flags, attributes.str, job.cancellable, (child, is_parent) => { var action = ForEachAction.CONTINUE; if (is_parent) { - if (child.info.get_is_hidden ()) { + if (child.info.has_attribute (FileAttribute.STANDARD_IS_HIDDEN) + && child.info.get_is_hidden ()) + { action = ForEachAction.SKIP; } else { @@ -105,6 +107,7 @@ var thumbnailer = new Thumbnailer.for_window (window); thumbnailer.save_to_cache = false; + thumbnailer.set_active (true); file_grid.thumbnailer = thumbnailer; file_grid.thumbnail_size = window.browser.file_grid.thumbnail_size; //Thumbnailer.Size.NORMAL.to_pixels (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Ext/Import/SelectDevice.vala new/gthumb-4.0.2/src/Ext/Import/SelectDevice.vala --- old/gthumb-4.0.1/src/Ext/Import/SelectDevice.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Ext/Import/SelectDevice.vala 2026-11-08 12:13:20.000000000 +0100 @@ -61,6 +61,7 @@ devices.model.remove_all (); var current_folder_included = false; var mountable = new GenericList<FileData>(); + var current_folder = window.browser.folder_tree.current_folder?.file; FileSourceVfs.add_mountable_volumes (mountable); foreach (var file_data in mountable) { var action = new ActionInfo ( @@ -70,12 +71,12 @@ file_data.info.get_symbolic_icon () ); devices.model.append (action); - if (file_data.file.equal (window.browser.folder_tree.current_folder.file)) { + if ((current_folder != null) && file_data.file.equal (current_folder)) { current_folder_included = true; } } - if (!current_folder_included) { - devices.model.append (new ActionInfo.for_file ("", window.browser.folder_tree.current_folder.file)); + if (!current_folder_included && (current_folder != null)) { + devices.model.append (new ActionInfo.for_file ("", current_folder)); } device_group.visible = devices.length () > 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Ext/Search/UpdateSearch.vala new/gthumb-4.0.2/src/Ext/Search/UpdateSearch.vala --- old/gthumb-4.0.1/src/Ext/Search/UpdateSearch.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Ext/Search/UpdateSearch.vala 2026-11-08 12:13:20.000000000 +0100 @@ -60,7 +60,10 @@ yield source.foreach_child (folder.folder, flags, all_attr, job.cancellable, (child, is_parent) => { var action = ForEachAction.CONTINUE; if (is_parent) { - if (child.info.get_is_hidden () && !include_hidden) { + if (child.info.has_attribute (FileAttribute.STANDARD_IS_HIDDEN) + && child.info.get_is_hidden () + && !include_hidden) + { action = ForEachAction.SKIP; } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/FolderTree.vala new/gthumb-4.0.2/src/FolderTree.vala --- old/gthumb-4.0.1/src/FolderTree.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/FolderTree.vala 2026-11-08 12:13:20.000000000 +0100 @@ -478,7 +478,10 @@ var folders = new GenericList<FileData> (); foreach (unowned var file in all_children) { if (file.info.get_file_type () == FileType.DIRECTORY) { - if (!_show_hidden && file.info.get_is_hidden ()) { + if (!_show_hidden + && file.info.has_attribute (FileAttribute.STANDARD_IS_HIDDEN) + && file.info.get_is_hidden ()) + { continue; } if (skip_nochild_folders && file.info.get_attribute_boolean ("gthumb::no-child")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/MainWindow.vala new/gthumb-4.0.2/src/MainWindow.vala --- old/gthumb-4.0.1/src/MainWindow.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/MainWindow.vala 2026-11-08 12:13:20.000000000 +0100 @@ -547,6 +547,37 @@ clipboard.set_content (provider); } + public async void paste_files_from_clipboard (File destination, Job job) throws Error { + unowned var clipboard = get_clipboard (); + unowned string mime_type; + var stream = yield clipboard.read_async ( + { "text/uri-list", "gthumb/cut-files" }, + Priority.DEFAULT, + job.cancellable, + out mime_type); + var bytes = yield Files.read_all_async (stream, job.cancellable); + unowned var data_as_string = (string) bytes.get_data (); + var text = data_as_string.substring (0, bytes.length); + //stdout.printf ("> text: '%s'\n", text); + //stdout.printf ("> type: '%s'\n", mime_type); + var uris = text.split_set ("\n\r"); + var files = new GenericList<File> (); + foreach (unowned var uri in uris) { + //stdout.printf ("> URI: %s\n", uri); + files.model.append (File.new_for_uri (uri)); + } + var source = app.get_source_for_file (destination); + if (mime_type == "gthumb/cut-files") { + if (!(source is FileSourceVfs)) { + throw new IOError.FAILED (_("Cannot move files here")); + } + yield file_manager.move_files (files, destination, job); + } + else { + yield source.add_files (this, destination, files, job); + } + } + public void remove_files (GenericList<File> files) { var location = browser.folder_tree.current_folder.file; var source = app.get_source_for_file (location); @@ -624,6 +655,60 @@ }); } + async void add_to_catalog () { + var files = get_selected_files (); + if (files.is_empty ()) { + return; + } + var local_job = new_job ("Add to Catalog"); + try { + var selector = new Gth.FolderSelector (FolderSelectorMode.CATALOGS_ONLY | FolderSelectorMode.FOR_COPYING); + selector.show_destination = app.settings.get_boolean (PREF_BROWSER_ADD_TO_CATALOG_SHOW_DESTINATION); + var last_catalog = Settings.get_file (app.settings, PREF_BROWSER_LAST_CATALOG); + var catalog_file = yield selector.select_folder (this, last_catalog, local_job); + yield Catalog.add_files (catalog_file, files, local_job); + app.settings.set_string (PREF_BROWSER_LAST_CATALOG, catalog_file.get_uri ()); + app.settings.set_boolean (PREF_BROWSER_ADD_TO_CATALOG_SHOW_DESTINATION, selector.show_destination); + if (selector.show_destination) { + yield browser.open_location_async (catalog_file); + } + } + catch (Error error) { + show_error (error); + } + finally { + local_job.done (); + } + } + + void remove_from_catalog () { + var files = get_selected_files (); + if (files.is_empty ()) { + return; + } + remove_files (files); + } + + void add_to_selection (uint number) { + var files = get_selected_files (); + if (files.is_empty ()) { + show_error (new IOError.FAILED (_("No files selected"))); + return; + } + var selection = app.selections.get_selection (number); + selection.add_files (files); + } + + void remove_from_selection (uint number) { + var files = get_selected_files (); + if (files.is_empty ()) { + show_error (new IOError.FAILED (_("No files selected"))); + return; + } + var selection = app.selections.get_selection (number); + selection.remove_files (files); + } + public override void init_actions () { base.init_actions (); @@ -759,6 +844,31 @@ }); action_group.add_action (action); + action = new SimpleAction ("duplicate-files", null); + action.activate.connect (() => { + if (!(browser.folder_tree.current_source is FileSourceVfs)) { + show_error (new IOError.FAILED (_("Cannot move files here"))); + return; + } + var files = get_selected_files (); + if (files.is_empty ()) { + return; + } + var local_job = new_job (_("Duplicating Files"), JobFlags.FOREGROUND); + file_manager.duplicate_files.begin (files, browser.folder_tree.current_folder.file, local_job, (_obj, res) => { + try { + file_manager.duplicate_files.end (res); + } + catch (Error error) { + show_error (error); + } + finally { + local_job.done (); + } + }); + }); + action_group.add_action (action); + action = new SimpleAction ("exec-script", GLib.VariantType.STRING); action.activate.connect ((_action, param) => { var files = get_selected_files (); @@ -907,6 +1017,30 @@ }); action_group.add_action (action); + action = new SimpleAction ("cut-files", null); + action.activate.connect (() => { + var files = get_selected_files (); + cut_files_to_clipboard (files); + }); + action_group.add_action (action); + + action = new SimpleAction ("paste-files", null); + action.activate.connect (() => { + var local_job = new_job (_("Pasting Files"), JobFlags.FOREGROUND); + paste_files_from_clipboard.begin (browser.folder_tree.current_folder.file, local_job, (_obj, res) => { + try { + paste_files_from_clipboard.end (res); + } + catch (Error error) { + show_error (error); + } + finally { + local_job.done (); + } + }); + }); + action_group.add_action (action); + action = new SimpleAction ("view-script-output", null); action.activate.connect (() => { if (script_output != null) { @@ -994,6 +1128,42 @@ slideshow.present (); }); action_group.add_action (action); + + action = new SimpleAction ("add-to-catalog", null); + action.activate.connect (() => add_to_catalog.begin ()); + action_group.add_action (action); + + action = new SimpleAction ("remove-from-catalog", null); + action.activate.connect (() => remove_from_catalog ()); + action_group.add_action (action); + + action = new SimpleAction ("add-to-selection", VariantType.STRING); + action.activate.connect ((_action, _params) => { + add_to_selection (uint.parse (_params.get_string (), 10)); + }); + action_group.add_action (action); + + action = new SimpleAction ("remove-from-selection", VariantType.INT32); + action.activate.connect ((_action, _params) => { + remove_from_selection ((uint) _params.get_int32 ()); + }); + action_group.add_action (action); + + action = new SimpleAction ("remove-from-current-selection", null); + action.activate.connect ((_action, _params) => { + if (browser.folder_tree.current_folder != null) { + var selection = app.selections.get_selection_from_file (browser.folder_tree.current_folder.file); + if (selection != null) { + var files = get_selected_files (); + if (files.is_empty ()) { + show_error (new IOError.FAILED (_("No files selected"))); + return; + } + selection.remove_files (files); + } + } + }); + action_group.add_action (action); } async void exec_file_operation (string name, FileOperation operation, GenericList<File> files, Gth.Job? external_job = null) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gthumb-4.0.1/src/Viewer.vala new/gthumb-4.0.2/src/Viewer.vala --- old/gthumb-4.0.1/src/Viewer.vala 2026-11-01 08:40:48.000000000 +0100 +++ new/gthumb-4.0.2/src/Viewer.vala 2026-11-08 12:13:20.000000000 +0100 @@ -554,7 +554,7 @@ return selected_files; } - public void files_deleted_from_disk (GenericList<File> files) { + void files_removed_from_current_location (GenericList<File> files) { if (current_file == null) { return; } @@ -566,7 +566,21 @@ if (window.current_page == MainWindow.Page.BROWSER) { current_file = null; } - else if (!window.browser.view_position (position)) { + else { + reload_current_position (); + } + } + + public void files_deleted_from_disk (GenericList<File> files) { + files_removed_from_current_location (files); + } + + public void files_removed_from_catalog (GenericList<File> files) { + files_removed_from_current_location (files); + } + + public void reload_current_position () { + if (!window.browser.view_position (position)) { if (!window.browser.view_last_file ()) { window.set_page.begin (MainWindow.Page.BROWSER); } ++++++ gthumb.obsinfo ++++++ --- /var/tmp/diff_new_pack.mwlOXT/_old 2026-11-11 16:30:31.602953234 +0100 +++ /var/tmp/diff_new_pack.mwlOXT/_new 2026-11-11 16:30:31.606953402 +0100 @@ -1,5 +1,5 @@ name: gthumb -version: 4.0.1 -mtime: 1793518848 -commit: 7cd730b616178e52baea0a21376e9e617f3ffa55 +version: 4.0.2 +mtime: 1794136400 +commit: ae594c2d36bb733df32cc7c4b715eae89b6879c8
