Kneelawk/PackVulcan

File Chooser Quick-Access Side-Bar

Closed this issue · 4 comments

The file chooser dialog should have a quick-access side-bar on the left-side that shows the home folders (home, documents, pictures, etc.), a list of drives, and a customizable list of favorite directories.

Each of these lists will have separators between them.

Each list element should have a tooltip that pops up showing the full element name, as some elements will likely be cut off.

For home folder, the file chooser should check if each of the home folders supported actually exists in the user's user.home folder in a IO coroutine each time the file chooser is opened.

For each home folder that exists, some description will be added to a list to be displayed in the quick-access side-bar.

For the list of drives, it looks like this will have to be handled differently on Windows vs. Unix-based.

For Windows, a drive list can be retrieved using FileSystem.getRootDirectories() and the FileStore associated with each path given can be retrieved using Files.getFileStore(Path). The FileStore can then be used to get the drive name.

For Unix-based, the command df -hP will need to be run and its output parsed for mount locations. If I feel like getting drive names on Unix, which would probably be a good idea, especialy on Mac, I can use the same Files.getFileStore(Path) on each of the parsed paths.

This list should be collected in a loop in an IO coroutine that runs once every 5 seconds or so.

The favorites list should have a button to add folders to the list and then the folders in the list listed after the the 'add' button.

Clicking the add button adds the currently-viewing directory to the list not the currently selected directory. The add button should probably have a tooltip stating such.

Favorited folders should be stored in the application'a global state.

Implemented by c3ef3d4, 9227136, and bf2c76c.