summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-07-20 21:37:58 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-07-20 21:37:58 +0000
commit482aaf1aaf0eac44c42ce56b62f2c6f1dab64589 (patch)
tree1b1abceef8fef6f5f138da3c3adafba5c4109ace /src
parentcf7f1db5c64181b1d3b7a314ad7a78f915ba6705 (diff)
downloadpoezio-482aaf1aaf0eac44c42ce56b62f2c6f1dab64589.tar.gz
poezio-482aaf1aaf0eac44c42ce56b62f2c6f1dab64589.tar.bz2
poezio-482aaf1aaf0eac44c42ce56b62f2c6f1dab64589.tar.xz
poezio-482aaf1aaf0eac44c42ce56b62f2c6f1dab64589.zip
Fix some color thing/STUFF
Diffstat (limited to 'src')
-rw-r--r--src/window.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/window.py b/src/window.py
index 8bef5a63..0177b5a0 100644
--- a/src/window.py
+++ b/src/window.py
@@ -58,7 +58,8 @@ class UserList(Win):
self.visible = visible
self.color_role = {'moderator': 2,
'participant':3,
- 'visitor':4
+ 'visitor':5,
+ 'none':5
}
self.color_show = {'xa':12,
'None':8,
@@ -72,11 +73,11 @@ class UserList(Win):
try:
arole = self.color_role[a.role]
except KeyError:
- arole = 1
+ arole = 5
try:
brole = self.color_role[b.role]
except KeyError:
- brole = 1
+ brole = 5
if arole == brole:
if a.nick.lower() < b.nick.lower():
return -1
@@ -90,7 +91,7 @@ class UserList(Win):
try:
role_col = self.color_role[user.role]
except KeyError:
- role_col = 1
+ role_col = 5
try:
show_col = self.color_show[user.show]
except KeyError:
@@ -640,7 +641,10 @@ class Input(Win):
Refresh the line onscreen, from the pos and pos_line
"""
self.clear_text()
- self.win.addstr(self.text[self.line_pos:self.line_pos+self.width-1].encode('utf-8'))
+ try: # FIXME: this try should NOT be needed
+ self.win.addstr(self.text[self.line_pos:self.line_pos+self.width-1].encode('utf-8'))
+ except:
+ pass
self.win.move(0, self.pos)
self.refresh()