[gnome-shell] polkitAgent: Reset dialog to defaults after cancelling polkit session
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] polkitAgent: Reset dialog to defaults after cancelling polkit session
- Date: Tue, 5 Nov 2019 18:03:55 +0000 (UTC)
commit 5c7a701a68f584cbd95b3f15f85486a5b2ae6245
Author: Jonas Dreßler <verdre v0yd nl>
Date: Sun Jun 23 16:33:20 2019 +0200
polkitAgent: Reset dialog to defaults after cancelling polkit session
Since we don't know if polkit/PAM will request a password (emitting the
"request" signal) or use another authentication method like a
fingerprint after the current authentication failed, hide the password
field and make the "Authenticate" button insensitive after cancelling
the session, just like we do when creating the dialog.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788
js/ui/components/polkitAgent.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js
index e304c2a463..6367bcc8f1 100644
--- a/js/ui/components/polkitAgent.js
+++ b/js/ui/components/polkitAgent.js
@@ -304,6 +304,10 @@ var AuthenticationDialog = GObject.registerClass({
this._session.disconnect(this._sessionShowInfoId);
this._session = null;
}
+
+ this._passwordBox.hide();
+ this._cancelButton.grab_key_focus();
+ this._okButton.reactive = false;
}
_onUserChanged() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]