Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/intro/colorpicker.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-07-25 06:57:27 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-09-27 13:52:05 (GMT)
commitd3c94e87c7526c17414ce4a39268823dbf9c76c6 (patch)
treeb0008d2534e5919f5ddfb34869c5090976eb3015 /src/jarabe/intro/colorpicker.py
parentadc1dee90198b2d5e6e5fcd7f7ac96de7f552555 (diff)
Remove hippo from the intro screens
Switch to standard GTK containers. Specific coloring details have been moved to the theme at the same time. Based on earlier work by Raul Gutierrez and Walter Bender.
Diffstat (limited to 'src/jarabe/intro/colorpicker.py')
-rw-r--r--src/jarabe/intro/colorpicker.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/jarabe/intro/colorpicker.py b/src/jarabe/intro/colorpicker.py
index 997199b..75c15c1 100644
--- a/src/jarabe/intro/colorpicker.py
+++ b/src/jarabe/intro/colorpicker.py
@@ -14,27 +14,27 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import hippo
+import gtk
-from sugar.graphics.icon import CanvasIcon
+from sugar.graphics.icon import Icon
from sugar.graphics import style
from sugar.graphics.xocolor import XoColor
-class ColorPicker(hippo.CanvasBox, hippo.CanvasItem):
- def __init__(self, **kwargs):
- hippo.CanvasBox.__init__(self, **kwargs)
- self.props.orientation = hippo.ORIENTATION_HORIZONTAL
+class ColorPicker(gtk.EventBox):
+ def __init__(self):
+ gtk.EventBox.__init__(self)
self._xo_color = None
- self._xo = CanvasIcon(size=style.XLARGE_ICON_SIZE,
- icon_name='computer-xo')
+ self._xo = Icon(pixel_size=style.XLARGE_ICON_SIZE,
+ icon_name='computer-xo')
self._set_random_colors()
- self._xo.connect('activated', self._xo_activated_cb)
- self.append(self._xo)
+ self.connect('button-press-event', self._button_press_cb)
+ self.add(self._xo)
- def _xo_activated_cb(self, item):
- self._set_random_colors()
+ def _button_press_cb(self, widget, event):
+ if event.button == 1 and event.type == gtk.gdk.BUTTON_PRESS:
+ self._set_random_colors()
def get_color(self):
return self._xo_color