diff options
Diffstat (limited to 'src/window.py')
-rw-r--r-- | src/window.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/window.py b/src/window.py index 2c030afe..fbdaa1de 100644 --- a/src/window.py +++ b/src/window.py @@ -218,6 +218,9 @@ class TextWin(Win): """ lines = [] for message in messages: + if message == None: # line separator + lines.append(None) + continue txt = message.txt if not txt: continue @@ -285,6 +288,10 @@ class TextWin(Win): y = 0 for line in lines: self.win.move(y, 0) + if line == None: + self.write_line_separator() + y += 1 + continue if line.time is not None: self.write_time(line.time) if line.nickname is not None: @@ -293,6 +300,13 @@ class TextWin(Win): y += 1 self.win.refresh() + def write_line_separator(self): + """ + """ + self.win.attron(curses.color_pair(7)) + self.win.addstr(' -'*(self.width/2)) + self.win.attroff(curses.color_pair(7)) + def write_text(self, y, x, txt, color): """ write the text of a line. |