summaryrefslogtreecommitdiff
path: root/src/backends/dialog.rs
Commit message (Collapse)AuthorAge
* 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
* Fix clippy complaints that don't change the semanticsStephan Sokolow2019-10-25
| | | | (Clippy also complains about `new()` without `impl Default`)
* Add the stdio backendRobin Krahl2019-01-11
| | | | | | | This patch adds the stdio backend which acts as a fallback backend and uses standard input and output. For password queries, the rpassword crate is used to suppress output. Also, default_backend is changed to return Stdio if Dialog is not available.
* 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.
* Add the Password dialog boxRobin Krahl2019-01-08
|
* Refactor io::Error into custom Error enumRobin Krahl2019-01-08
|
* Add question dialog boxesRobin Krahl2019-01-08
|
* Add input dialog boxesRobin Krahl2019-01-08
| | | | | | This patch implements input dialog boxes. This required some refactoring in the dialog backend to allow additional arguments after the width and the height.
* backends/Dialog: Add support for output handlingRobin Krahl2019-01-08
| | | | | | | | dialog(1) uses stdin to display the dialog boxes and prints output to stderr (if applicable). This patch changes the command invocation in the Dialog backend to capture stderr. stdin and stdout are inherited from the main process so that dialog can display the dialog boxes and receive user input.
* Implement message boxes using the dialog backendRobin Krahl2019-01-08
This patch adds a first dialog box type, message boxes, and a first backend, the dialog(1) tool. It does not yet address the problems of output handling and backend selection.