Skip to content

Commit

Permalink
Merge pull request #37 from sireliah/fix-dialog-close-event
Browse files Browse the repository at this point in the history
Fix problematic close event for the firewall dialog
  • Loading branch information
sireliah authored Jun 10, 2022
2 parents 3d45b14 + 122d208 commit accbea1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dnd/dialogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl FirewallDialog {
}

pub fn close(&self) {
self.0.hide();
self.0.close();
self.0.hide();
}
}
2 changes: 1 addition & 1 deletion src/dnd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ fn handle_firewall(window: &gtk::ApplicationWindow) -> Result<(), Box<dyn Error>
// Please note that on some OS'es like Ubuntu, polkit will require password for querying firewalld D-Bus interface.
let check_dialog = FirewallDialog::new_for_check(window);
let check_response = check_dialog.run();
check_dialog.close();

match check_response {
gtk::ResponseType::Yes => {
Expand All @@ -159,6 +158,7 @@ fn handle_firewall(window: &gtk::ApplicationWindow) -> Result<(), Box<dyn Error>
if required_services.0 || required_services.1 {
let dialog = FirewallDialog::new_for_config(window, &config);
let response = dialog.run();
check_dialog.close();
match response {
gtk::ResponseType::Yes => firewall.handle(required_services)?,
gtk::ResponseType::No => info!("Not checking firewall configuration"),
Expand Down

0 comments on commit accbea1

Please sign in to comment.