[gnome-shell/gnome-3-6] LoginDialog: clear previous auth failed messages when trying again
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-6] LoginDialog: clear previous auth failed messages when trying again
- Date: Fri, 9 Nov 2012 00:09:19 +0000 (UTC)
commit 26026ecf1030b3a22104ed9c4818ab9c97dc8ecf
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Oct 29 17:39:00 2012 +0100
LoginDialog: clear previous auth failed messages when trying again
When the user has the entered the password for the second time
and clicked OK, clear messages from the previous attempt, so any
new failure is shown clearly.
https://bugzilla.gnome.org/show_bug.cgi?id=687132
js/gdm/loginDialog.js | 10 +++++++---
js/gdm/util.js | 3 +++
js/ui/unlockDialog.js | 10 +++++++---
3 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 7ea93ba..548d5d4 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -827,9 +827,13 @@ const LoginDialog = new Lang.Class({
},
_showMessage: function(userVerifier, message, styleClass) {
- this._promptMessage.text = message;
- this._promptMessage.styleClass = styleClass;
- GdmUtil.fadeInActor(this._promptMessage);
+ if (message) {
+ this._promptMessage.text = message;
+ this._promptMessage.styleClass = styleClass;
+ GdmUtil.fadeInActor(this._promptMessage);
+ } else {
+ GdmUtil.fadeOutActor(this._promptMessage);
+ }
},
_showLoginHint: function(verifier, message) {
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 3615cf2..da31daa 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -125,6 +125,9 @@ const ShellUserVerifier = new Lang.Class({
},
answerQuery: function(serviceName, answer) {
+ // Clear any previous message
+ this.emit('show-message', null, null);
+
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
},
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 7b30182..79c8290 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -209,9 +209,13 @@ const UnlockDialog = new Lang.Class({
},
_showMessage: function(userVerifier, message, styleClass) {
- this._promptMessage.text = message;
- this._promptMessage.styleClass = styleClass;
- GdmUtil.fadeInActor(this._promptMessage);
+ if (message) {
+ this._promptMessage.text = message;
+ this._promptMessage.styleClass = styleClass;
+ GdmUtil.fadeInActor(this._promptMessage);
+ } else {
+ GdmUtil.fadeOutActor(this._promptMessage);
+ }
},
_onAskQuestion: function(verifier, serviceName, question, passwordChar) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]