Repository navigation
0.9.8: extract asks before replacing, image zoom, audio in the preview - #120
Closed
crustovsky wants to merge 7 commits into
Closed
crustovsky wants to merge 7 commits into
crustovsky wants to merge 7 commits into
Conversation
F5 inside an archive ran bsdtar straight into the destination, and bsdtar replaces what is there: silent data loss, no conflict bar, no policy for Unattended, one progress step, and an undo record that knew only the new top-level entries. bsdtar now unpacks into a hidden staging folder inside the destination (same filesystem), and the entries are moved into place by the item loop of a copy. That loop moved out of TransferJob into engine.h so both jobs drive it; a staged run moves but records what it placed as created, and names sources by their place in the archive. So an extract gets the conflict bar with every answer and "for all", merge into folders that exist, the policy set before the start, Unattended's skip and list, and an undo that trashes what was placed and restores what was replaced. While bsdtar runs, -v on a pipe is the progress: the open line names the member in flight, its size on disk is the current bytes, and the totals come from the listing the tab has. Pause stops the child (SIGSTOP), Abort kills it, Skip leaves out the member it was writing (bsdtar cannot be told, so it is written to the end and then dropped). Failures carry the member's name where bsdtar gives one. A folder the archive holds read-only could not be renamed out of the staging folder: it is opened for the move and gets its mode back where it lands. The staging folder is removed on every way out. Fixes #116 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The file is to stay under 350 lines and the jobs paragraph grew by one. "Extract and pack run bsdtar" still holds; how extract places what it unpacked is in the headers of extract.h and engine.h. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The image preview only fitted the picture to the slot, so it could not
say whether a photo is sharp, which is the question when culling a
folder with Insert and F8.
PreviewZoom (Ctrl+0, the View menu, the help) switches a previewed
image between fit and 100%, around the pointer when it is over the
picture, else around the middle. Over the preview the wheel zooms
around the pointer between fit and 400% and a drag pans; the keyboard
has no pan and focus never leaves the list. The level is told on the
details ("Dimensions: 6000 × 4000, shown at 100%"), nothing is drawn
over the picture.
The picture widget moved out of preview.cpp into imageview.cpp. The
fitted frame is about the slot's size (rule 16), so past its resolution
the view asks for the file at its own size: a second ImageLoader decodes
it, the fitted frame stays up scaled until it arrives, and at 100% and
above the file's pixels are shown unsmoothed. Only the shown file's full
frame is kept; going back to fit or leaving the file frees it, and a
reply for a file since left is dropped by the loader (rule 4).
core::fullFrameAllowed bounds a full frame at 256 MiB (64 megapixels)
in 64-bit arithmetic; larger images stay at the fitted frame, and the
loader refuses a frame that turns out larger than that.
Zoom and position carry over to the next image of the same pixel size,
so a burst is compared on one detail a key at a time. Another size, a
file that is not an image, or closing the preview goes back to fit.
Thumbnails, PDF pages and video frames only fit.
Ctrl+0 has no function key beside it: every Ctrl+F slot is taken, and
it sits with the other keys of the preview's content (Ctrl+P,
Ctrl+PgUp), which are chords as well.
Fixes #114
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An audio file in the preview showed its cover art or the generic type and dates, and nothing about it as sound; choosing among recordings or samples meant opening each in another app. The preview now adds what ffprobe says, read in a child: length, codec, sample rate, channels, bitrate, and the tags title, artist, album, track and year. Tags are text only: one line, control characters out, cut at 200 characters. Ctrl+P plays the file through ffplay (-nodisp -autoexit) in a child; Ctrl+P again stops it and keeps the place. The strip is the transport as for a video: playhead, position and length, and Ctrl+PgUp / Ctrl+PgDown seek by 10 s (ffplay takes no orders, so a seek while playing is a new child started with -ss). The position is the app's own clock from the second the child was started at. Nothing starts by itself. Moving the cursor, closing the preview, hiding its slot, leaving the folder or quitting kills the child; there is one preview per window, so one player. No volume, queue or device choice: that is the mixer's. Without ffmpeg the lines say which tool is missing. This narrows a non-goal on purpose: it was "sound or autoplay for video" and is now "autoplay, and sound for video". The reasons behind it hold: no decoder in the process (rule 8), nothing plays unasked, and video stays silent. The lines sit in the details block above the cover art, where every other kind's details are, not under the picture. Fixes #115 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tools/smoke.sh gains scripted sessions for the three changes of this release: F5 inside an archive onto a folder that has a member (the conflict bar answered with Skip, then Overwrite; no staging folder left), Ctrl+0 on a previewed image, and Ctrl+P on a previewed tone played to SDL's dummy driver, after which no ffplay may be left. clang-tidy (bugprone, cert, performance, clang-analyzer) on the new files: a reserve before a loop of push_back, a widening multiplication, llround for a rounded cast, unsigned mode masks, and the ffprobe entry list as one named string. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Re-rendered by tools/screenshots.sh on this tree, as before every release; the help shot with the version this becomes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The zoom carried over only to an image of exactly the same pixel size, so in any folder of mixed pictures (screenshots, downloads) every cursor move went back to fit and the level seemed not to be kept at all. The level the user chose now stays for the images that follow, whatever their size, at the same place in the picture as a fraction of it (which is the same pixel when the sizes match, so a burst is still compared on one detail). It ends when the key or the wheel goes back to fit, when something that is not an image is previewed, or when the preview closes. An image so large that the level is below its fit is fitted, and the level waits for the next one. Refs #114 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Owner
Author
|
Superseded by the tip PR that also carries video sound (#121). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The whole chain in one merge: #117 (fixes #116), #118 (fixes #114), #119 (fixes #115), plus smoke sessions for the three, tidy fixes on the new code and the re-rendered screenshots.
Merging this one closes the three stacked PRs with it.
Checked on this tip: ctest, ctest and
tools/smoke.shin an-fsanitize=address,undefinedbuild, clang-tidy (bugprone, cert, performance, clang-analyzer) on the changed files,tools/bench.shtwice (anonymous memory 4.9 / 8.8 / 45 / 13 MB; first frame 56 ms, first rows 76 ms, loaded 0.72 s).Fixes #116
Fixes #114
Fixes #115
🤖 Generated with Claude Code