Module: deluge Branch: master Commit: b35875e300e6938a33080df87119bc22af3bfae8
Author: Nick <[email protected]> Date: Wed Feb 2 16:21:52 2011 +0100 attempted fix of color/underline issue. this is a bit of a hack, and seems to work some places, but not everywhere --- deluge/ui/console/colors.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/deluge/ui/console/colors.py b/deluge/ui/console/colors.py index 7d7944b..bc09237 100644 --- a/deluge/ui/console/colors.py +++ b/deluge/ui/console/colors.py @@ -99,6 +99,14 @@ def init_colors(): curses.init_pair(counter, getattr(curses, fg), getattr(curses, bg)) counter += 1 + # try to redefine white/black as it makes underlining work for some terminals + # but can also fail on others, so we try/except + try: + curses.init_pair(counter, curses.COLOR_WHITE, curses.COLOR_BLACK) + color_pairs[("white","black")] = counter + except: + pass + class BadColorString(Exception): pass -- 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.
