summaryrefslogtreecommitdiff
path: root/src/window.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-12 03:30:40 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-12 03:30:40 +0000
commitb421515598ed0178aa550f4d921a7496c81f4fae (patch)
treecdf508eb95565fb9046e73726d3545501b15645a /src/window.py
parent0b418971bc655d10e46e3a9bc6b163cbb74b0ccb (diff)
downloadpoezio-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.py15
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):