From c7cfbd1d35ba002e207a70d974e2be7ceb8faaca Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 18 Apr 2011 06:27:28 +0900 Subject: [PATCH] fix deck switching --- aqt/main.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index 1ee23b9bd..51dbf73be 100755 --- a/aqt/main.py +++ b/aqt/main.py @@ -340,7 +340,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") if os.path.exists(f): return self.loadDeck(f) # try recent deck paths - for path in self.config['recentDeckPaths']: + for path in self.config.recentDecks(): r = self.loadDeck(path, showErrors=False) if r: return r @@ -363,8 +363,8 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") combo = QComboBox() self.switchDecks = ( [(os.path.basename(x).replace(".anki", ""), x) - for x in self.config['recentDeckPaths'] - if not self.deck or self.mw.path != x and + for x in self.config.recentDecks() + if not self.deck or self.deck.path != x and os.path.exists(x)]) self.switchDecks.sort() combo.addItems(QStringList([x[0] for x in self.switchDecks])) @@ -459,6 +459,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") ########################################################################## def onOpenOnline(self): + return showInfo("not yet implemented") self.raiseMain() self.ensureSyncParams() self.close() @@ -478,11 +479,13 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") self.moveToState("initial") def onGetSharedDeck(self): + return showInfo("not yet implemented") self.raiseMain() aqt.getshared.GetShared(self, 0) self.browserLastRefreshed = 0 def onGetSharedPlugin(self): + return showInfo("not yet implemented") self.raiseMain() aqt.getshared.GetShared(self, 1) @@ -728,6 +731,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") ########################################################################## def onImport(self): + return showInfo("not yet implemented") if self.deck is None: self.onNew(prompt=_("""\ Importing copies cards to the current deck, @@ -741,6 +745,7 @@ Please choose a new deck name:""")) aqt.importing.ImportDialog(self) def onExport(self): + return showInfo("not yet implemented") aqt.exporting.ExportDialog(self) # Language handling