gdm: generalize fingerprint message into login hint
The fingerprint message is useful for users that click their names in the user list to let them know if fingerprint login is available. This same place on screen (below the login entry) can potentially be used for other messages as well. This commit changes the variable and style names surrounding this feature to be more generic. A subsequent commit will leverage this functionality to provide a hint on how to log in to the local enterprise domain controller (if relevant). https://bugzilla.gnome.org/show_bug.cgi?id=681975
This commit is contained in:
parent
370de395f7
commit
9024c5d7ac
@ -1988,7 +1988,7 @@ StButton.popup-menu-item:insensitive {
|
|||||||
min-width: 350px;
|
min-width: 350px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-prompt-fingerprint-message {
|
.login-dialog-prompt-login-hint-message {
|
||||||
font-size: 10.5pt;
|
font-size: 10.5pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,8 +696,8 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
|
this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
|
||||||
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
||||||
|
|
||||||
this._userVerifier.connect('show-fingerprint-prompt', Lang.bind(this, this._showFingerprintPrompt));
|
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
|
||||||
this._userVerifier.connect('hide-fingerprint-prompt', Lang.bind(this, this._hideFingerprintPrompt));
|
this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint));
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||||
|
|
||||||
@ -761,12 +761,9 @@ const LoginDialog = new Lang.Class({
|
|||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
x_align: St.Align.START });
|
x_align: St.Align.START });
|
||||||
// Translators: this message is shown below the password entry field
|
this._promptLoginHint = new St.Label({ style_class: 'login-dialog-prompt-login-hint-message' });
|
||||||
// to indicate the user can swipe their finger instead
|
this._promptLoginHint.hide();
|
||||||
this._promptFingerprintMessage = new St.Label({ text: _("(or swipe finger)"),
|
this._promptBox.add(this._promptLoginHint);
|
||||||
style_class: 'login-dialog-prompt-fingerprint-message' });
|
|
||||||
this._promptFingerprintMessage.hide();
|
|
||||||
this._promptBox.add(this._promptFingerprintMessage);
|
|
||||||
|
|
||||||
this._sessionList = new SessionList();
|
this._sessionList = new SessionList();
|
||||||
this._sessionList.connect('session-activated',
|
this._sessionList.connect('session-activated',
|
||||||
@ -854,7 +851,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
|
|
||||||
function() {
|
function() {
|
||||||
this._sessionList.close();
|
this._sessionList.close();
|
||||||
this._promptFingerprintMessage.hide();
|
this._promptLoginHint.hide();
|
||||||
this._userList.actor.show();
|
this._userList.actor.show();
|
||||||
this._userList.actor.opacity = 255;
|
this._userList.actor.opacity = 255;
|
||||||
return this._userList.showItems();
|
return this._userList.showItems();
|
||||||
@ -875,12 +872,14 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._sessionList.setActiveSession(sessionId);
|
this._sessionList.setActiveSession(sessionId);
|
||||||
},
|
},
|
||||||
|
|
||||||
_showFingerprintPrompt: function() {
|
_showLoginHint: function(verifier, message) {
|
||||||
GdmUtil.fadeInActor(this._promptFingerprintMessage);
|
this._promptLoginHint.set_text(message)
|
||||||
|
GdmUtil.fadeInActor(this._promptLoginHint);
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideFingerprintPrompt: function() {
|
_hideLoginHint: function() {
|
||||||
GdmUtil.fadeOutActor(this._promptFingerprintMessage);
|
GdmUtil.fadeOutActor(this._promptLoginHint);
|
||||||
|
this._promptLoginHint.set_text('');
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel: function() {
|
cancel: function() {
|
||||||
@ -899,8 +898,8 @@ const LoginDialog = new Lang.Class({
|
|||||||
function() {
|
function() {
|
||||||
// Show it with 0 opacity so we preallocate space for it
|
// Show it with 0 opacity so we preallocate space for it
|
||||||
// in the event we need to fade in the message
|
// in the event we need to fade in the message
|
||||||
this._promptFingerprintMessage.opacity = 0;
|
this._promptLoginHint.opacity = 0;
|
||||||
this._promptFingerprintMessage.show();
|
this._promptLoginHint.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
@ -972,7 +971,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
this._promptFingerprintMessage.hide();
|
this._promptLoginHint.hide();
|
||||||
this._promptEntry.reactive = true;
|
this._promptEntry.reactive = true;
|
||||||
this._promptEntry.set_text('');
|
this._promptEntry.set_text('');
|
||||||
}];
|
}];
|
||||||
|
@ -211,7 +211,10 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
// as a cue to display our own message.
|
// as a cue to display our own message.
|
||||||
if (serviceName == FINGERPRINT_SERVICE_NAME &&
|
if (serviceName == FINGERPRINT_SERVICE_NAME &&
|
||||||
this._haveFingerprintReader) {
|
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) {
|
} else if (serviceName == PASSWORD_SERVICE_NAME) {
|
||||||
Main.notifyError(info);
|
Main.notifyError(info);
|
||||||
}
|
}
|
||||||
@ -261,7 +264,7 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
if (serviceName == PASSWORD_SERVICE_NAME) {
|
if (serviceName == PASSWORD_SERVICE_NAME) {
|
||||||
this.emit('verification-failed');
|
this.emit('verification-failed');
|
||||||
} else if (serviceName == FINGERPRINT_SERVICE_NAME) {
|
} else if (serviceName == FINGERPRINT_SERVICE_NAME) {
|
||||||
this.emit('hide-fingerprint-prompt');
|
this.emit('hide-login-hint');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -97,8 +97,8 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
|
this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
|
||||||
this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
|
this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
|
||||||
|
|
||||||
this._userVerifier.connect('show-fingerprint-prompt', Lang.bind(this, this._showFingerprintPrompt));
|
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
|
||||||
this._userVerifier.connect('hide-fingerprint-prompt', Lang.bind(this, this._hideFingerprintPrompt));
|
this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint));
|
||||||
|
|
||||||
this._userWidget = new UserWidget(this._user);
|
this._userWidget = new UserWidget(this._user);
|
||||||
this.contentLayout.add_actor(this._userWidget.actor);
|
this.contentLayout.add_actor(this._userWidget.actor);
|
||||||
@ -122,12 +122,9 @@ const UnlockDialog = new Lang.Class({
|
|||||||
|
|
||||||
this.contentLayout.add_actor(this._promptLayout);
|
this.contentLayout.add_actor(this._promptLayout);
|
||||||
|
|
||||||
// Translators: this message is shown below the password entry field
|
this._promptLoginHint = new St.Label({ style_class: 'login-dialog-prompt-login-hint' });
|
||||||
// to indicate the user can swipe their finger instead
|
this._promptLoginHint.hide();
|
||||||
this._promptFingerprintMessage = new St.Label({ text: _("(or swipe finger)"),
|
this.contentLayout.add_actor(this._promptLoginHint);
|
||||||
style_class: 'login-dialog-prompt-fingerprint-message' });
|
|
||||||
this._promptFingerprintMessage.hide();
|
|
||||||
this.contentLayout.add_actor(this._promptFingerprintMessage);
|
|
||||||
|
|
||||||
let cancelButton = { label: _("Cancel"),
|
let cancelButton = { label: _("Cancel"),
|
||||||
action: Lang.bind(this, this._escape),
|
action: Lang.bind(this, this._escape),
|
||||||
@ -183,12 +180,13 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._updateOkButton(true);
|
this._updateOkButton(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_showFingerprintPrompt: function() {
|
_showLoginHint: function(verifier, message) {
|
||||||
GdmUtil.fadeInActor(this._promptFingerprintMessage);
|
this._promptLoginHint.set_text(message)
|
||||||
|
GdmUtil.fadeInActor(this._promptLoginHint);
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideFingerprintPrompt: function() {
|
_hideLoginHint: function() {
|
||||||
GdmUtil.fadeOutActor(this._promptFingerprintMessage);
|
GdmUtil.fadeOutActor(this._promptLoginHint);
|
||||||
},
|
},
|
||||||
|
|
||||||
_doUnlock: function() {
|
_doUnlock: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user