diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-05-30 09:28:37 +0300 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-05-30 09:28:37 +0300 |
commit | ff97dfe729c906fb9917138b29fd40fd6f580209 (patch) | |
tree | 9fff0db8840e6f3ad2bba7517d1ec99466e2e99c /src | |
parent | b559e80c3edbb8ac05d664eef652bb2cbd611600 (diff) | |
download | Furtherance-ff97dfe729c906fb9917138b29fd40fd6f580209.tar.zst |
Bug #51: Dialogs stay on top
Diffstat (limited to 'src')
-rwxr-xr-x | src/ui/task_details.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs index b44e857..626d976 100755 --- a/src/ui/task_details.rs +++ b/src/ui/task_details.rs @@ -165,7 +165,7 @@ impl FurTaskDetails { start.connect_clicked(clone!(@weak self as this => move |_|{ let window = FurtheranceWindow::default(); let dialog = gtk::MessageDialog::new( - Some(&window), + Some(&this), gtk::DialogFlags::MODAL, gtk::MessageType::Question, gtk::ButtonsType::OkCancel, @@ -250,7 +250,7 @@ impl FurTaskDetails { @strong task, @strong dialog, @weak this => move |_| { let delete_confirmation = gtk::MessageDialog::with_markup( - Some(&window), + Some(&dialog), gtk::DialogFlags::MODAL, gtk::MessageType::Question, gtk::ButtonsType::OkCancel, @@ -490,10 +490,8 @@ impl FurTaskDetails { // Change all task names at once imp.edit_task_names_btn.connect_clicked(clone!(@weak self as this => move|_| { - let window = FurtheranceWindow::default(); - let dialog = gtk::MessageDialog::new( - Some(&window), + Some(&this), gtk::DialogFlags::MODAL, gtk::MessageType::Question, gtk::ButtonsType::OkCancel, @@ -511,6 +509,7 @@ impl FurTaskDetails { message_area.append(&cant_be_empty); dialog.connect_response(move |dialog, resp| { + let window = FurtheranceWindow::default(); cant_be_empty.hide(); if resp == gtk::ResponseType::Ok { let new_name_text = new_name_entry.text(); @@ -561,7 +560,7 @@ impl FurTaskDetails { imp.delete_all_btn.connect_clicked(clone!(@weak self as this => move |_|{ let dialog = gtk::MessageDialog::with_markup( - Some(&window), + Some(&this), gtk::DialogFlags::MODAL, gtk::MessageType::Warning, gtk::ButtonsType::None, |