add shortcuts back to browser

This commit is contained in:
Damien Elmes 2009-06-06 00:26:47 +09:00
parent fbfbda1a58
commit c4c3bf102a

View file

@ -1098,7 +1098,16 @@ your deck."""))
layout.addWidget(l, c+1, 2) layout.addWidget(l, c+1, 2)
# open # open
openButton = QPushButton(_("Open")) openButton = QPushButton(_("Open"))
openButton.setToolTip(_("Open this deck")) if c < 9:
if sys.platform.startswith("darwin"):
extra = _(" (Command+Option+%d)") % (c+1)
openButton.setShortcut(_("Ctrl+Alt+%d" % (c+1)))
else:
extra = _(" (Ctrl+%d)") % (c+1)
openButton.setShortcut(_("Alt+%d" % (c+1)))
else:
extra = ""
openButton.setToolTip(_("Open this deck%s") % extra)
self.connect(openButton, SIGNAL("clicked()"), self.connect(openButton, SIGNAL("clicked()"),
lambda d=deck['path']: self.loadDeck(d)) lambda d=deck['path']: self.loadDeck(d))
layout.addWidget(openButton, c+1, 4) layout.addWidget(openButton, c+1, 4)