mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-05 16:01:27 +03:00
prevent authorization request spamming windows (#335)
This commit is contained in:
committed by
GitHub
parent
4e5a66340a
commit
0dd413e989
@@ -474,6 +474,9 @@ impl Window {
|
||||
}
|
||||
|
||||
pub(super) fn request_authorization(&self, fingerprint: &str) {
|
||||
if let Some(w) = self.imp().authorization_window.borrow_mut().take() {
|
||||
w.close();
|
||||
}
|
||||
let window = AuthorizationWindow::new(fingerprint);
|
||||
window.set_transient_for(Some(self));
|
||||
window.connect_closure(
|
||||
@@ -496,5 +499,6 @@ impl Window {
|
||||
}),
|
||||
);
|
||||
window.present();
|
||||
self.imp().authorization_window.replace(Some(window));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user