fix patch2 applying line OBS-URL: https://build.opensuse.org/request/show/423906 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=270
39 lines
1.8 KiB
Diff
39 lines
1.8 KiB
Diff
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
index 2f70c1f..642f9a2 100644
|
|
--- a/js/gdm/loginDialog.js
|
|
+++ b/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;
|
|
|
|
@@ -1232,14 +1240,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',
|