A simple file dialog for the Vizia framework. At this point consider it a POC, it has no stable API (in fact it does not really have an API at all).
Big thanks to @geom3trik and all the great people of Vizia community.
cargo run
The UI is inspired by the vscode
file selector (electron/gtk?), with clickable path segments. Initially the current path is selected, and its content displayed as a list of entries (files/folders). Clicking on a folder extends the path. Clicking on a path segment selects the path (from root until the selected path segment). Clicking on a folder in the current dir extends the path from the current dir (potentially replacing path segments). Nothing fancy but seems quite intuitive.
There is a editable text button at the top, currently unused will show the selected file with full path eventually...
Known issues:
Handling of symlinks. As of now symlinks are indicated by a trailing @
(and a different color). Symlinks cannot be followed as of now. (Handling of symlinks is a bit OS dependent, no clear picture what to do/what we want here).
If window is shrunk to much the path segments might go out of view. gtk3 file dialog puts <
>
buttons for scrolling the list, not sure if we want that or a scroll bar or something else.
Attempting to traverse into a folder for which you don't have permissions to results in a panic.
Sorting by size is based on the actual size of the file including folders and symlinks. Not sure what we want to do here.
There are a lot of possibilities:
There is a editable text button at the top, currently unused. We can have it showing the currently selected file, and editing this manually could set the path segments and selected file if a match is found. Not sure if we want this, or some other behavior.
Filtering:
Selection:
File Type:
API and wrapping
Following the MIT license of Vizia.