bugfix with /clear command

This commit is contained in:
Yann Leboulanger 2005-06-20 10:01:19 +00:00
parent 5e09975124
commit 16c8717a45
1 changed files with 4 additions and 2 deletions

View File

@ -500,12 +500,14 @@ class GroupchatWindow(chat.Chat):
room_jid = self.get_active_jid() room_jid = self.get_active_jid()
message_textview = self.xmls[room_jid].get_widget( message_textview = self.xmls[room_jid].get_widget(
'message_textview') 'message_textview')
conversation_textview = self.xmls[room_jid].get_widget(
'conversation_textview')
message_buffer = message_textview.get_buffer() message_buffer = message_textview.get_buffer()
if message != '' or message != '\n': if message != '' or message != '\n':
self.save_sent_message(room_jid, message) self.save_sent_message(room_jid, message)
if message == '/clear': if message in ['/clear', '/clear ']:
self.on_clear(None, conversation_textview) # clear conversation self.on_clear(None, conversation_textview) # clear conversation
self.on_clear(None, widget) # clear message textview too self.on_clear(None, message_textview) # clear message textview too
return return
elif message.startswith('/nick '): elif message.startswith('/nick '):