def __init__(self, desc):
super(KeybindingWidget, self).__init__()
self.desc = desc
self.label = Gtk.Label(desc)
if self.desc != "":
self.pack_start(self.label, False, False, 0)
self.button = Gtk.Button()
self.button.set_tooltip_text(_("Click to set a new accelerator key for opening and closing the menu. ") +
_("Press Escape or click again to cancel the operation. ") +
_("Press Backspace to clear the existing keybinding."))
self.button.connect("clicked", self.clicked)
self.button.set_size_request(200, -1)
self.pack_start(self.button, False, False, 4)
self.show_all()
self.event_id = None
self.teaching = False
评论列表
文章目录