From 06fab044e263ba76574dadbe9005a5e2c4fd1ef2 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 28 Nov 2012 18:15:38 +0100 Subject: [PATCH] RadioToolButton: make sure _hide_tooltip_on_click is initialized in time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we pass the active property to the constructor do_clicked seem to get called. Before chaining up to the Gtk.RadioToolButton constructor we need to initialize the variable. This is a followup of 5a1b380dd6099d7455d67e00718388fa79b57e01 Signed-off-by: Simon Schampijer Tested-by: Gonzalo Odiard Acked-by: Manuel QuiƱones --- src/sugar3/graphics/radiotoolbutton.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index c04cdc86..fa910fda 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -37,12 +37,13 @@ class RadioToolButton(Gtk.RadioToolButton): self._accelerator = None self._tooltip = None self._xo_color = None + self._hide_tooltip_on_click = True + self._palette_invoker = ToolInvoker() GObject.GObject.__init__(self, **kwargs) self._palette_invoker.attach_tool(self) - self._hide_tooltip_on_click = True if icon_name: self.set_icon_name(icon_name)