unlockDialog: Make the prompt entry insensitive while logging in
This ensures that the user can't confusingly edit the entry while waiting for a response. https://bugzilla.gnome.org/show_bug.cgi?id=685444
This commit is contained in:
parent
0e01a81219
commit
0192a6cb12
@ -402,6 +402,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
.login-dialog-prompt-entry:insensitive {
|
.login-dialog-prompt-entry:insensitive {
|
||||||
color: rgba(0,0,0,0.7);
|
color: rgba(0,0,0,0.7);
|
||||||
border: 2px solid #565656;
|
border: 2px solid #565656;
|
||||||
|
background-gradient-start: rgb(200,200,200);
|
||||||
|
background-gradient-end: rgb(210,210,210);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Panel */
|
/* Panel */
|
||||||
|
@ -171,7 +171,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
default: true };
|
default: true };
|
||||||
this.setButtons([cancelButton, this._okButton]);
|
this.setButtons([cancelButton, this._okButton]);
|
||||||
|
|
||||||
this._updateOkButton(true);
|
this._updateSensitivity(true);
|
||||||
|
|
||||||
let otherUserLabel = new St.Label({ text: _("Log in as another user"),
|
let otherUserLabel = new St.Label({ text: _("Log in as another user"),
|
||||||
style_class: 'login-dialog-not-listed-label' });
|
style_class: 'login-dialog-not-listed-label' });
|
||||||
@ -200,7 +200,9 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
|
this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateOkButton: function(sensitive) {
|
_updateSensitivity: function(sensitive) {
|
||||||
|
this._promptEntry.reactive = sensitive;
|
||||||
|
this._promptEntry.clutter_text.editable = sensitive;
|
||||||
this._okButton.button.reactive = sensitive;
|
this._okButton.button.reactive = sensitive;
|
||||||
this._okButton.button.can_focus = sensitive;
|
this._okButton.button.can_focus = sensitive;
|
||||||
},
|
},
|
||||||
@ -230,7 +232,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._promptEntry.menu.isPassword = passwordChar != '';
|
this._promptEntry.menu.isPassword = passwordChar != '';
|
||||||
|
|
||||||
this._currentQuery = serviceName;
|
this._currentQuery = serviceName;
|
||||||
this._updateOkButton(true);
|
this._updateSensitivity(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_showLoginHint: function(verifier, message) {
|
_showLoginHint: function(verifier, message) {
|
||||||
@ -248,7 +250,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
// and make ourself non-reactive
|
// and make ourself non-reactive
|
||||||
// the actual reply to GDM will be sent as soon as asked
|
// the actual reply to GDM will be sent as soon as asked
|
||||||
this._firstQuestionAnswer = this._promptEntry.text;
|
this._firstQuestionAnswer = this._promptEntry.text;
|
||||||
this._updateOkButton(false);
|
this._updateSensitivity(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +260,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
let query = this._currentQuery;
|
let query = this._currentQuery;
|
||||||
this._currentQuery = null;
|
this._currentQuery = null;
|
||||||
|
|
||||||
this._updateOkButton(false);
|
this._updateSensitivity(false);
|
||||||
|
|
||||||
this._userVerifier.answerQuery(query, this._promptEntry.text);
|
this._userVerifier.answerQuery(query, this._promptEntry.text);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user