coding style

This commit is contained in:
Denis Fomin
2010-12-06 17:37:14 +03:00
parent 1e9d3b284b
commit 4fcf603aae
8 changed files with 96 additions and 83 deletions

View File

@@ -17,13 +17,12 @@ class ChatstatePlugin(GajimPlugin):
@log_calls('ChatstatePlugin')
def init(self):
self.config_dialog = None#ChatstatePluginConfigDialog(self)
self.events_handlers = {'raw-message-received' :
(ged.POSTCORE, self.raw_pres_received),}
self.config_dialog = None # ChatstatePluginConfigDialog(self)
self.events_handlers = {'raw-message-received':
(ged.POSTCORE, self.raw_pres_received), }
self.chatstates = ('active', 'composing', 'gone', 'inactive', 'paused')
self.active = None
def raw_pres_received(self, event_object):
if not self.active:
return
@@ -64,11 +63,12 @@ class ChatstatePlugin(GajimPlugin):
name = '<span foreground="%s">%s</span>' % (
color, name)
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
if contact.status and gajim.config.get(
'show_status_msgs_in_roster'):
status = contact.status.strip()
if status != '':
status = helpers.reduce_chars_newlines(status,
max_lines = 1)
max_lines=1)
color = gtkgui_helpers.get_fade_color(
gajim.interface.roster.tree, False, False)
colorstring = '#%04x%04x%04x' % (color.red, color.green,