From 6953207b30c7630d8ebb9508603ee1d92d6062a9 Mon Sep 17 00:00:00 2001 From: pml68 Date: Mon, 4 Nov 2024 20:31:09 +0100 Subject: feat: add `unsaved_changes` dialog --- iced_builder/src/error.rs | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'iced_builder/src/error.rs') 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) { - 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, description: impl Into) { - MessageDialog::new() - .set_level(MessageLevel::Warning) - .set_buttons(MessageButtons::Ok) - .set_title(title) - .set_description(description) - .show(); -} -- cgit v1.2.3