diff options
| author | historia <historiavg@proton.me> | 2026-08-24 20:41:51 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-24 20:41:51 -0400 |
| commit | 610d6828fa8300efa3f8df3d3bf8e3c00e24c1dc (patch) | |
| tree | dd50ad49c0f925361585b7adc7b588ddd203b55e /app/ui | |
| parent | cf24fa74188cee498eeb7b94422371c952278d4a (diff) | |
| download | tts-audiobook-generator-610d6828fa8300efa3f8df3d3bf8e3c00e24c1dc.tar.gz | |
remove: partial feature to point at existing backend checkout
Diffstat (limited to 'app/ui')
| -rw-r--r-- | app/ui/tui.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/app/ui/tui.py b/app/ui/tui.py index 0a119e9..f1abea1 100644 --- a/app/ui/tui.py +++ b/app/ui/tui.py @@ -1002,8 +1002,6 @@ def browse_directory(scr, title: str, preview: Optional[Callable[[Path], Optional[Tuple[str, str]]]] = None, help_lines: Optional[Sequence[str]] = None, - auto_select: Optional[Callable[ - [Path], Optional[Path]]] = None, back_value: object = None ) -> Path: """Pick a directory DOS-browser style. @@ -1023,15 +1021,9 @@ def browse_directory(scr, title: str, listed directory's path — kind is "ok" (green), "warn" (yellow), "err" (red), "info" (dim) or "input". PREVIEW(directory) returns one for the highlighted subdirectory, shown on the status line. - AUTO_SELECT receives a highlighted subdirectory when the user - opens it (Enter, Right or 'l') and may return a Path to accept - immediately — as if '[ Use this directory ]' had been pressed on - it — instead of descending; returning None keeps browsing. This - lets a subdirectory that already looks like the target (e.g. an - 'audio.cpp' checkout containing 'model_specs/') be picked in one - keystroke. Esc (or 'q') aborts the wizard unless BACK_VALUE is given - (not None), in which case either key returns it so the caller can - fall back a screen. + Esc (or 'q') aborts the wizard unless BACK_VALUE is given (not + None), in which case either key returns it so the caller can fall + back a screen. """ footer = ("Up/Down = move Enter = open/use Left = parent " "e = type path Esc = cancel") @@ -1119,12 +1111,7 @@ def browse_directory(scr, title: str, highlight = current current = current.parent else: - entry = entries[sel - offset] - if auto_select is not None: - picked = auto_select(entry) - if picked is not None: - return picked - current = entry + current = entries[sel - offset] sel = 0 elif key in (curses.KEY_LEFT, ord("h"), ord("u"), curses.KEY_BACKSPACE, 8, 127): |
