summaryrefslogtreecommitdiff
path: root/iced_builder/src/main.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2024-12-31 00:00:09 +0100
committerpml68 <contact@pml68.dev>2024-12-31 00:00:09 +0100
commite39c7d037d3fa4b57a2ca80c3fc26ff900309e91 (patch)
tree132fb98d2c5f6701d2ab42ab7939100d28d1bc07 /iced_builder/src/main.rs
parentfeat: add config loading, with theming support, limited to Palette for now (diff)
downloadiced-builder-e39c7d037d3fa4b57a2ca80c3fc26ff900309e91.tar.gz
refactor: unsaved_changes_dialog emits bool instead of MessageDialogResult
Diffstat (limited to '')
-rw-r--r--iced_builder/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/iced_builder/src/main.rs b/iced_builder/src/main.rs
index 02e1ae0..86e478d 100644
--- a/iced_builder/src/main.rs
+++ b/iced_builder/src/main.rs
@@ -14,7 +14,6 @@ use iced_builder::types::{
Action, DesignerPage, ElementName, Message, Project,
};
use iced_builder::{icon, Error};
-use rfd::MessageDialogResult;
use tokio::runtime;
fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -235,7 +234,7 @@ impl App {
self.project_path = None;
self.editor_content = text_editor::Content::new();
} else {
- if let MessageDialogResult::Ok = unsaved_changes_dialog("You have unsaved changes. Do you wish to discard these and create a new project?") {
+ if unsaved_changes_dialog("You have unsaved changes. Do you wish to discard these and create a new project?") {
self.is_dirty = false;
self.project = Project::new();
self.project_path = None;
@@ -254,7 +253,7 @@ impl App {
Message::FileOpened,
);
} else {
- if let MessageDialogResult::Ok = unsaved_changes_dialog("You have unsaved changes. Do you wish to discard these and open another project?") {
+ if unsaved_changes_dialog("You have unsaved changes. Do you wish to discard these and open another project?") {
self.is_dirty = false;
self.is_loading = true;
return Task::perform(Project::from_file(), Message::FileOpened);