From 2c7e2c393a1d0732f74dae9b95714586378d4286 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Fri, 31 Jul 2009 19:56:43 +0000 Subject: [PATCH] Popdown RadioMenuButton's palette --- src/sugar/graphics/radiopalette.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/sugar/graphics/radiopalette.py b/src/sugar/graphics/radiopalette.py index e7d318dc..803e556b 100644 --- a/src/sugar/graphics/radiopalette.py +++ b/src/sugar/graphics/radiopalette.py @@ -33,18 +33,14 @@ class RadioMenuButton(ToolButton): self.__palette_cb(None, None) self.connect('notify::palette', self.__palette_cb) - self.connect('clicked', self.__clicked_cb) - - def __clicked_cb(self, button): - self.on_click() def __palette_cb(self, widget, pspec): if not isinstance(self.props.palette, RadioPalette): return self.props.palette.update_button() - def on_click(self): - if not self.palette: + def do_clicked(self): + if self.palette is None: return if self.palette.is_up() and \ self.palette.palette_state == Palette.SECONDARY: @@ -74,7 +70,7 @@ class RadioToolsButton(RadioMenuButton): def __init__(self, **kwargs): RadioMenuButton.__init__(self, **kwargs) - def on_click(self): + def do_clicked(self): if not self.selected_button: return self.selected_button.emit('clicked')