diff --git a/src/main.rs b/src/main.rs index b2ee7d3..df66f28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,7 +57,10 @@ fn quick_message(message: String) { .text(fl!("offline-error")) .title(message) .modal(true) + .buttons(gtk::ButtonsType::Ok) .build(); + errordialog.connect_response(|dialog, _| dialog.close()); + errordialog.show(); return; } diff --git a/src/pages.rs b/src/pages.rs index 8f68a49..fcaf962 100644 --- a/src/pages.rs +++ b/src/pages.rs @@ -390,7 +390,10 @@ fn create_fixes_section(builder: &Builder) -> gtk::Box { .text(msg.msg) .title(msg.msg_type.to_string()) .modal(true) + .buttons(gtk::ButtonsType::Ok) .build(); + dialog.connect_response(|dialog, _| dialog.close()); + dialog.show(); glib::ControlFlow::Continue }); @@ -715,7 +718,10 @@ fn create_connections_section() -> gtk::Box { .text(msg.msg) .title(msg.msg_type.to_string()) .modal(true) + .buttons(gtk::ButtonsType::Ok) .build(); + dialog.connect_response(|dialog, _| dialog.close()); + dialog.show(); glib::ControlFlow::Continue }); @@ -978,7 +984,10 @@ fn on_servbtn_clicked(button: >k::CheckButton) { .text(fl!("package-not-installed", package_name = alpm_package_name)) .title("Error") .modal(true) + .buttons(gtk::ButtonsType::Ok) .build(); + dialog.connect_response(|dialog, _| dialog.close()); + dialog.show(); } glib::ControlFlow::Continue