Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2008-08-17 16:47:00 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2008-08-25 12:20:37 (GMT)
commite2067b00c5f5f3b2e63774aa00a1006b85415feb (patch)
tree645fbf2b7bfba6b8a6731cc1e541ce0fd5e092c6
parentb57961765e3e6b368df98f4b3e4b625dc08ed2be (diff)
#7533 ToolButton should accept activation via accelerators regardless of its state
-rw-r--r--src/sugar/graphics/toolbutton.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sugar/graphics/toolbutton.py b/src/sugar/graphics/toolbutton.py
index bf392c8..715e7a9 100644
--- a/src/sugar/graphics/toolbutton.py
+++ b/src/sugar/graphics/toolbutton.py
@@ -65,6 +65,12 @@ class ToolButton(gtk.ToolButton):
self.set_icon(icon_name)
self.connect('clicked', self.__button_clicked_cb)
+ self.get_child().connect('can-activate-accel',
+ self.__button_can_activate_accel_cb)
+
+ def __button_can_activate_accel_cb(self, button, signal_id):
+ # Accept activation via accelerators regardless of this widget's state
+ return True
def set_tooltip(self, tooltip):
""" Set a simple palette with just a single label.