gdm: disallow cancel after verification succeeds
Once verification has succeeded, the train's already left the building and we shouldn't allow canceling. This commit renders the cancel button non-reactive and makes the cancel function be a noop after verification succeeds. https://bugzilla.gnome.org/show_bug.cgi?id=740141
This commit is contained in:
parent
3d4408dce8
commit
5d440fa8d9
@ -261,6 +261,7 @@ const AuthPrompt = new Lang.Class({
|
||||
|
||||
_onVerificationComplete: function() {
|
||||
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
|
||||
this.cancelButton.reactive = false;
|
||||
},
|
||||
|
||||
_onReset: function() {
|
||||
@ -432,6 +433,7 @@ const AuthPrompt = new Lang.Class({
|
||||
reset: function() {
|
||||
let oldStatus = this.verificationStatus;
|
||||
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
||||
this.cancelButton.reactive = true;
|
||||
|
||||
if (oldStatus == AuthPromptStatus.VERIFYING)
|
||||
this._userVerifier.cancel();
|
||||
@ -500,6 +502,9 @@ const AuthPrompt = new Lang.Class({
|
||||
},
|
||||
|
||||
cancel: function() {
|
||||
if (this.verificationStatus == AuthPromptStatus.NOT_VERIFYING || this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED) {
|
||||
return;
|
||||
}
|
||||
this.reset();
|
||||
this.emit('cancelled');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user