RadioToolButton: make sure _hide_tooltip_on_click is initialized in time

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 5a1b380dd6

Signed-off-by: Simon Schampijer <simon@laptop.org>
Tested-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
This commit is contained in:
Simon Schampijer 2012-11-28 18:15:38 +01:00
parent 7b8fa5e406
commit 06fab044e2

View File

@ -37,12 +37,13 @@ class RadioToolButton(Gtk.RadioToolButton):
self._accelerator = None self._accelerator = None
self._tooltip = None self._tooltip = None
self._xo_color = None self._xo_color = None
self._hide_tooltip_on_click = True
self._palette_invoker = ToolInvoker() self._palette_invoker = ToolInvoker()
GObject.GObject.__init__(self, **kwargs) GObject.GObject.__init__(self, **kwargs)
self._palette_invoker.attach_tool(self) self._palette_invoker.attach_tool(self)
self._hide_tooltip_on_click = True
if icon_name: if icon_name:
self.set_icon_name(icon_name) self.set_icon_name(icon_name)