Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-11-01 11:37:43 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-11-01 11:37:43 (GMT)
commit70079de872305eaaacf70364801895ad036d1c4f (patch)
tree4e8d9ee7eeea0a8e9ea08b33c001ec5e6f0f97b0 /shell
parenta579adef44a4e1926e803a5a2f303d9ba0de2dbc (diff)
refinements in output of sugar-control
Diffstat (limited to 'shell')
-rw-r--r--shell/controlpanel/control.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/shell/controlpanel/control.py b/shell/controlpanel/control.py
index 63d9790..8e74825 100644
--- a/shell/controlpanel/control.py
+++ b/shell/controlpanel/control.py
@@ -236,13 +236,24 @@ def print_color():
color = get_color().to_string()
str = color.split(',')
+ stroke = None
+ fill = None
for color in _COLORS:
for hue in _COLORS[color]:
if _COLORS[color][hue] == str[0]:
- print 'stroke: color=%s hue=%s'%(color, hue)
+ stroke = (color, hue)
if _COLORS[color][hue] == str[1]:
- print 'fill: color=%s hue=%s'%(color, hue)
+ fill = (color, hue)
+ if stroke is not None:
+ print 'stroke: color=%s hue=%s'%(stroke[0], stroke[1])
+ else:
+ print 'stroke: %s'%(str[0])
+ if fill is not None:
+ print 'fill: color=%s hue=%s'%(fill[0], fill[1])
+ else:
+ print 'fill: %s'%(str[1])
+
def set_color(stroke, fill, modstroke='medium', modfill='medium'):
"""Set the system color by setting a fill and stroke color.
fill : [red, orange, yellow, blue, purple]
@@ -343,9 +354,9 @@ def get_timezone():
timezone = string.replace(tokens[1], '"', '')
return timezone
except Exception, e:
- print (_("get_timezone: %s") % e)
+ print "get_timezone: %s"% e
except Exception, e:
- print (_("get_timezone: %s") % e)
+ print "get_timezone: %s"% e
return None
def print_timezone():