fsleyes.actions.updatecheck
¶
This module provides the UpdateCheckAction
, which checks to see
if a new version of FSLeyes is available.
- fsleyes.actions.updatecheck._FSLEYES_URL = 'https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSLeyes'¶
A url to direct the user towards to download the latest version of FSLeyes.
- fsleyes.actions.updatecheck._FSLEYES_VERSION_URL = 'https://api.anaconda.org/package/conda-forge/fsleyes'¶
A url which points to a JSON file that contains information about the FSLeyes package on conda-forge.
- class fsleyes.actions.updatecheck.UpdateCheckAction(overlayList, displayCtx)[source]¶
Bases:
fsleyes.actions.base.Action
The
UpdateCheckAction
is anAction
which checks to see if a new version of FSLeyes is available, and tells the user if there is.- __checkForUpdates(showUpToDateMessage=True, showErrorMessage=True, ignorePoint=False)¶
Run this action. Downloads a text file from a URL which contains the latest available version of FSLeyes. Compares that version with the running version. Displays a message to the user.
- Parameters
showUpToDateMessage – Defaults to
True
. IfFalse
, and the current version of FSLeyes is up to date, the user is not informed.showErrorMessage – Defaults to
True
. IfFalse
, and some error occurs while checking for updates, the user is not informed.ignorePoint – Defaults to
False
. IfTrue
, the point release number is ignored in the comparison.
- __annotations__ = {}¶
- __module__ = 'fsleyes.actions.updatecheck'¶
- class fsleyes.actions.updatecheck.UrlDialog(parent, title, msg, urlMsg=None, url=None)[source]¶
Bases:
__main__.docbuilder.run.<locals>.MockClass
Custom
wx.Dialog
used by theUpdateCheckAction
to display a message containing the FSLeyes download URL to the user.- __init__(parent, title, msg, urlMsg=None, url=None)[source]¶
Create a
UrlDialog
.- Parameters
parent –
wx
parent objecttitle – Dialog title
msg – Message to display
urlMsg – Message to display next to the URL. Not shown if a URL is not provided.
url – URL to display.
- __annotations__ = {}¶
- __module__ = 'fsleyes.actions.updatecheck'¶
- property ok¶
Return a reference to the OK button.