unlockDialog: Remove 'Login as another user' Label

According to the new mockups, logging in as another user
should be handled by the (<) button present on the lock-screen.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
This commit is contained in:
Umang Jain
2020-02-01 20:53:59 +05:30
committed by Florian Müllner
parent 7fc4fe9a97
commit c6a79fafc9
2 changed files with 13 additions and 39 deletions

View File

@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported UnlockDialog */
const { AccountsService, Atk, Clutter, Gdm, Gio,
const { AccountsService, Atk, Clutter, Gdm,
GnomeDesktop, GLib, GObject, Meta, Shell, St } = imports.gi;
const Background = imports.ui.background;
@ -550,24 +550,6 @@ var UnlockDialog = GObject.registerClass({
this._promptBox.add_child(this._authPrompt);
let screenSaverSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.screensaver' });
if (screenSaverSettings.get_boolean('user-switch-enabled')) {
let otherUserLabel = new St.Label({
text: _('Log in as another user'),
style_class: 'login-dialog-not-listed-label',
});
this._otherUserButton = new St.Button({
style_class: 'login-dialog-not-listed-button',
can_focus: true,
child: otherUserLabel,
reactive: true,
});
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
this._promptBox.add_child(this._otherUserButton);
} else {
this._otherUserButton = null;
}
this._authPrompt.reset();
this._updateSensitivity(true);
}
@ -575,28 +557,17 @@ var UnlockDialog = GObject.registerClass({
_maybeDestroyAuthPrompt() {
let focus = global.stage.key_focus;
if (focus === null ||
(this._authPrompt && this._authPrompt.contains(focus)) ||
(this._otherUserButton && focus === this._otherUserButton))
(this._authPrompt && this._authPrompt.contains(focus)))
this.grab_key_focus();
if (this._authPrompt) {
this._authPrompt.destroy();
this._authPrompt = null;
}
if (this._otherUserButton) {
this._otherUserButton.destroy();
this._otherUserButton = null;
}
}
_updateSensitivity(sensitive) {
this._authPrompt.updateSensitivity(sensitive);
if (this._otherUserButton) {
this._otherUserButton.reactive = sensitive;
this._otherUserButton.can_focus = sensitive;
}
}
_showClock() {
@ -668,12 +639,6 @@ var UnlockDialog = GObject.registerClass({
this._authPrompt.cancel();
}
_otherUserClicked() {
Gdm.goto_login_session_sync(null);
this._authPrompt.cancel();
}
_onDestroy() {
this.popModal();