From fdc6b9d8bca087baf235eefd3af2434ad55ba81a Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard <jim@lapin.org> Date: Sat, 8 Nov 2008 11:14:31 +0000 Subject: [PATCH] -Use common format for function documentation. -Specify separation for 'gc_nicknames_colors' option. --- src/common/config.py | 2 +- src/session.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/config.py b/src/common/config.py index b7bbdb4eb1..6b56b94f33 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -250,7 +250,7 @@ class Config: 'chat_merge_consecutive_nickname': [opt_bool, False, _('In a chat, show the nickname at the beginning of a line only when it\'s not the same person talking than in previous message.')], 'chat_merge_consecutive_nickname_indent': [opt_str, ' ', _('Indentation when using merge consecutive nickname.')], 'use_smooth_scrolling': [opt_bool, True, _('Smooth scroll message in conversation window')], - 'gc_nicknames_colors': [ opt_str, '#a34526:#c000ff:#0012ff:#388a99:#045723:#7c7c7c:#ff8a00:#94452d:#244b5a:#32645a', _('List of colors that will be used to color nicknames in group chats.'), True ], + 'gc_nicknames_colors': [ opt_str, '#a34526:#c000ff:#0012ff:#388a99:#045723:#7c7c7c:#ff8a00:#94452d:#244b5a:#32645a', _('List of colors, separated by ":", that will be used to color nicknames in group chats.'), True ], 'ctrl_tab_go_to_next_composing': [opt_bool, True, _('Ctrl-Tab go to next composing tab when none is unread.')], 'confirm_metacontacts': [ opt_str, '', _('Should we show the confirm metacontacts creation dialog or not? Empty string means we never show the dialog.')], 'enable_negative_priority': [ opt_bool, False, _('If True, you will be able to set a negative priority to your account in account modification window. BE CAREFUL, when you are logged in with a negative priority, you will NOT receive any message from your server.')], diff --git a/src/session.py b/src/session.py index c736857900..bdc8a70df5 100644 --- a/src/session.py +++ b/src/session.py @@ -57,8 +57,8 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): stanza_session.EncryptedStanzaSession.terminate(self) self.detach_from_control() - # extracts chatstate from a <message/> stanza def get_chatstate(self, msg, msgtxt): + '''extracts chatstate from a <message/> stanza''' composing_xep = None chatstate = None @@ -83,8 +83,8 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): return (composing_xep, chatstate) - # dispatch a received <message> stanza def received(self, full_jid_with_resource, msgtxt, tim, encrypted, msg): + '''dispatch a received <message> stanza''' msg_type = msg.getType() subject = msg.getSubject() @@ -252,11 +252,10 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): [full_jid_with_resource, msgtxt, tim, encrypted, msg_type, subject, chatstate, msg_id, composing_xep, user_nick, xhtml, form_node])) - # display the message or show notification in the roster def roster_message(self, jid, msg, tim, encrypted=False, msg_type='', subject=None, resource='', msg_id=None, user_nick='', advanced_notif_num=None, xhtml=None, form_node=None): - + '''display the message or show notification in the roster''' contact = None # if chat window will be for specific resource resource_for_chat = resource -- GitLab