gnome-shell/gnome-shell-878951-hide-list-with-no-user.patch
Bjørn Lie d4505593a2 Accepting request 513774 from home:xiaoguang_wang:branches:SLE-classic-3-24-3
- Update sle-classic patches to version 3.24.3:
  + Update aboutMenu.js
  + Update endSession-dialog-update-time-label-every-sec.patch
  + Update gnome-shell-1007468-lock-screen-SUSE-logo-missing.patch
  + Update gnome-shell-864872-unlock-by-mouse-motion.patch
  + Update gnome-shell-878951-hide-list-with-no-user.patch
  + Update gnome-shell-domain.patch
  + Update gnome-shell-gdm-login-applet.patch
  + Update gnome-shell-lock-bg-on-primary.patch
  + Update
    gnome-shell-login-fix-session-button-can-be-clicked.patch
  + Update gnome-shell-screen-disappear.patch
  + Update gs-fate318433-prevent-same-account-multi-logins.patch
  + Update gs-sle-classic-ext.patch

OBS-URL: https://build.opensuse.org/request/show/513774
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=315
2017-08-05 12:05:52 +00:00

39 lines
1.9 KiB
Diff

Index: gnome-shell-3.24.3/js/gdm/loginDialog.js
===================================================================
--- gnome-shell-3.24.3.orig/js/gdm/loginDialog.js
+++ gnome-shell-3.24.3/js/gdm/loginDialog.js
@@ -730,6 +730,14 @@ const LoginDialog = new Lang.Class({
_updateDisableUserList: function() {
let disableUserList = this._settings.get_boolean(GdmUtil.DISABLE_USER_LIST_KEY);
+ // Disable user list when there are no users.
+ if (( disableUserList == false ) && ( this._userListLoaded == true )) {
+ let items = this._userList._items;
+ if ( Object.keys(items).length === 0 ) {
+ disableUserList = true;
+ }
+ }
+
if (disableUserList != this._disableUserList) {
this._disableUserList = disableUserList;
@@ -1264,14 +1272,18 @@ const LoginDialog = new Lang.Class({
this._userList.addUser(users[i]);
}
+ this._updateDisableUserList();
+
this._userAddedId = this._userManager.connect('user-added',
Lang.bind(this, function(userManager, user) {
this._userList.addUser(user);
+ this._updateDisableUserList();
}));
this._userRemovedId = this._userManager.connect('user-removed',
Lang.bind(this, function(userManager, user) {
this._userList.removeUser(user);
+ this._updateDisableUserList();
}));
this._userChangedId = this._userManager.connect('user-changed',