mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -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")
|
ret = _("late")
|
||||||
else:
|
else:
|
||||||
ret = _("early")
|
ret = _("early")
|
||||||
showWarning(
|
showWarning("""\
|
||||||
_("The time or date on your computer is not correct.\n") +
|
In order to ensure your collection works correctly when moved between \
|
||||||
ngettext("It is %(sec)d second %(type)s.\n",
|
devices, Anki requires the system clock to be set correctly. Your system \
|
||||||
"It is %(sec)d seconds %(type)s.\n", abs(diff))
|
clock appears to be wrong by more than 5 minutes.
|
||||||
% {"sec": abs(diff), "type": ret} +
|
|
||||||
_(" Please ensure it is set correctly and then restart Anki.")
|
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
|
# Schema modifications
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
|
@ -14,10 +14,8 @@ class LatestVersionFinder(QThread):
|
||||||
|
|
||||||
def __init__(self, main):
|
def __init__(self, main):
|
||||||
QThread.__init__(self)
|
QThread.__init__(self)
|
||||||
print "autoupdate"
|
|
||||||
return
|
|
||||||
self.main = main
|
self.main = main
|
||||||
self.config = main.pm.profile
|
self.config = main.pm.meta
|
||||||
plat=sys.platform
|
plat=sys.platform
|
||||||
pver=platform.platform()
|
pver=platform.platform()
|
||||||
d = {"ver": aqt.appVersion,
|
d = {"ver": aqt.appVersion,
|
||||||
|
@ -29,8 +27,7 @@ class LatestVersionFinder(QThread):
|
||||||
self.stats = d
|
self.stats = d
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
return
|
if not self.config['updates']:
|
||||||
if not self.config['checkForUpdates']:
|
|
||||||
return
|
return
|
||||||
d = self.stats
|
d = self.stats
|
||||||
d['proto'] = 2
|
d['proto'] = 2
|
||||||
|
|
Loading…
Reference in a new issue