comparison frontends/sortilege_old/chat.py @ 688:f7878ad3c846

tools: renamed tools.jid.JID attribute "short" to "bare"
author souliane <souliane@mailoo.org>
date Tue, 29 Oct 2013 16:26:55 +0100
parents 84a6e83157c2
children
comparison
equal deleted inserted replaced
687:af0d08a84cc6 688:f7878ad3c846
80 irange.reverse() #we print the text upward 80 irange.reverse() #we print the text upward
81 for idx in irange: 81 for idx in irange:
82 header=self.__getHeader(self.content[idx]) 82 header=self.__getHeader(self.content[idx])
83 msg=self.content[idx][2] 83 msg=self.content[idx][2]
84 part=0 #part of the text 84 part=0 #part of the text
85 if JID(self.content[idx][1]).short==self.host.profiles[self.host.profile]['whoami'].short: 85 if JID(self.content[idx][1]).bare==self.host.profiles[self.host.profile]['whoami'].bare:
86 att_header=curses.color_pair(1) 86 att_header=curses.color_pair(1)
87 else: 87 else:
88 att_header=curses.color_pair(2) 88 att_header=curses.color_pair(2)
89 89
90 while (msg): 90 while (msg):
138 if timestamp=="": 138 if timestamp=="":
139 current_time=time() 139 current_time=time()
140 timestamp=str(current_time) 140 timestamp=str(current_time)
141 if self.last_history and current_time - float(self.last_history) < 5: #FIXME: Q&D fix to avoid double print on new chat window 141 if self.last_history and current_time - float(self.last_history) < 5: #FIXME: Q&D fix to avoid double print on new chat window
142 return 142 return
143 self.content.append([timestamp,jid.short,msg]) 143 self.content.append([timestamp,jid.bare,msg])
144 self.update() 144 self.update()
145 145
146 def handleKey(self, k): 146 def handleKey(self, k):
147 if k == C('p'): 147 if k == C('p'):
148 self.scrollIdxUp() 148 self.scrollIdxUp()