diff options
Diffstat (limited to 'src/dialogs.rs')
| -rw-r--r-- | src/dialogs.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dialogs.rs b/src/dialogs.rs index 242f3d6..22b12df 100644 --- a/src/dialogs.rs +++ b/src/dialogs.rs @@ -20,7 +20,7 @@ use std::path::PathBuf; use gtk::prelude::*; use relm4::gtk::gio; -use relm4::{ComponentSender, gtk}; +use relm4::{ComponentSender, adw, gtk}; use crate::AppModel; use crate::actions::{Action, ImageFormat}; @@ -38,7 +38,7 @@ pub fn create_file_filter() -> gtk::FileFilter { } /// Shows an error dialog with the given title and message. -pub fn show_error(window: >k::Window, title: &str, message: &str) { +pub fn show_error(window: &adw::Window, title: &str, message: &str) { let dialog = gtk::AlertDialog::builder() .modal(true) .buttons([&tr!("dialog.action.cancel"), "Ok"]) @@ -50,7 +50,7 @@ pub fn show_error(window: >k::Window, title: &str, message: &str) { /// Shows a file open dialog and handles the response. pub fn show_open_dialog( - window: >k::Window, + window: &adw::Window, is_empty_document: bool, sender: ComponentSender<AppModel>, ) { @@ -86,7 +86,7 @@ pub fn show_open_dialog( /// Shows a file save dialog and handles the response. pub fn show_save_dialog( - window: >k::Window, + window: &adw::Window, current_file: Option<&PathBuf>, close_after: bool, sender: ComponentSender<AppModel>, @@ -127,7 +127,7 @@ pub fn show_save_dialog( /// Shows a dialog asking whether to save unsaved changes before closing. pub fn show_unsaved_changes_dialog( - window: >k::Window, + window: &adw::Window, current_file: Option<PathBuf>, sender: ComponentSender<AppModel>, ) { @@ -184,7 +184,7 @@ fn create_image_filter(format: ImageFormat) -> gtk::FileFilter { /// Shows an export image dialog and handles the response. pub fn show_export_dialog( - window: >k::Window, + window: &adw::Window, current_file: Option<&PathBuf>, sender: ComponentSender<AppModel>, ) { |