aboutsummaryrefslogtreecommitdiff
path: root/app/ui
diff options
context:
space:
mode:
Diffstat (limited to 'app/ui')
-rw-r--r--app/ui/tui.py21
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):