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