Correct bug Windows console

This commit is contained in:
Nicolargo 2014-09-04 18:58:22 +02:00
parent 5707d258c0
commit e67fb54e0e
2 changed files with 15 additions and 4 deletions

View File

@ -126,8 +126,6 @@ class WCurseLight(object):
COLOR_BLUE = colorconsole.terminal.colors["LBLUE"] COLOR_BLUE = colorconsole.terminal.colors["LBLUE"]
COLOR_MAGENTA = colorconsole.terminal.colors["LPURPLE"] COLOR_MAGENTA = colorconsole.terminal.colors["LPURPLE"]
COLOR_BLACK = colorconsole.terminal.colors["BLACK"] COLOR_BLACK = colorconsole.terminal.colors["BLACK"]
COLOR_MAGENTA = colorconsole.terminal.colors["MAGENTA"]
COLOR_CYAN = colorconsole.terminal.colors["CYAN"]
A_UNDERLINE = 0 A_UNDERLINE = 0
A_BOLD = 0 A_BOLD = 0
COLOR_PAIRS = 9 COLOR_PAIRS = 9

View File

@ -89,8 +89,21 @@ class GlancesCurses(object):
curses.init_pair(6, curses.COLOR_RED, -1) curses.init_pair(6, curses.COLOR_RED, -1)
curses.init_pair(7, curses.COLOR_GREEN, -1) curses.init_pair(7, curses.COLOR_GREEN, -1)
curses.init_pair(8, curses.COLOR_BLUE, -1) curses.init_pair(8, curses.COLOR_BLUE, -1)
try:
curses.init_pair(9, curses.COLOR_MAGENTA, -1) curses.init_pair(9, curses.COLOR_MAGENTA, -1)
except:
if args.theme_white:
curses.init_pair(9, curses.COLOR_BLACK, -1)
else:
curses.init_pair(9, curses.COLOR_WHITE, -1)
try:
curses.init_pair(10, curses.COLOR_CYAN, -1) curses.init_pair(10, curses.COLOR_CYAN, -1)
except:
if args.theme_white:
curses.init_pair(10, curses.COLOR_BLACK, -1)
else:
curses.init_pair(10, curses.COLOR_WHITE, -1)
else: else:
self.hascolors = False self.hascolors = False