userMenu: Don't disconnect account signals when disabled
By disconnecting the 'notify::connection-status' signal as soon as the account is disabled, we were missing the signal telling us when the status was moving from CONNECTING/CONNECTED to DISCONNECTED and so the status icon was never updated. What we really want is to disconnect the signal when the account is removed from the account manager as we don't care about it any more. https://bugzilla.gnome.org/show_bug.cgi?id=669112
This commit is contained in:
parent
59246babea
commit
e92719b98d
@ -481,10 +481,8 @@ const UserMenuButton = new Lang.Class({
|
|||||||
Lang.bind(this, this._updatePresenceIcon));
|
Lang.bind(this, this._updatePresenceIcon));
|
||||||
this._accountMgr.connect('account-enabled',
|
this._accountMgr.connect('account-enabled',
|
||||||
Lang.bind(this, this._onAccountEnabled));
|
Lang.bind(this, this._onAccountEnabled));
|
||||||
this._accountMgr.connect('account-disabled',
|
|
||||||
Lang.bind(this, this._onAccountDisabled));
|
|
||||||
this._accountMgr.connect('account-removed',
|
this._accountMgr.connect('account-removed',
|
||||||
Lang.bind(this, this._onAccountDisabled));
|
Lang.bind(this, this._onAccountRemoved));
|
||||||
this._accountMgr.prepare_async(null, Lang.bind(this,
|
this._accountMgr.prepare_async(null, Lang.bind(this,
|
||||||
function(mgr) {
|
function(mgr) {
|
||||||
let [presence, s, msg] = mgr.get_most_available_presence();
|
let [presence, s, msg] = mgr.get_most_available_presence();
|
||||||
@ -645,7 +643,7 @@ const UserMenuButton = new Lang.Class({
|
|||||||
this._updateChangingPresence();
|
this._updateChangingPresence();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onAccountDisabled: function(accountMgr, account) {
|
_onAccountRemoved: function(accountMgr, account) {
|
||||||
account.disconnect(account._changingId);
|
account.disconnect(account._changingId);
|
||||||
account._changingId = 0;
|
account._changingId = 0;
|
||||||
this._updateChangingPresence();
|
this._updateChangingPresence();
|
||||||
|
Loading…
Reference in New Issue
Block a user