mention add shortcut

This commit is contained in:
Damien Elmes 2009-01-24 04:24:21 +09:00
parent dc84ea847d
commit 550985984a

View file

@ -52,6 +52,10 @@ class AddCards(QDialog):
self.dialog.buttonBox.addButton(self.addButton, self.dialog.buttonBox.addButton(self.addButton,
QDialogButtonBox.ActionRole) QDialogButtonBox.ActionRole)
self.addButton.setShortcut(_("Ctrl+Return")) self.addButton.setShortcut(_("Ctrl+Return"))
if sys.platform.startswith("darwin"):
self.addButton.setToolTip(_("Add (shortcut: command+return)"))
else:
self.addButton.setToolTip(_("Add (shortcut: ctrl+return)"))
self.addButton.setAutoDefault(False) self.addButton.setAutoDefault(False)
s = QShortcut(QKeySequence(_("Ctrl+Enter")), self) s = QShortcut(QKeySequence(_("Ctrl+Enter")), self)
s.connect(s, SIGNAL("activated()"), self.addButton, SLOT("click()")) s.connect(s, SIGNAL("activated()"), self.addButton, SLOT("click()"))