mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
loadDeck() was obsolete
This commit is contained in:
parent
5d1376acb9
commit
ce9b90b133
1 changed files with 0 additions and 30 deletions
30
aqt/main.py
30
aqt/main.py
|
@ -505,36 +505,6 @@ title="%s">%s</button>''' % (
|
|||
from aqt.reviewer import Reviewer
|
||||
self.reviewer = Reviewer(self)
|
||||
|
||||
# Collection loading
|
||||
##########################################################################
|
||||
|
||||
def loadDeck(self, deckPath, showErrors=True):
|
||||
"Load a deck and update the user interface."
|
||||
self.upgrading = False
|
||||
try:
|
||||
self.col = Deck(deckPath, queue=False)
|
||||
except Exception, e:
|
||||
if not showErrors:
|
||||
return 0
|
||||
# FIXME: this needs updating
|
||||
if hasattr(e, 'data') and e.data.get('type') == 'inuse':
|
||||
showWarning(_("Deck is already open."))
|
||||
else:
|
||||
showCritical(_("""\
|
||||
File is corrupt or not an Anki database. Click help for more info.\n
|
||||
Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
||||
self.moveToState("deckBrowser")
|
||||
return 0
|
||||
finally:
|
||||
# we may have a progress window open if we were upgrading
|
||||
self.progress.finish()
|
||||
self.pm.profile.addRecentDeck(self.col.path)
|
||||
self.setupMedia(self.col)
|
||||
if not self.upgrading:
|
||||
self.progress.setupDB(self.col.db)
|
||||
self.moveToState("deckLoading")
|
||||
return True
|
||||
|
||||
# Syncing
|
||||
##########################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue