fixed #2072, fix TextWin refresh

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-12-26 21:44:49 +00:00
parent cdb8128d32
commit 9f4474be20

View file

@ -513,12 +513,12 @@ class TextWin(Win):
for y, line in enumerate(lines): for y, line in enumerate(lines):
if line is None: if line is None:
self.write_line_separator() self.write_line_separator()
continue else:
if line.time: if line.time:
self.write_time(line.time) self.write_time(line.time)
if line.nickname: if line.nickname:
self.write_nickname(line.nickname, line.nickname_color) self.write_nickname(line.nickname, line.nickname_color)
self.write_text(y, line.text_offset, line.text, line.text_color, line.colorized) self.write_text(y, line.text_offset, line.text, line.text_color, line.colorized)
if y != self.height - 1: if y != self.height - 1:
self.addstr('\n') self.addstr('\n')
self._refresh() self._refresh()
@ -526,10 +526,7 @@ class TextWin(Win):
def write_line_separator(self): def write_line_separator(self):
""" """
""" """
self._win.attron(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR)) self.addnstr('- '*(self.width//2-1)+'-', self.width, curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR))
self.addnstr('- '*(self.width//2), self.width)
self._win.attroff(curses.color_pair(theme.COLOR_NEW_TEXT_SEPARATOR))
self.addstr('\n')
def write_text(self, y, x, txt, color, colorized): def write_text(self, y, x, txt, color, colorized):
""" """