Module: deluge
Branch: master
Commit: ad498c6e424869f37d9c7125af28efa646e6ff7e

Author: Nick <[email protected]>
Date:   Wed Feb  2 13:57:31 2011 +0100

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 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/deluge/ui/console/colors.py b/deluge/ui/console/colors.py
index 9988ab8..7d7944b 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

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to