w10config.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:wintenApps 作者: josephsl 项目源码 文件源码
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"])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号