From ad498c6e424869f37d9c7125af28efa646e6ff7e Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 2 Feb 2011 13:57:31 +0100 Subject: [PATCH] Revert "remove special case white/black pair. doesn't seem needed and breaks white,black,attrs" This does actually seem to break some terminals This reverts commit ba3a093746a51fd46b9b0bcaf72847549e0c94b3. --- deluge/ui/console/colors.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/colors.py b/deluge/ui/console/colors.py index 9988ab882..7d7944b3c 100644 --- a/deluge/ui/console/colors.py +++ b/deluge/ui/console/colors.py @@ -50,7 +50,9 @@ colors = [ ] # {(fg, bg): pair_number, ...} -color_pairs = {} +color_pairs = { + ("white", "black"): 0 # Special case, can't be changed +} # Some default color schemes schemes = { @@ -91,6 +93,8 @@ def init_colors(): counter = 1 for fg in colors: for bg in colors: + if fg == "COLOR_WHITE" and bg == "COLOR_BLACK": + continue color_pairs[(fg[6:].lower(), bg[6:].lower())] = counter curses.init_pair(counter, getattr(curses, fg), getattr(curses, bg)) counter += 1