From c4c3bf102a369dab01deb7e149096be7373373e5 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 6 Jun 2009 00:26:47 +0900 Subject: [PATCH] add shortcuts back to browser --- ankiqt/ui/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 07322ad65..ddf1205b3 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -1098,7 +1098,16 @@ your deck.""")) layout.addWidget(l, c+1, 2) # 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()"), lambda d=deck['path']: self.loadDeck(d)) layout.addWidget(openButton, c+1, 4)