Fix a remaining crash from the Room class deletion.

This commit is contained in:
Florent Le Coz 2011-11-06 15:57:03 +01:00
parent bf9857b782
commit 7bf63c51e2
2 changed files with 3 additions and 5 deletions

View file

@ -389,7 +389,7 @@ class ChatTab(Tab):
def move_separator(self): def move_separator(self):
self.text_win.remove_line_separator() self.text_win.remove_line_separator()
self.text_win.add_line_separator() self.text_win.add_line_separator()
self.text_win.refresh(self._text_buffer) self.text_win.refresh()
self.input.refresh() self.input.refresh()
def command_say(self, line): def command_say(self, line):
@ -607,9 +607,8 @@ class MucTab(ChatTab):
/topic [new topic] /topic [new topic]
""" """
if not arg.strip(): if not arg.strip():
self._text_buffer.add_message_to_text_buffer(self, self._text_buffer.add_message(_("The subject of the room is: %s") % self.topic)
_("The subject of the room is: %s") % self.topic) self.text_win.refresh()
self.text_win.refresh(self._text_buffer)
self.input.refresh() self.input.refresh()
return return
subject = arg subject = arg

View file

@ -40,7 +40,6 @@ class TextBuffer(object):
time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\ time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\
if history else time.strftime("%H:%M:%S"),\ if history else time.strftime("%H:%M:%S"),\
nickname=nickname, user=user) nickname=nickname, user=user)
log.debug('Coucou, le message ajouté : %s' % (msg,))
self.messages.append(msg) self.messages.append(msg)
while len(self.messages) > self.messages_nb_limit: while len(self.messages) > self.messages_nb_limit:
self.messages.pop(0) self.messages.pop(0)