Skip to content

Quick copy "disk folders" mode, file grouping, configurable EXIF fields and natural sort fix - #665

Open
bitblaster wants to merge 5 commits into
easymodo:masterfrom
bitblaster:master
Open

Quick copy "disk folders" mode, file grouping, configurable EXIF fields and natural sort fix#665
bitblaster wants to merge 5 commits into
easymodo:masterfrom
bitblaster:master

Conversation

@bitblaster

Copy link
Copy Markdown

Four improvements, built on top of each other:

1. "Disk folders" mode for the quick copy/move panel

Pressing 0 now toggles the panel between the configured shortcut folders
(1-9) and the first 9 subfolders of the current image's directory, so files
can be quickly filed into siblings of the folder being viewed without
preconfiguring them. The last used mode is remembered across restarts.
Also fixes a latent bug in MenuItem where its internal QHBoxLayout was
a plain member handed to setLayout(), which expects a heap-allocated
layout it can delete itself — this only surfaced now that CopyOverlay
rebuilds its row widgets at runtime instead of just once at construction.

2. Group files sharing a base name (e.g. RAW+JPEG+XMP) into a single entry

Adds an opt-in "grouping" mode (Settings → General) that collapses files
with the same base name but different extensions (RAW+JPEG pairs, XMP
sidecars, etc.) into one directory entry, picking a representative file by
a configurable extension priority list.
File operations (rename, move,
copy, delete) performed on the representative are applied to every file in
the group, and the UI (title bar, thumbnails) shows a "+ ext + ext" suffix
for grouped entries.

3. Configurable EXIF info fields, prefer DateTimeOriginal

Preferences → View now has an EXIF info fields table (checkboxes + move
up/down) to choose which EXIF tags are shown in the image info panel and in what order, instead of the previous fixed alphabetical list.
Extracts several additional fields (lens ID/range, exposure compensation,
computed light value, focus mode, orientation, GPS position, software) and
prefers DateTimeOriginal/DateTimeDigitized over the file-modification
DateTime tag.
The info overlay's name column now sizes itself to the
widest rendered label, values wrap instead of being clipped, and the
overlay is no longer capped at a fixed width, since the new labels/values
are often longer than before.

4. Fix natural sort order to match most file managers (e.g. Dolphin)

QCollator's locale-aware (ICU) collation weighs punctuation in ways that
don't match plain ASCII order, and can rank _ below . or even below
digits. Comparing a full "name+extension" string in one go could therefore
place e.g. photo_01.tif before photo.jpg, or img_2013.jpg before
img006.jpg, unlike most file managers.

Splitting the extension off before comparing (the same approach used by
Dolphin's KFileItemModel) avoids ever comparing . against _ or a digit
in these cases, restoring the expected natural-sort ordering.

Preferences > View now has an EXIF info fields table (checkboxes +
move up/down) to choose which EXIF tags are shown in the image info
panel (I key) and in what order, instead of the previous fixed
alphabetical list. The Date/Time field also now prefers
Exif.Photo.DateTimeOriginal over Exif.Image.DateTime (ModifyDate)
when both are present.
Pressing "0" now toggles the panel between the configured shortcut
folders (1-9) and the first 9 subfolders of the current image's
directory, so files can be quickly filed into siblings of the folder
being viewed without preconfiguring them. The last used mode is
remembered across restarts (Settings::savedPathsDiskMode).

Along the way, fixed a latent bug in MenuItem where its internal
QHBoxLayout was a plain member handed to setLayout(), which expects
a heap-allocated layout it can delete itself - this only surfaced
now that CopyOverlay rebuilds its row widgets at runtime instead of
just once at construction.
Adds an opt-in "grouping" mode that collapses files with the same name
but different extensions (RAW+JPEG pairs, XMP sidecars, etc.) into one
directory entry, picking a representative file by a configurable
extension priority list. File operations (rename, move, copy, delete)
on the representative are applied to every file in the group, and the
UI (title bar, thumbnails) shows a "+ ext + ext" suffix for grouped
entries.
Extracts several additional fields from DocumentInfo (lens ID/range,
exposure compensation, computed light value, focus mode, orientation,
GPS position, software) and prefers DateTimeOriginal/DateTimeDigitized
over the file-modification DateTime tag. The info overlay's name
column now sizes itself to the widest rendered label, values wrap
instead of being clipped, and the overlay is no longer capped at a
fixed width, since the new labels/values are often longer than before.
…he base name

QCollator's locale-aware (ICU) collation weighs punctuation in ways
that don't match plain ASCII order, and can rank '_' below '.' or even
below digits. Comparing a full "name+extension" string in one go could
therefore place e.g. "photo_01.tif" before "photo.jpg", or "img_2013.jpg"
before "img006.jpg", unlike most file managers.

Splitting the extension off before comparing (the same approach used
by Dolphin's KFileItemModel) avoids ever comparing '.' against '_' or
a digit in these cases, restoring the expected natural-sort ordering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant