diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 07aee818e..ee6f01a3e 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -1988,7 +1988,7 @@ StButton.popup-menu-item:insensitive { min-width: 350px; } -.login-dialog-prompt-fingerprint-message { +.login-dialog-prompt-login-hint-message { font-size: 10.5pt; } diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 5c60d24b2..9e103ec1c 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -696,8 +696,8 @@ const LoginDialog = new Lang.Class({ this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed)); this._userVerifier.connect('reset', Lang.bind(this, this._onReset)); - this._userVerifier.connect('show-fingerprint-prompt', Lang.bind(this, this._showFingerprintPrompt)); - this._userVerifier.connect('hide-fingerprint-prompt', Lang.bind(this, this._hideFingerprintPrompt)); + this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint)); + this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint)); this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA }); @@ -761,12 +761,9 @@ const LoginDialog = new Lang.Class({ x_fill: true, y_fill: false, x_align: St.Align.START }); - // Translators: this message is shown below the password entry field - // to indicate the user can swipe their finger instead - this._promptFingerprintMessage = new St.Label({ text: _("(or swipe finger)"), - style_class: 'login-dialog-prompt-fingerprint-message' }); - this._promptFingerprintMessage.hide(); - this._promptBox.add(this._promptFingerprintMessage); + this._promptLoginHint = new St.Label({ style_class: 'login-dialog-prompt-login-hint-message' }); + this._promptLoginHint.hide(); + this._promptBox.add(this._promptLoginHint); this._sessionList = new SessionList(); this._sessionList.connect('session-activated', @@ -854,7 +851,7 @@ const LoginDialog = new Lang.Class({ function() { this._sessionList.close(); - this._promptFingerprintMessage.hide(); + this._promptLoginHint.hide(); this._userList.actor.show(); this._userList.actor.opacity = 255; return this._userList.showItems(); @@ -875,12 +872,14 @@ const LoginDialog = new Lang.Class({ this._sessionList.setActiveSession(sessionId); }, - _showFingerprintPrompt: function() { - GdmUtil.fadeInActor(this._promptFingerprintMessage); + _showLoginHint: function(verifier, message) { + this._promptLoginHint.set_text(message) + GdmUtil.fadeInActor(this._promptLoginHint); }, - _hideFingerprintPrompt: function() { - GdmUtil.fadeOutActor(this._promptFingerprintMessage); + _hideLoginHint: function() { + GdmUtil.fadeOutActor(this._promptLoginHint); + this._promptLoginHint.set_text(''); }, cancel: function() { @@ -899,8 +898,8 @@ const LoginDialog = new Lang.Class({ function() { // Show it with 0 opacity so we preallocate space for it // in the event we need to fade in the message - this._promptFingerprintMessage.opacity = 0; - this._promptFingerprintMessage.show(); + this._promptLoginHint.opacity = 0; + this._promptLoginHint.show(); }, function() { @@ -972,7 +971,7 @@ const LoginDialog = new Lang.Class({ }, function() { - this._promptFingerprintMessage.hide(); + this._promptLoginHint.hide(); this._promptEntry.reactive = true; this._promptEntry.set_text(''); }]; diff --git a/js/gdm/util.js b/js/gdm/util.js index fb68ab099..3224539c7 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -211,7 +211,10 @@ const ShellUserVerifier = new Lang.Class({ // as a cue to display our own message. if (serviceName == FINGERPRINT_SERVICE_NAME && this._haveFingerprintReader) { - this.emit('show-fingerprint-prompt'); + + // Translators: this message is shown below the password entry field + // to indicate the user can swipe their finger instead + this.emit('show-login-hint', _("(or swipe finger)")); } else if (serviceName == PASSWORD_SERVICE_NAME) { Main.notifyError(info); } @@ -261,7 +264,7 @@ const ShellUserVerifier = new Lang.Class({ if (serviceName == PASSWORD_SERVICE_NAME) { this.emit('verification-failed'); } else if (serviceName == FINGERPRINT_SERVICE_NAME) { - this.emit('hide-fingerprint-prompt'); + this.emit('hide-login-hint'); } }, }); diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 86ce8ec52..fb510fcbc 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -97,8 +97,8 @@ const UnlockDialog = new Lang.Class({ this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete)); this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed)); - this._userVerifier.connect('show-fingerprint-prompt', Lang.bind(this, this._showFingerprintPrompt)); - this._userVerifier.connect('hide-fingerprint-prompt', Lang.bind(this, this._hideFingerprintPrompt)); + this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint)); + this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint)); this._userWidget = new UserWidget(this._user); this.contentLayout.add_actor(this._userWidget.actor); @@ -122,12 +122,9 @@ const UnlockDialog = new Lang.Class({ this.contentLayout.add_actor(this._promptLayout); - // Translators: this message is shown below the password entry field - // to indicate the user can swipe their finger instead - this._promptFingerprintMessage = new St.Label({ text: _("(or swipe finger)"), - style_class: 'login-dialog-prompt-fingerprint-message' }); - this._promptFingerprintMessage.hide(); - this.contentLayout.add_actor(this._promptFingerprintMessage); + this._promptLoginHint = new St.Label({ style_class: 'login-dialog-prompt-login-hint' }); + this._promptLoginHint.hide(); + this.contentLayout.add_actor(this._promptLoginHint); let cancelButton = { label: _("Cancel"), action: Lang.bind(this, this._escape), @@ -183,12 +180,13 @@ const UnlockDialog = new Lang.Class({ this._updateOkButton(true); }, - _showFingerprintPrompt: function() { - GdmUtil.fadeInActor(this._promptFingerprintMessage); + _showLoginHint: function(verifier, message) { + this._promptLoginHint.set_text(message) + GdmUtil.fadeInActor(this._promptLoginHint); }, - _hideFingerprintPrompt: function() { - GdmUtil.fadeOutActor(this._promptFingerprintMessage); + _hideLoginHint: function() { + GdmUtil.fadeOutActor(this._promptLoginHint); }, _doUnlock: function() {