diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-02-12 03:30:40 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-02-12 03:30:40 +0000 |
commit | b421515598ed0178aa550f4d921a7496c81f4fae (patch) | |
tree | cdf508eb95565fb9046e73726d3545501b15645a /src/window.py | |
parent | 0b418971bc655d10e46e3a9bc6b163cbb74b0ccb (diff) | |
download | poezio-b421515598ed0178aa550f4d921a7496c81f4fae.tar.gz poezio-b421515598ed0178aa550f4d921a7496c81f4fae.tar.bz2 poezio-b421515598ed0178aa550f4d921a7496c81f4fae.tar.xz poezio-b421515598ed0178aa550f4d921a7496c81f4fae.zip |
#fixed 1160
Diffstat (limited to 'src/window.py')
-rw-r--r-- | src/window.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/window.py b/src/window.py index e697a495..aa8cf5da 100644 --- a/src/window.py +++ b/src/window.py @@ -172,7 +172,7 @@ class TextWin(object): win.addstr(line[1]) win.attroff(curses.color_pair(8)) except:pass - elif len(line) == 3: + elif len(line) == 4: for user in users: if user.nick == line[1]: break @@ -180,13 +180,16 @@ class TextWin(object): try:win.addstr('\n['+line[0].strftime("%H:%M:%S") + "] <") except:pass length = len('['+line[0].strftime("%H:%M:%S") + "] <") - try:win.attron(curses.color_pair(user.color)) - except:pass - win.addstr(line[1]) - try:win.attroff(curses.color_pair(user.color)) - except:pass + if line[1]: + win.attron(curses.color_pair(user.color)) + win.addstr(line[1]) + win.attroff(curses.color_pair(user.color)) win.addstr("> ") + if line[3]: + win.attron(curses.color_pair(line[3])) win.addstr(line[2]) + if line[3]: + win.attroff(curses.color_pair(line[3])) except:pass def new_win(self, winname): |