summaryrefslogtreecommitdiff
path: root/iced_builder/src/error.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.me>2024-11-04 20:31:09 +0100
committerpml68 <contact@pml68.me>2024-11-04 20:31:09 +0100
commit6953207b30c7630d8ebb9508603ee1d92d6062a9 (patch)
tree57952c0e1c862e530316db258c9f6ad3f7132698 /iced_builder/src/error.rs
parentfeat(error): use `Arc` instead of .to_string for From impls (diff)
downloadiced-builder-6953207b30c7630d8ebb9508603ee1d92d6062a9.tar.gz
feat: add `unsaved_changes` dialog
Diffstat (limited to '')
-rw-r--r--iced_builder/src/error.rs19
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();
-}