aboutsummaryrefslogtreecommitdiff
path: root/src/backends/zenity.rs
Commit message (Collapse)AuthorAge
* Add Open/Save mode to the file selection dialogfile-selectionRobin Krahl2019-12-10
| | | | | | This patch adds the option to set a FileSelectionMode, either Open or Save. Not all backends might support this – currently, only zenity and kdialog do. Per default, the Open mode is used (as before).
* Add FileSelection dialog typeReyk Floeter2019-12-10
| | | | | | | | | This patch adds the FileSelection struct representing a file selection dialog. It can be displayed using the backend’s show_file_selection function. Currently, we only support file open dialogs (i. e. choosing an existing file). Support for save dialogs should be added in the future.
* Implement Default for all backend structsRobin Krahl2019-10-27
| | | | | | This fixes the clippy warning new_without_default [0]. [0] https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
* Add missing backtick in doc commentRobin Krahl2019-10-26
|
* Fix clippy complaints that don't change the semanticsStephan Sokolow2019-10-25
| | | | (Clippy also complains about `new()` without `impl Default`)
* Fix input and password dialogs for zenity backendRobin Krahl2019-06-30
| | | | | | | | Previously, we tried to read the user input from zenity’s stderr although it is written to stdout. This patch changes the zenity backend to read from stdout instead of stderr. It also removes trailing newlines from the user input, as zenity adds a newline when writing the input.
* Check DISPLAY environment variable in default_backendRobin Krahl2019-01-11
| | | | | | | This patch changes the default_backend to also check the DISPLAY environment variable. If it is set, there probably is a X server running, so we try to use the zenity backend. Otherwise, the dialog backend is used.
* Return Box<dyn Backend> in default_backend()Robin Krahl2019-01-11
| | | | | | | | | | This patch refactors the default_backend function to return a Box<dyn Backend> instead of impl Backend. This will allow us to dynamically choose the backend implementation in a future patch. To keep the current interface, we change show_with to accept both a reference to a backend instance as well as a reference to a boxed backend instance. This also means we have to implement AsRef<Self> for the backend structs.
* Implement zenity backendRobin Krahl2019-01-08