From 0e413393da98dcc8000ba196c6cdd3943b15932b Mon Sep 17 00:00:00 2001 From: ruppert Date: Fri, 14 Sep 2012 16:46:38 +0000 Subject: [PATCH] ENH: added updater --- invesalius/gui/dialogs.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+), 0 deletions(-) diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 5c31b75..460f5a7 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -34,6 +34,7 @@ import project as proj import session as ses import utils + class MaskEvent(wx.PyCommandEvent): def __init__(self , evtType, id, mask_index): wx.PyCommandEvent.__init__(self, evtType, id,) @@ -1271,3 +1272,27 @@ class SurfaceMethodPanel(wx.Panel): self.method_sizer.Hide(self.bmp) self.method_sizer.Layout() + + + + + + +#def _UpdateDialog(self, pubsub_evt): +def UpdateDialog(last,url): + """ + Show update dialog + """ + #try: + msg=_("A new version of InVesalius is available. Do you want to open the download website now?") + title=_("Invesalius Update") + msgdlg = wx.MessageDialog(None,msg,title, wx.YES_NO | wx.ICON_INFORMATION) + if (msgdlg.ShowModal()==wx.ID_YES): + wx.LaunchDefaultBrowser(url) + msgdlg.Destroy() + #except: + # return + + + + -- libgit2 0.21.2