diff options
| author | pml68 <contact@pml68.me> | 2024-11-04 20:31:09 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.me> | 2024-11-04 20:31:09 +0100 |
| commit | 6953207b30c7630d8ebb9508603ee1d92d6062a9 (patch) | |
| tree | 57952c0e1c862e530316db258c9f6ad3f7132698 /iced_builder/src/error.rs | |
| parent | feat(error): use `Arc` instead of .to_string for From impls (diff) | |
| download | iced-builder-6953207b30c7630d8ebb9508603ee1d92d6062a9.tar.gz | |
feat: add `unsaved_changes` dialog
Diffstat (limited to '')
| -rw-r--r-- | iced_builder/src/error.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/iced_builder/src/error.rs b/iced_builder/src/error.rs index 8987851..edb57b9 100644 --- a/iced_builder/src/error.rs +++ b/iced_builder/src/error.rs @@ -1,4 +1,3 @@ -use rfd::{MessageButtons, MessageDialog, MessageLevel}; use std::io; use std::sync::Arc; use thiserror::Error; @@ -42,21 +41,3 @@ impl From<&'static str> for Error { Self::Other(value.to_owned()) } } - -pub fn error_dialog(description: impl Into<String>) { - MessageDialog::new() - .set_level(MessageLevel::Error) - .set_buttons(MessageButtons::Ok) - .set_title("Oops! Something went wrong.") - .set_description(description) - .show(); -} - -pub fn warning_dialog(title: impl Into<String>, description: impl Into<String>) { - MessageDialog::new() - .set_level(MessageLevel::Warning) - .set_buttons(MessageButtons::Ok) - .set_title(title) - .set_description(description) - .show(); -} |
