mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
add shortcut key to close window on osx
This commit is contained in:
parent
c19c45ef4a
commit
fcba72e40d
1 changed files with 4 additions and 0 deletions
|
@ -320,6 +320,10 @@ class EditDeck(QMainWindow):
|
||||||
if self.parent.currentCard:
|
if self.parent.currentCard:
|
||||||
self.currentCard = self.parent.currentCard
|
self.currentCard = self.parent.currentCard
|
||||||
self.focusCurrentCard()
|
self.focusCurrentCard()
|
||||||
|
if sys.platform.startswith("darwin"):
|
||||||
|
self.macCloseShortcut = QShortcut(QKeySequence("Ctrl+w"), self)
|
||||||
|
self.connect(self.macCloseShortcut, SIGNAL("activated()"),
|
||||||
|
self.close)
|
||||||
|
|
||||||
def findCardInDeckModel(self, model, card):
|
def findCardInDeckModel(self, model, card):
|
||||||
for i, thisCard in enumerate(model.cards):
|
for i, thisCard in enumerate(model.cards):
|
||||||
|
|
Loading…
Reference in a new issue