mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
catch attempt to import from anki 1.0.1
This commit is contained in:
parent
646116604c
commit
6fa16ca72f
1 changed files with 11 additions and 3 deletions
|
@ -29,7 +29,8 @@ class Upgrader(object):
|
||||||
Anki wasn't able to load your old config file. Please use File>Import \
|
Anki wasn't able to load your old config file. Please use File>Import \
|
||||||
to import your decks from previous Anki versions."""))
|
to import your decks from previous Anki versions."""))
|
||||||
return
|
return
|
||||||
self._copySettings()
|
if not self._copySettings():
|
||||||
|
return
|
||||||
# and show the wizard
|
# and show the wizard
|
||||||
self._showWizard()
|
self._showWizard()
|
||||||
|
|
||||||
|
@ -55,8 +56,15 @@ to import your decks from previous Anki versions."""))
|
||||||
"recentColours", "stripHTML", "editFontFamily", "editFontSize",
|
"recentColours", "stripHTML", "editFontFamily", "editFontSize",
|
||||||
"editLineSize", "deleteMedia", "preserveKeyboard", "numBackups",
|
"editLineSize", "deleteMedia", "preserveKeyboard", "numBackups",
|
||||||
"proxyHost", "proxyPass", "proxyPort", "proxyUser"):
|
"proxyHost", "proxyPass", "proxyPort", "proxyUser"):
|
||||||
|
try:
|
||||||
p[k] = self.conf[k]
|
p[k] = self.conf[k]
|
||||||
self.mw.pm.save()
|
except:
|
||||||
|
showWarning(_("""\
|
||||||
|
Anki 2.0 only supports automatic upgrading from Anki 1.2. To load old \
|
||||||
|
decks, please open them in Anki 1.2 to upgrade them, and then import them \
|
||||||
|
into Anki 2.0."""))
|
||||||
|
return
|
||||||
|
return True
|
||||||
|
|
||||||
# Wizard
|
# Wizard
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
Loading…
Reference in a new issue