made dialogs modal

This commit is contained in:
Wyatt J. Miller 2022-05-23 19:50:07 -04:00
parent bbb0c2feaa
commit 86ffcebd1b

View File

@ -71,6 +71,7 @@ impl RomBox {
&[("_Cancel", ResponseType::Cancel), ("_Open", ResponseType::Accept)] &[("_Cancel", ResponseType::Cancel), ("_Open", ResponseType::Accept)]
); );
dialog.set_modal(true);
dialog.run_async(|d, r| { dialog.run_async(|d, r| {
match r { match r {
ResponseType::Accept => d.close(), ResponseType::Accept => d.close(),
@ -132,12 +133,13 @@ impl PatchBox {
self.patch_button.connect_clicked(clone!(@weak self as this => self.patch_button.connect_clicked(clone!(@weak self as this =>
move |_| { move |_| {
let dialog = FileChooserDialog::new::<ApplicationWindow>( let dialog = FileChooserDialog::new::<ApplicationWindow>(
Some("Choose a ROM"), Some("Choose a Patch"),
Some(&app), Some(&app),
FileChooserAction::Open, FileChooserAction::Open,
&[("_Cancel", ResponseType::Cancel), ("_Open", ResponseType::Accept)] &[("_Cancel", ResponseType::Cancel), ("_Open", ResponseType::Accept)]
); );
dialog.set_modal(true);
dialog.run_async(|d, r| { dialog.run_async(|d, r| {
match r { match r {
ResponseType::Accept => d.close(), ResponseType::Accept => d.close(),