def addonUpdateCheck(autoCheck=False):
global progressDialog
config.conf["wintenApps"]["updateCheckTime"] = int(time.time()) + config.conf["wintenApps"]["updateCheckTimeInterval"] * addonUpdateCheckInterval
try:
info = checkForAddonUpdate()
except:
log.debugWarning("Error checking for update", exc_info=True)
if not autoCheck:
wx.CallAfter(progressDialog.done)
progressDialog = None
# Translators: Error text shown when add-on update check fails.
wx.CallAfter(gui.messageBox, _("Error checking for update."),
# Translators: Title of the dialog shown when add-on update check fails.
_("Windows 10 App Essentials update"), wx.ICON_ERROR)
return
if not autoCheck:
wx.CallAfter(progressDialog.done)
progressDialog = None
if info is None:
if not autoCheck:
# Translators: Presented when no add-on update is available.
wx.CallAfter(gui.messageBox, _("No add-on update available."),
# Translators: Title of the dialog presented when no add-on update is available.
_("Windows 10 App Essentials update"))
return
else:
# Translators: Text shown if an add-on update is available.
checkMessage = _("Windows 10 App Essentials {newVersion} is available. Would you like to update?").format(newVersion = info["newVersion"])
# Translators: Title of the add-on update check dialog.
wx.CallAfter(getUpdateResponse, checkMessage, _("Windows 10 App Essentials update"), info["path"])
评论列表
文章目录