mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
fix autoupdate; make program limit 5 minutes too
This commit is contained in:
parent
284c8d2543
commit
64ed220fba
2 changed files with 12 additions and 12 deletions
17
aqt/main.py
17
aqt/main.py
|
@ -805,13 +805,16 @@ Please choose a new deck name:"""))
|
|||
ret = _("late")
|
||||
else:
|
||||
ret = _("early")
|
||||
showWarning(
|
||||
_("The time or date on your computer is not correct.\n") +
|
||||
ngettext("It is %(sec)d second %(type)s.\n",
|
||||
"It is %(sec)d seconds %(type)s.\n", abs(diff))
|
||||
% {"sec": abs(diff), "type": ret} +
|
||||
_(" Please ensure it is set correctly and then restart Anki.")
|
||||
)
|
||||
showWarning("""\
|
||||
In order to ensure your collection works correctly when moved between \
|
||||
devices, Anki requires the system clock to be set correctly. Your system \
|
||||
clock appears to be wrong by more than 5 minutes.
|
||||
|
||||
This can be because the \
|
||||
clock is slow or fast, because the date is set incorrectly, or because \
|
||||
the timezone or daylight savings information is incorrect. Please correct \
|
||||
the problem and restart Anki.""")
|
||||
sys.exit(0)
|
||||
|
||||
# Schema modifications
|
||||
##########################################################################
|
||||
|
|
|
@ -14,10 +14,8 @@ class LatestVersionFinder(QThread):
|
|||
|
||||
def __init__(self, main):
|
||||
QThread.__init__(self)
|
||||
print "autoupdate"
|
||||
return
|
||||
self.main = main
|
||||
self.config = main.pm.profile
|
||||
self.config = main.pm.meta
|
||||
plat=sys.platform
|
||||
pver=platform.platform()
|
||||
d = {"ver": aqt.appVersion,
|
||||
|
@ -29,8 +27,7 @@ class LatestVersionFinder(QThread):
|
|||
self.stats = d
|
||||
|
||||
def run(self):
|
||||
return
|
||||
if not self.config['checkForUpdates']:
|
||||
if not self.config['updates']:
|
||||
return
|
||||
d = self.stats
|
||||
d['proto'] = 2
|
||||
|
|
Loading…
Reference in a new issue