quick_frontend, primitivus: add primitivus command ":history [limit]" (default value for limit is 50)
This commit is contained in:
parent
4d6d762aa8
commit
3cee372b02
1 changed files with 33 additions and 5 deletions
|
|
@ -275,6 +275,16 @@ class Chat(urwid.WidgetWrap, QuickChat):
|
|||
self.present_wid.deleteValue(nick)
|
||||
self.host.redraw()
|
||||
|
||||
def clearHistory(self):
|
||||
"""Clear the content of this chat."""
|
||||
del self.content[:]
|
||||
|
||||
def afterHistoryPrint(self):
|
||||
"""Refresh or scroll down the focus after the history is printed"""
|
||||
if len(self.content):
|
||||
self.text_list.focus_position = len(self.content) - 1 # scroll down
|
||||
self.host.redraw()
|
||||
|
||||
def printMessage(self, from_jid, msg, profile, timestamp=""):
|
||||
assert isinstance(from_jid, JID)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue