ToggleToolbutton: do hide the tooltip when clicked or touched

This is the same behaviour as for the RadioToolButton and the
ToolButton. See 5a1b380dd6 where
we did the same for the RadioToolbutton.

Updated the toolbuttons.py test to be able to test that code
path.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
This commit is contained in:
Simon Schampijer 2013-02-15 13:58:58 +01:00
parent b9234202ab
commit 63b8e87b1a
2 changed files with 5 additions and 0 deletions

View File

@ -141,4 +141,8 @@ class ToggleToolButton(Gtk.ToggleToolButton):
return False
def do_clicked(self):
if self.palette:
self.palette.popdown(True)
palette = property(get_palette, set_palette)

View File

@ -37,6 +37,7 @@ toolbar_box.toolbar.insert(color_button, -1)
color_button.show()
favorite_button = ToggleToolButton('emblem-favorite')
favorite_button.set_tooltip('Favorite')
toolbar_box.toolbar.insert(favorite_button, -1)
favorite_button.show()