From 5212eb4abb5d692114ecdfca05feb74d387855df Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Tue, 2 Feb 2010 01:49:54 +0000 Subject: Do not redraw the Vline at each user_list refresh --- src/window.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/window.py b/src/window.py index 96ff4f52..a1d59f70 100644 --- a/src/window.py +++ b/src/window.py @@ -43,9 +43,6 @@ class UserList(Win): def refresh(self, users): self.win.clear() - self.win.attron(curses.color_pair(2)) - self.win.vline(0, 0, curses.ACS_VLINE, self.height) - self.win.attroff(curses.color_pair(2)) y = 0 for user in users: try: @@ -312,8 +309,10 @@ class Window(object): terminal """ self.size = (self.height, self.width) = stdscr.getmaxyx() - - self.user_win = UserList(self.height-3, self.width/10, 1, 9*(self.width/10), stdscr) + stdscr.attron(curses.color_pair(2)) + stdscr.vline(1, 9*(self.width/10), curses.ACS_VLINE, self.height-2) + stdscr.attroff(curses.color_pair(2)) + self.user_win = UserList(self.height-3, (self.width/10)-1, 1, 9*(self.width/10)+1, stdscr) self.topic_win = Info(1, self.width, 0, 0, stdscr) self.info_win = Info(1, self.width, self.height-2, 0, stdscr) self.text_win = TextWin(self.height-3, (self.width/10)*9, 1, 0, stdscr) @@ -324,7 +323,10 @@ class Window(object): Resize the whole tabe. i.e. all its sub-windows """ self.size = (self.height, self.width) = stdscr.getmaxyx() - self.user_win.resize(self.height-3, self.width/10, 1, 9*(self.width/10), stdscr) + stdscr.attron(curses.color_pair(2)) + stdscr.vline(1, 9*(self.width/10), curses.ACS_VLINE, self.height-2) + stdscr.attroff(curses.color_pair(2)) + self.user_win.resize(self.height-3, (self.width/10)-1, 1, 9*(self.width/10)+1, stdscr) self.topic_win.resize(1, self.width, 0, 0, stdscr) self.info_win.resize(1, self.width, self.height-2, 0, stdscr) self.text_win.resize(self.height-3, (self.width/10)*9, 1, 0, stdscr) -- cgit v1.2.3