summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-14 04:18:34 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-14 04:18:34 +0000
commitcddb49385d5a7511dade10489ce96ee4dd7cfaa8 (patch)
tree9a797bd62c58a24b297df5a6435d38c8c0ab79e2 /src
parent6896b4bd7db35c3d1aac62e96a00a75ae2a649a6 (diff)
downloadpoezio-cddb49385d5a7511dade10489ce96ee4dd7cfaa8.tar.gz
poezio-cddb49385d5a7511dade10489ce96ee4dd7cfaa8.tar.bz2
poezio-cddb49385d5a7511dade10489ce96ee4dd7cfaa8.tar.xz
poezio-cddb49385d5a7511dade10489ce96ee4dd7cfaa8.zip
keep the default terminal background
Diffstat (limited to 'src')
-rw-r--r--src/gui.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gui.py b/src/gui.py
index 7003af97..27d14657 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -286,16 +286,19 @@ class Gui(object):
def init_curses(self, stdscr):
curses.start_color()
curses.noecho()
+ curses.cbreak()
+ curses.raw()
+ curses.use_default_colors()
stdscr.keypad(True)
curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE)
- curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK)
- curses.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK) # Admin
- curses.init_pair(4, curses.COLOR_BLUE, curses.COLOR_BLACK) # Participant
- curses.init_pair(5, curses.COLOR_WHITE, curses.COLOR_BLACK) # Visitor
- curses.init_pair(6, curses.COLOR_CYAN, curses.COLOR_BLACK)
- curses.init_pair(7, curses.COLOR_GREEN, curses.COLOR_BLACK)
- curses.init_pair(8, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
- curses.init_pair(9, curses.COLOR_YELLOW, curses.COLOR_BLACK)
+ curses.init_pair(2, curses.COLOR_BLUE, -1)
+ curses.init_pair(3, curses.COLOR_RED, -1) # Admin
+ curses.init_pair(4, curses.COLOR_BLUE, -1) # Participant
+ curses.init_pair(5, curses.COLOR_WHITE, -1) # Visitor
+ curses.init_pair(6, curses.COLOR_CYAN, -1)
+ curses.init_pair(7, curses.COLOR_GREEN, -1)
+ curses.init_pair(8, curses.COLOR_MAGENTA, -1)
+ curses.init_pair(9, curses.COLOR_YELLOW, -1)
curses.init_pair(10, curses.COLOR_WHITE, curses.COLOR_CYAN) # current room
curses.init_pair(11, curses.COLOR_WHITE, curses.COLOR_BLUE) # normal room
curses.init_pair(12, curses.COLOR_WHITE, curses.COLOR_MAGENTA) # new message room
@@ -305,6 +308,7 @@ class Gui(object):
def reset_curses(self):
curses.echo()
+ curses.nocbreak()
curses.endwin()
def on_connected(self, jid):