userMenu: Update the user information if the object is already loaded

Any time we get a cached user object from the AccountsService, it will
already be loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=658605
This commit is contained in:
Jasper St. Pierre 2011-09-08 17:11:45 -04:00
parent 0f4ce5dd4e
commit 543b29efe7

View File

@ -194,6 +194,10 @@ IMStatusChooserItem.prototype = {
this._userChangedId = this._user.connect('changed',
Lang.bind(this,
this._updateUser));
this.actor.connect('notify::mapped', Lang.bind(this, function() {
if (this.actor.mapped)
this._updateUser();
}));
},
// Override getColumnWidths()/setColumnWidths() to make the item
@ -421,6 +425,7 @@ UserMenuButton.prototype = {
box.add(this._name, { y_align: St.Align.MIDDLE, y_fill: false });
this._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName));
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName));
this._updateUserName();
this._createSubMenu();
this._userManager.connect('notify::is-loaded',