#7533 ToolButton should accept activation via accelerators regardless of its state

This commit is contained in:
Tomeu Vizoso 2008-08-17 18:47:00 +02:00
parent a73cbc351d
commit 5ba227ff85

View File

@ -65,6 +65,12 @@ class ToolButton(gtk.ToolButton):
self.set_icon(icon_name) self.set_icon(icon_name)
self.connect('clicked', self.__button_clicked_cb) 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): def set_tooltip(self, tooltip):
""" Set a simple palette with just a single label. """ Set a simple palette with just a single label.