diff options
author | Denis Fomin <fominde@gmail.com> | 2011-09-15 22:04:10 +0400 |
---|---|---|
committer | Denis Fomin <fominde@gmail.com> | 2011-09-15 22:04:10 +0400 |
commit | 760f6db165854b606a34e1683b016c06c869d4cd (patch) | |
tree | e57d712b6bc8e5412ffa7c03ddb6b597bad7d7a1 /roster_tweaks/roster_tweaks.py | |
parent | d0da2249f3ca6d4febaf5b6952055a07fed4913a (diff) |
roster_tweaks. coding style
Diffstat (limited to 'roster_tweaks/roster_tweaks.py')
-rw-r--r-- | roster_tweaks/roster_tweaks.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/roster_tweaks/roster_tweaks.py b/roster_tweaks/roster_tweaks.py index 10fa6ab..1bae1fa 100644 --- a/roster_tweaks/roster_tweaks.py +++ b/roster_tweaks/roster_tweaks.py @@ -110,9 +110,7 @@ class RosterTweaksPlugin(GajimPlugin): self.pep_dict['activity_text'] = text self.draw_activity() accounts = gajim.connections.keys() - for account in accounts: - if gajim.account_is_connected(account): - gajim.interface.roster.send_pep(account, self.pep_dict) + self.send_pep() ChangeActivityDialog(on_response, self.pep_dict.get('activity', None), self.pep_dict.get('subactivity', None), self.pep_dict.get('activity_text', None)) @@ -123,12 +121,16 @@ class RosterTweaksPlugin(GajimPlugin): self.pep_dict['mood_text'] = text self.draw_mood() accounts = gajim.connections.keys() - for account in accounts: - if gajim.account_is_connected(account): - gajim.interface.roster.send_pep(account, self.pep_dict) + self.send_pep() ChangeMoodDialog(on_response, self.pep_dict.get('mood', None), self.pep_dict.get('mood_text', None)) + def send_pep(self): + accounts = gajim.connections.keys() + for account in accounts: + if gajim.account_is_connected(account): + gajim.interface.roster.send_pep(account, self.pep_dict) + def draw_activity(self): """ Set activity button |