comparison frontends/src/primitivus/chat.py @ 1125:d6c3fea5ecfe

quick_frontend, primitivus: add primitivus command ":history [limit]" (default value for limit is 50)
author souliane <souliane@mailoo.org>
date Sat, 23 Aug 2014 20:26:04 +0200
parents d1f6b927131e
children 8870417c8e8c
comparison
equal deleted inserted replaced
1124:7ee18dbfb661 1125:d6c3fea5ecfe
273 nick = unicode(param_nick) #FIXME: should be done in DBus bridge 273 nick = unicode(param_nick) #FIXME: should be done in DBus bridge
274 QuickChat.removeUser(self, nick, show_info) 274 QuickChat.removeUser(self, nick, show_info)
275 self.present_wid.deleteValue(nick) 275 self.present_wid.deleteValue(nick)
276 self.host.redraw() 276 self.host.redraw()
277 277
278 def clearHistory(self):
279 """Clear the content of this chat."""
280 del self.content[:]
281
282 def afterHistoryPrint(self):
283 """Refresh or scroll down the focus after the history is printed"""
284 if len(self.content):
285 self.text_list.focus_position = len(self.content) - 1 # scroll down
286 self.host.redraw()
287
278 def printMessage(self, from_jid, msg, profile, timestamp=""): 288 def printMessage(self, from_jid, msg, profile, timestamp=""):
279 assert isinstance(from_jid, JID) 289 assert isinstance(from_jid, JID)
280 try: 290 try:
281 jid, nick, mymess = QuickChat.printMessage(self, from_jid, msg, profile, timestamp) 291 jid, nick, mymess = QuickChat.printMessage(self, from_jid, msg, profile, timestamp)
282 except TypeError: 292 except TypeError: