mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
unlockDialog: Only show switch-user button for multiple users
We don't offer "Switch user" on single-user systems when unlocked, so it is a bit weird to include it while locked. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2475>
This commit is contained in:
parent
4d544d7b56
commit
756f212d66
1 changed files with 5 additions and 2 deletions
|
|
@ -585,8 +585,10 @@ export const UnlockDialog = GObject.registerClass({
|
|||
this._lockdownSettings.connect('changed::disable-user-switching',
|
||||
this._updateUserSwitchVisibility.bind(this));
|
||||
|
||||
this._user.connectObject('notify::is-loaded',
|
||||
this._updateUserSwitchVisibility.bind(this), this);
|
||||
this._user.connectObject(
|
||||
'notify::is-loaded', () => this._updateUserSwitchVisibility(),
|
||||
'notify::has-multiple-users', () => this._updateUserSwitchVisibility(),
|
||||
this);
|
||||
|
||||
this._updateUserSwitchVisibility();
|
||||
|
||||
|
|
@ -850,6 +852,7 @@ export const UnlockDialog = GObject.registerClass({
|
|||
|
||||
_updateUserSwitchVisibility() {
|
||||
this._otherUserButton.visible = this._userManager.can_switch() &&
|
||||
this._userManager.has_multiple_users &&
|
||||
this._screenSaverSettings.get_boolean('user-switch-enabled') &&
|
||||
!this._lockdownSettings.get_boolean('disable-user-switching');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue