comparison frontends/quick_frontend/quick_chat.py @ 79:db0a0f000e37

Chat presentation enhancement - core: message signal is not sent anymore for groupchat type, cause MUC chat server do it for us - wix: user nick can now be specified to chat windows, usefull for colorization - memory: full jid are now sent - wix: message from user are now in black for group chat
author Goffi <goffi@goffi.org>
date Wed, 31 Mar 2010 19:56:43 +1100
parents f271fff3a713
children fc7583282d40
comparison
equal deleted inserted replaced
78:ace2af8abc5a 79:db0a0f000e37
28 28
29 def __init__(self, target, host, type='one2one'): 29 def __init__(self, target, host, type='one2one'):
30 self.target = target 30 self.target = target
31 self.host = host 31 self.host = host
32 self.type = type 32 self.type = type
33 self.nick = None
33 34
34 def setType(self, type): 35 def setType(self, type):
35 """Set the type of the chat 36 """Set the type of the chat
36 @param type: can be 'one2one' for single conversation or 'group' for chat à la IRC 37 @param type: can be 'one2one' for single conversation or 'group' for chat à la IRC
37 """ 38 """
38 self.type = type 39 self.type = type
40
41 def setUserNick(self, nick):
42 """Set the nick of the user, usefull for e.g. change the color of the user"""
43 self.nick = nick
39 44
40 def historyPrint(self, size=20, keep_last=False, profile='@NONE@'): 45 def historyPrint(self, size=20, keep_last=False, profile='@NONE@'):
41 """Print the initial history""" 46 """Print the initial history"""
42 debug (_("now we print history")) 47 debug (_("now we print history"))
43 history=self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].short, self.target, 20) 48 history=self.host.bridge.getHistory(self.host.profiles[profile]['whoami'].short, self.target, 20)