From f5051b7c14cdd7990387cb3aaa98119fe522c5fe Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 27 Feb 2007 15:02:42 -0500 Subject: [PATCH] Add get_color() function --- shell/intro/colorpicker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/intro/colorpicker.py b/shell/intro/colorpicker.py index 84641244..008acbe4 100644 --- a/shell/intro/colorpicker.py +++ b/shell/intro/colorpicker.py @@ -117,19 +117,19 @@ class ColorPicker(hippo.CanvasBox, hippo.CanvasItem): stroke_color=color.HTMLColor(self._fg_hex), fill_color=color.HTMLColor(self._bg_hex)) self._set_random_colors() - self._emit_color() self._xo.connect('activated', self._xo_activated_cb) self.append(self._xo) def _xo_activated_cb(self, item): self._set_random_colors() - self._emit_color() - - def _emit_color(self): xo_color = XoColor('%s,%s' % (self._xo.props.stroke_color.get_html(), self._xo.props.fill_color.get_html())) self.emit('color', xo_color) + def get_color(self): + return XoColor('%s,%s' % (self._xo.props.stroke_color.get_html(), + self._xo.props.fill_color.get_html())) + def _update_xo_hex(self, fg=None, bg=None): """set the colors of the XO man""" if fg: