Revert "gtk: handle exit of service properly"

This reverts commit 1f4821a16d.
breaks ubuntu lts
This commit is contained in:
Ferdinand Schober
2024-01-23 21:51:40 +01:00
parent 1f4821a16d
commit 8084b52cfc
3 changed files with 3 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
mod imp;
use std::{io::Write, process};
use std::io::Write;
use adw::prelude::*;
use adw::subclass::prelude::*;
@@ -218,16 +218,4 @@ impl Window {
let toast_overlay = &self.imp().toast_overlay;
toast_overlay.add_toast(toast);
}
pub fn show_exit_dialog(&self, msg: &str) {
let dialog = adw::MessageDialog::builder()
.transient_for(self)
// .heading(msg)
.body(msg)
.build();
dialog.add_response("close", "Close");
dialog.connect_response(Some("close"), move |_, _| process::exit(1));
dialog.show();
}
}