-Use common format for function documentation.

-Specify separation for 'gc_nicknames_colors' option.
This commit is contained in:
Jean-Marie Traissard 2008-11-08 11:14:31 +00:00
parent a76f6b0133
commit fdc6b9d8bc
2 changed files with 4 additions and 5 deletions

View File

@ -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': [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.')], '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')], '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.')], '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.')], '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.')], '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.')],

View File

@ -57,8 +57,8 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
stanza_session.EncryptedStanzaSession.terminate(self) stanza_session.EncryptedStanzaSession.terminate(self)
self.detach_from_control() self.detach_from_control()
# extracts chatstate from a <message/> stanza
def get_chatstate(self, msg, msgtxt): def get_chatstate(self, msg, msgtxt):
'''extracts chatstate from a <message/> stanza'''
composing_xep = None composing_xep = None
chatstate = None chatstate = None
@ -83,8 +83,8 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
return (composing_xep, chatstate) return (composing_xep, chatstate)
# dispatch a received <message> stanza
def received(self, full_jid_with_resource, msgtxt, tim, encrypted, msg): def received(self, full_jid_with_resource, msgtxt, tim, encrypted, msg):
'''dispatch a received <message> stanza'''
msg_type = msg.getType() msg_type = msg.getType()
subject = msg.getSubject() subject = msg.getSubject()
@ -252,11 +252,10 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
[full_jid_with_resource, msgtxt, tim, encrypted, msg_type, subject, [full_jid_with_resource, msgtxt, tim, encrypted, msg_type, subject,
chatstate, msg_id, composing_xep, user_nick, xhtml, form_node])) 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='', def roster_message(self, jid, msg, tim, encrypted=False, msg_type='',
subject=None, resource='', msg_id=None, user_nick='', subject=None, resource='', msg_id=None, user_nick='',
advanced_notif_num=None, xhtml=None, form_node=None): advanced_notif_num=None, xhtml=None, form_node=None):
'''display the message or show notification in the roster'''
contact = None contact = None
# if chat window will be for specific resource # if chat window will be for specific resource
resource_for_chat = resource resource_for_chat = resource