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:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-09-10 00:54:47 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-09-10 00:54:47 (GMT)
commitf7a1900d3d5313fd7adb96b3061734c80980c04b (patch)
treeaf04a766c20fa5ba766f8bf612b255b78c197c8e /sugar/graphics/xocolor.py
parent97451c5466eb6c31a766b7b43fade53742ef5faf (diff)
Do not redraw/resize if the properties doesn't actually change.
In the Icon widget queue resize and redraw as appropriate.
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