From fa7207d8c58b36a9f9507f8f405a9f1edd39d4ec Mon Sep 17 00:00:00 2001 From: MarinChen99097 Date: Wed, 12 Aug 2026 22:25:50 +0800 Subject: [PATCH] Keep the import progress popup quiet while Hot Folder polls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hot Folder scans every 2 s, and each new frame starts a per-frame "Hashing files" then "Generating thumbnails" batch. The progress popup shows and raises itself on every batch, so a tethered capture session gets a popup over the canvas on each shutter release. Gate the popup in the main window: while Hot Folder is on, the non-abortable quick import batches stay silent — the HUD status line already reports them. Abortable batches (export, autocrop, normalization, stitch, HDR, contact sheet) show the popup as before. Co-Authored-By: Claude Fable 5 --- docs/USER_GUIDE.md | 2 +- negpy/desktop/view/main_window.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index 35e9912a..28084963 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -78,7 +78,7 @@ Toolbar buttons, left to right: * **Add files** / **Add folder**: load individual images or every image in a folder. Pick a folder that only holds *other* folders and NegPy reveals it in the Library section instead of reporting that it found nothing. Dropping a folder on the window does the same. * **Clear all**: unload everything (or, when several frames are selected, unload just those). -* **Hot Folder**: watches the current folder and auto-loads new files as they appear, handy when a scanner drops files into a directory. +* **Hot Folder**: watches the current folder and auto-loads new files as they appear, handy when a scanner or tethering app drops files into a directory. While it is on, the "Working…" import popup stays hidden so each new frame does not raise a window; the status line over the canvas still reports the import. * **RGB Scan**: treats the folder as red/green/blue exposure triplets and assembles each frame from three shots (for narrowband trichrome scanning). Right-click a frame → **Edit RGB Triplet…** to assign the three files by hand. * **Half Frame**: splits each scan into two frames (for half-frame cameras), edited and metered separately. When enabled, a rectangle editor opens on the current scan: drag the green box to crop (everything outside is discarded), drag the orange line to set the split, and use the **Cut thickness** slider to discard a band centered on the split (the physical black separator between the two exposures). The setting is saved and applied to every half-frame split from then on, regardless of how the scans were acquired (SANE scanner, camera copy-stand, or folder import). The **Adjust Half Frame** toolbutton (next to Half Frame) re-opens the editor on the current scan to fine-tune. Auto-detection of the gutter still seeds the initial split position. * **Apply (clone)**: copy the current frame's settings to selected frames or the whole roll. You choose which aspects in a dialog (crop and rotation are always per-image). diff --git a/negpy/desktop/view/main_window.py b/negpy/desktop/view/main_window.py index 69f99beb..3c6521c5 100644 --- a/negpy/desktop/view/main_window.py +++ b/negpy/desktop/view/main_window.py @@ -461,7 +461,7 @@ def _connect_signals(self) -> None: self.controller.status_progress_requested.connect(self.canvas.hud.set_progress) self.progress_dialog = ProgressDialog(self) - self.controller.batch_started.connect(self.progress_dialog.start) + self.controller.batch_started.connect(self._on_batch_started) self.controller.batch_progress.connect(self.progress_dialog.set_progress) self.controller.batch_finished.connect(self.progress_dialog.finish) self.progress_dialog.abort_requested.connect(self.controller.abort_active_batch) @@ -474,6 +474,14 @@ def _connect_signals(self) -> None: def _refresh_dashboard(self) -> None: self.toolbar.refresh_gpu_status() + def _on_batch_started(self, title: str, abortable: bool) -> None: + """Hot Folder polls every 2 s, so its per-frame import batches (the only + non-abortable ones) would pop the dialog on every capture. The HUD status + line still reports those; abortable batches always show the popup.""" + if not abortable and self.session_panel.file_browser.hot_folder_btn.isChecked(): + return + self.progress_dialog.start(title, abortable) + def _save_printing_notes(self) -> None: """Write the marked-up work print. The annotated pixels are the canvas's own render, so the composing happens here rather than in an export worker."""