[Sugar-devel] [PATCH] fix OLPC #10488 - Color chooser does not always work when giving color to selected text

Gonzalo Odiard godiard at sugarlabs.org
Thu Dec 2 09:27:25 EST 2010


Emit signal at color change
---
 src/sugar/graphics/colorbutton.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sugar/graphics/colorbutton.py b/src/sugar/graphics/colorbutton.py
index 1fed96d..c36320a 100644
--- a/src/sugar/graphics/colorbutton.py
+++ b/src/sugar/graphics/colorbutton.py
@@ -125,7 +125,7 @@ class _ColorButton(gtk.Button):
         self._preview.fill_color = get_svg_color_string(self._color)
         if self._palette:
             self._palette.props.color = self._color
-        self.notify('color')
+        self.emit('color-set')
 
     def get_color(self):
         return self._color
@@ -379,7 +379,7 @@ class _ColorPalette(Palette):
             self._scales[self._GREEN].set_value(self._color.green / 65535.0)
             self._scales[self._BLUE].set_value(self._color.blue / 65535.0)
 
-        self.notify('color')
+        self.emit('color-set')
 
     def get_color(self):
         return self._color
-- 
1.7.2.3



More information about the Sugar-devel mailing list