userMenu: Consider account-validity for sensitivity

We currently only update the status chooser's sensitivity if accounts
are added, removed or enabled; unfortunately during account creation,
the account may become enabled before it is actually valid, so the
status chooser remains insensitive. Fix by listening to validity changes
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=672265
This commit is contained in:
Florian Müllner 2012-03-16 22:47:42 +01:00
parent 8a5faa3d2e
commit cf0b6dda25

View File

@ -165,6 +165,8 @@ const IMStatusChooserItem = new Lang.Class({
Lang.bind(this, this._IMAccountsChanged));
this._accountMgr.connect('account-removed',
Lang.bind(this, this._IMAccountsChanged));
this._accountMgr.connect('account-validity-changed',
Lang.bind(this, this._IMAccountsChanged));
this._accountMgr.prepare_async(null, Lang.bind(this,
function(mgr) {
let [presence, status, msg] = mgr.get_most_available_presence();