diff options
author | Denis Fomin <fominde@gmail.com> | 2011-09-15 21:59:31 +0400 |
---|---|---|
committer | Denis Fomin <fominde@gmail.com> | 2011-09-15 21:59:31 +0400 |
commit | d0da2249f3ca6d4febaf5b6952055a07fed4913a (patch) | |
tree | 4675b890d5015188e9fa4e492f833c92b374ac22 /roster_tweaks | |
parent | 039a83f4952b8459edbb5bdb176c030e2ef7dbdd (diff) |
roster_tweaks.do not change status,pep and mood for not connected accounts
Diffstat (limited to 'roster_tweaks')
-rw-r--r-- | roster_tweaks/roster_tweaks.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roster_tweaks/roster_tweaks.py b/roster_tweaks/roster_tweaks.py index 46c9001..10fa6ab 100644 --- a/roster_tweaks/roster_tweaks.py +++ b/roster_tweaks/roster_tweaks.py @@ -92,6 +92,8 @@ class RosterTweaksPlugin(GajimPlugin): accounts = gajim.connections.keys() message = widget.get_text() for account in accounts: + if not gajim.account_is_connected(account): + continue current_show = gajim.SHOW_LIST[ gajim.connections[account].connected] gajim.interface.roster.send_status(account, current_show, @@ -109,7 +111,8 @@ class RosterTweaksPlugin(GajimPlugin): self.draw_activity() accounts = gajim.connections.keys() for account in accounts: - gajim.interface.roster.send_pep(account, self.pep_dict) + if gajim.account_is_connected(account): + gajim.interface.roster.send_pep(account, self.pep_dict) ChangeActivityDialog(on_response, self.pep_dict.get('activity', None), self.pep_dict.get('subactivity', None), self.pep_dict.get('activity_text', None)) @@ -121,7 +124,8 @@ class RosterTweaksPlugin(GajimPlugin): self.draw_mood() accounts = gajim.connections.keys() for account in accounts: - gajim.interface.roster.send_pep(account, self.pep_dict) + if gajim.account_is_connected(account): + gajim.interface.roster.send_pep(account, self.pep_dict) ChangeMoodDialog(on_response, self.pep_dict.get('mood', None), self.pep_dict.get('mood_text', None)) |