Not sure if this a bug in the GlobalPresence class or the code using it.
Further inspection showed my local-xmpp account to remain in "connecting" mode permanently, so it was kinda doing the right thing..
I think we should set a timeout like 60s and then stop it with some error (perhapes an error icon instead of the wheel?).
I saw this when adding a second MSN account. First account was fine. Second account spins forever and never connects.
*** Bug 289269 has been marked as a duplicate of this bug. ***
I propose this solution: - after 30 or 60 seconds check if there is any account in connecting state. --- If so, try setting it offline and back online. ------ Try this 2 or 3 times, if it won't connect, just disable it and inform the user. --- If there is no account in connecting state, simply stop the spinning wheel and either show a yellow warning triangle that not all accounts are on the chosen presence or simply ignore it and just stop the wheel. What do you think?
Can we move this where the global presence is handled? We could have a signal there to say that some account started to connect and another to say that all accounts finished connecting
That's exactly how it works right now. But apparently this doesn't solve anything as your account can be stucked in connecting forever (like David reported) and it can also happen when you are already connected, but are stucked in simply changing presence. Therefore my proposed solution.
Before we go about proposing solutions we need to identify the cause of the problem. I've also seen this wheel spin when no accounts thought they were actually doing anything. I personally think TpQt4 sometimes forgets to emit "changingPresence" when something can't connect. but it's also possible there are a few scenarios that all cause the same issue. It may turn out Martin's idea makes sense, but we need to identify the causes first, we may be masking a problem not solving it.
Everyone add this line to global-presence in onChangingPresence() Q_FOREACH(const Tp::AccountPtr &account, m_enabledAccounts->accounts()) { + kDebug() << account->displayName() << account->isChangingPresence(); In my case it's shows that isChangingPresence is true. mc-tool for this account shows: Automatic: available (2) "" Current: (0) "" Requested: available (2) "Online" so it's not at the presence requested, but Accounts KCM (and Empathy) both show it as connected and online.
-In my case it's shows that isChangingPresence is true. +In my case it's shows that isChangingPresence is true for my IRC account.
*** Bug 291209 has been marked as a duplicate of this bug. ***
Git commit 6510aa20ece700d845a9a984a0f84205e0374e3a by David Edmundson. Committed on 19/01/2012 at 20:58. Pushed by davidedmundson into branch 'master'. Use connectionStatus for the spinner rather than changingPresence. REVIEW: 103738 M +3 -3 global-presence-chooser.cpp M +1 -1 global-presence-chooser.h http://commits.kde.org/telepathy-contact-list/6510aa20ece700d845a9a984a0f84205e0374e3a
I've not heard any complaints since I made that patch so I'm closing this.