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:
parent
0f4ce5dd4e
commit
543b29efe7
@ -194,6 +194,10 @@ IMStatusChooserItem.prototype = {
|
|||||||
this._userChangedId = this._user.connect('changed',
|
this._userChangedId = this._user.connect('changed',
|
||||||
Lang.bind(this,
|
Lang.bind(this,
|
||||||
this._updateUser));
|
this._updateUser));
|
||||||
|
this.actor.connect('notify::mapped', Lang.bind(this, function() {
|
||||||
|
if (this.actor.mapped)
|
||||||
|
this._updateUser();
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
// Override getColumnWidths()/setColumnWidths() to make the item
|
// 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 });
|
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._userLoadedId = this._user.connect('notify::is-loaded', Lang.bind(this, this._updateUserName));
|
||||||
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName));
|
this._userChangedId = this._user.connect('changed', Lang.bind(this, this._updateUserName));
|
||||||
|
this._updateUserName();
|
||||||
|
|
||||||
this._createSubMenu();
|
this._createSubMenu();
|
||||||
this._userManager.connect('notify::is-loaded',
|
this._userManager.connect('notify::is-loaded',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user