[gnome-shell] loginDialog: move user list loading after actors are constructed
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] loginDialog: move user list loading after actors are constructed
- Date: Mon, 13 Jan 2014 17:43:10 +0000 (UTC)
commit 765d0228c04710608c6b674d9ef41af9906480b8
Author: Ray Strode <rstrode redhat com>
Date: Fri Jan 10 09:27:46 2014 -0500
loginDialog: move user list loading after actors are constructed
Right now we queue populating the user list in the middle of setting
up the dialog actors. Of course, the actual population happens some time
later after going back to the main loop.
It's more logical to structure the code so the the actors are
instantiated first in one block and then other things after that.
This commit moves the user list population enqueuing operation to the
bottom of the constuctor.
https://bugzilla.gnome.org/show_bug.cgi?id=721868
js/gdm/loginDialog.js | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 49ca5ea..7810b03 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -454,18 +454,6 @@ const LoginDialog = new Lang.Class({
this.actor.add_child(this._logoBin);
this._updateLogo();
- if (!this._userManager.is_loaded)
- this._userManagerLoadedId = this._userManager.connect('notify::is-loaded',
- Lang.bind(this, function() {
- if (this._userManager.is_loaded) {
- this._loadUserList();
-
this._userManager.disconnect(this._userManagerLoadedId);
- this._userManagerLoadedId = 0;
- }
- }));
- else
- GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList));
-
this._userList.connect('activate',
Lang.bind(this, function(userList, item) {
this._onUserListActivated(item);
@@ -481,6 +469,18 @@ const LoginDialog = new Lang.Class({
this._sessionMenuButton.actor.show();
this._authPrompt.addActorToDefaultButtonWell(this._sessionMenuButton.actor);
+ if (!this._userManager.is_loaded)
+ this._userManagerLoadedId = this._userManager.connect('notify::is-loaded',
+ Lang.bind(this, function() {
+ if (this._userManager.is_loaded) {
+ this._loadUserList();
+
this._userManager.disconnect(this._userManagerLoadedId);
+ this._userManagerLoadedId = 0;
+ }
+ }));
+ else
+ GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList));
+
},
_updateDisableUserList: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]