def _construct(self, toolboxdef): shortcuts = self.shortcuts for title, items in toolboxdef: wrapbox = Wrapbox() for action_name, label, stock_id, shortcut in items: button = self.toolbox_button(action_name, stock_id) if label: button.set_tooltip_text('%s (%s)' % (label, shortcut)) self.buttons.append(button) wrapbox.add(button) button.show() shortcuts[shortcut] = action_name if title: wrapbox_dec = self.make_wrapbox_decorator(title, wrapbox) self.pack_start(wrapbox_dec, expand=False) else: self.pack_start(wrapbox, expand=False) wrapbox.show()