diff options
author | Simon Schampijer <simon@laptop.org> | 2013-02-15 12:58:58 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2013-02-16 05:01:00 (GMT) |
commit | d10edb6756cba6c58f3bdeb38aa6322b1dfe405f (patch) | |
tree | c2316a228fe72adc58e2d1de1db9efbf6701f52c | |
parent | 0ab8b74988f9debbf42647e2c13e9e8eaeac2c41 (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>
Signed-off-by: Ajay Garg <ajay@activitycentral.com>
-rw-r--r-- | src/sugar3/graphics/toggletoolbutton.py | 4 | ||||
-rw-r--r-- | tests/graphics/toolbuttons.py | 1 |
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() |