Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics/xocolor.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/graphics/xocolor.py')
-rw-r--r--sugar/graphics/xocolor.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sugar/graphics/xocolor.py b/sugar/graphics/xocolor.py
index ff5a2b5..3f9fe31 100644
--- a/sugar/graphics/xocolor.py
+++ b/sugar/graphics/xocolor.py
@@ -223,6 +223,12 @@ class XoColor:
else:
[self._stroke, self._fill] = _parse_string(color_string)
+ def __cmp__(self, other):
+ if isinstance(other, XoColor):
+ return self._stroke == other._stroke and self._fill == other._fill
+ else:
+ return -1
+
def get_stroke_color(self):
return self._stroke