Description
-
The file selection dialogs on windows and mac use native dialogs. Only on unix-like platforms a very simple scripted dialog is used. This project was started to provide a better looking dialog for those platforms.
After a while people started to use this dialog on windows as well because of some of the features it provides.
Features
-
The package provides the following features that users will have come to expect from file selection dialogs, but are missing from the built-in scripted dialogs:
- Either show directories in a separate pane or mixed-in with the files
- Optionally show details of the files (size, modification time, etc.)
- Show or hide hidden files
- Sort the files based on certain properties, such as name, date, or size
- The user can interactively control the features mentioned above
- Provide a way for the user to create a new directory while browsing the file system
Additionally, the dialogs can provide access to the virtual file systems used in the application.
For details, see the manual page.
The package will pick different icon sizes depending on the tk scaling factor. With Tk 9, or if the tksvg package is available, it can even use svg icons scaled to the appropriate size. Additionally, if the xdgicons package is loaded, the icons will match the user configured icon theme. This way the dialogs will fit in nicely with the existing desktop theme and screen resolution. The various dialogs will use fswatch, if available, to automatically show changes to the filesystem as they happen. Finally, tool tips will be shown for the toolbar buttons if the tooltip package from tklib is available.
Additional widgets
-
The package includes a couple of widgets similar to existing ttk widgets, but with some additional functionality, that were needed for the dialogs. These have been made available so they can also be used outside of the file selection dialogs:
Using the package
-
Version 1.0 of the package was designed for possible inclusion into the core as a proper file selection dialog for linux. As there was too much resistance for that to ever happen, that strategy has been abandoned in version 2.0.
The package is now intended to be placed in a directory under auto_path. It can then be loaded using [package require fsdialog]. This will replace the built-in versions of tk_getOpenFile, tk_getSaveFile, and tk_chooseDirectory.