comparison frontends/primitivus/chat.py @ 153:f197b52796ee

Primitivus: begining of management for actionResult
author Goffi <goffi@goffi.org>
date Sat, 31 Jul 2010 00:34:05 +0800
parents 80661755ea8d
children a50953ac6191
comparison
equal deleted inserted replaced
152:b1f1955d96b3 153:f197b52796ee
106 elif key == "meta n": #user wants to (not) use short nick 106 elif key == "meta n": #user wants to (not) use short nick
107 self.show_short_nick = not self.show_short_nick 107 self.show_short_nick = not self.show_short_nick
108 for wid in self.content: 108 for wid in self.content:
109 wid._invalidate() 109 wid._invalidate()
110 elif key == "meta l": #user wants to (un)hide widget decoration 110 elif key == "meta l": #user wants to (un)hide widget decoration
111 show = not self._w.__class__ == custom_widgets.LabelLine 111 show = not isinstance(self._w, custom_widgets.LabelLine)
112 self.showDecoration(show) 112 self.showDecoration(show)
113 self._invalidate() 113 self._invalidate()
114 elif key == "meta s": #user wants to (un)hide group's subject 114 elif key == "meta s": #user wants to (un)hide group's subject
115 if self.subject: 115 if self.subject:
116 self.show_title = (self.show_title + 1) % 3 116 self.show_title = (self.show_title + 1) % 3
221 QuickChat.removeUser(self, nick) 221 QuickChat.removeUser(self, nick)
222 self.present_wid.deleteValue(nick) 222 self.present_wid.deleteValue(nick)
223 self.host.redraw() 223 self.host.redraw()
224 224
225 def printMessage(self, from_jid, msg, profile, timestamp=""): 225 def printMessage(self, from_jid, msg, profile, timestamp=""):
226 assert (from_jid.__class__ == JID) 226 assert isinstance(from_jid, JID)
227 my_jid = self.host.profiles[profile]['whoami'] 227 my_jid = self.host.profiles[profile]['whoami']
228 self.content.append(ChatText(self, timestamp or None, my_jid, from_jid, msg)) 228 self.content.append(ChatText(self, timestamp or None, my_jid, from_jid, msg))
229 self.text_list.set_focus(len(self.content)-1) 229 self.text_list.set_focus(len(self.content)-1)
230 self.host.redraw() 230 self.host.redraw()
231 231