Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2013-02-15 12:58:58 (GMT)
committer Simon Schampijer <simon@laptop.org>2013-02-15 14:41:03 (GMT)
commit63b8e87b1a99a854e9adbb1579b1e05244d2dc46 (patch)
tree71c0e2aecfb195a57f9930311197e65dbb6cba04
parentb9234202ab430b14b6509a0cea099fe1ecd3d17c (diff)
ToggleToolbutton: do hide the tooltip when clicked or touched
This is the same behaviour as for the RadioToolButton and the ToolButton. See 5a1b380dd6099d7455d67e00718388fa79b57e01 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>
-rw-r--r--src/sugar3/graphics/toggletoolbutton.py4
-rw-r--r--tests/graphics/toolbuttons.py1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py
index dad39a4..0c4e592 100644
--- a/src/sugar3/graphics/toggletoolbutton.py
+++ b/src/sugar3/graphics/toggletoolbutton.py
@@ -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)
diff --git a/tests/graphics/toolbuttons.py b/tests/graphics/toolbuttons.py
index 3344cba..e189406 100644
--- a/tests/graphics/toolbuttons.py
+++ b/tests/graphics/toolbuttons.py
@@ -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()