diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index ffd20a01f..7c7906675 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -977,6 +977,23 @@ const LoginDialog = new Lang.Class({ return batch.run(); }, + _askForUsernameAndLogIn: function() { + this._promptLabel.set_text(_("Username: ")); + this._promptEntry.set_text(''); + this._promptEntry.clutter_text.set_password_char(''); + + let tasks = [this._showPrompt, + + function() { + let userName = this._promptEntry.get_text(); + this._promptEntry.reactive = false; + return this._beginVerificationForUser(userName); + }]; + + let batch = new Batch.ConsecutiveBatch(this, tasks); + return batch.run(); + }, + _onSessionOpened: function(client, serviceName) { this._greeter.call_start_session_when_ready_sync(serviceName, true, null); }, @@ -1122,10 +1139,7 @@ const LoginDialog = new Lang.Class({ this._fadeOutNotListedButton]), function() { - let hold = new Batch.Hold(); - - this._userVerifier.begin(null, hold); - return hold; + return this._askForUsernameAndLogIn(); }]; let batch = new Batch.ConsecutiveBatch(this, tasks);