https://gitlab.synchro.net/main/sbbs/-/commit/5934587716e0e2b2d904920b
Modified Files:
src/syncterm/Manual.txt src/uifc/filepick.c filepick.h uifc.h uifc32.c uifctest.c
Log Message:
uifc: rework filepick, add multi-select and directory pickers
filepick.c is refactored from a single 450-line function into small
field handlers around an fp_state struct. Long-standing TODO flags (UIFC_FP_UNIXSORT, UIFC_FP_SHOWHIDDEN) now work; results are sorted case-insensitively with directories first and ".." pinned to the top.
Magic keycode constants are replaced with a new UIFC_EXTKEY() macro,
file sizes are rendered via byte_estimate_to_str() with IEC suffixes,
and glob() is replaced with globi() so case-insensitive matching is
portable.
Two new public entry points:
filepick_multi() — tag any number of files across directories
filepick() — now also honours UIFC_FP_DIRSEL for dir selection
Layout gains an info pane (filename + size + mtime), dedicated
OK/Cancel footer buttons (plus Review in MULTI mode), truncated-path
display that keeps the deepest directory visible, and a uifcapi_t
edit_item field so callers can override the F2 label that bottomline()
draws when WIN_EDIT is set.
uifctest gets Multi-file picker and Directory picker menu entries.
syncterm/Manual.txt documents the shared file browser, its three
panes, footer buttons, and full keyboard + mouse bindings including
Ctrl+Enter as an OK shortcut and F2 to review the multi-select set.
Co-Authored-By: Claude Opus 4.7 (1M context) <
[email protected]>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net