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://fsl.fmrib.ox.ac.uk/fsldownloads/fsleyes/version.txt'

A url which points to a text file that contains the most recently released FSLeyes version number.

class fsleyes.actions.updatecheck.UpdateCheckAction

Bases: fsleyes.actions.base.Action

The UpdateCheckAction is an Action which checks to see if a new version of FSLeyes is available, and tells the user if there is.

__init__()

Create an UpdateCheckAction.

_UpdateCheckAction__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. If False, and the current version of FSLeyes is up to date, the user is not informed.

  • showErrorMessage – Defaults to True. If False, and some error occurs while checking for updates, the user is not informed.

  • ignorePoint – Defaults to False. If True, the point release number is ignored in the comparison.

__module__ = 'fsleyes.actions.updatecheck'
class fsleyes.actions.updatecheck.UrlDialog(parent, title, msg, urlMsg=None, url=None)

Bases: __main__.MockClass

Custom wx.Dialog used by the UpdateCheckAction to display a message containing the FSLeyes download URL to the user.

__init__(parent, title, msg, urlMsg=None, url=None)

Create a UrlDialog.

Parameters
  • parentwx parent object

  • title – 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.

__module__ = 'fsleyes.actions.updatecheck'
property ok

Return a reference to the OK button.