Commit 0e413393da98dcc8000ba196c6cdd3943b15932b
1 parent
888a5a06
Exists in
master
and in
67 other branches
ENH: added updater
Showing
1 changed file
with
25 additions
and
0 deletions
Show diff stats
invesalius/gui/dialogs.py
| ... | ... | @@ -34,6 +34,7 @@ import project as proj |
| 34 | 34 | import session as ses |
| 35 | 35 | import utils |
| 36 | 36 | |
| 37 | + | |
| 37 | 38 | class MaskEvent(wx.PyCommandEvent): |
| 38 | 39 | def __init__(self , evtType, id, mask_index): |
| 39 | 40 | wx.PyCommandEvent.__init__(self, evtType, id,) |
| ... | ... | @@ -1271,3 +1272,27 @@ class SurfaceMethodPanel(wx.Panel): |
| 1271 | 1272 | self.method_sizer.Hide(self.bmp) |
| 1272 | 1273 | |
| 1273 | 1274 | self.method_sizer.Layout() |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | +#def _UpdateDialog(self, pubsub_evt): | |
| 1282 | +def UpdateDialog(last,url): | |
| 1283 | + """ | |
| 1284 | + Show update dialog | |
| 1285 | + """ | |
| 1286 | + #try: | |
| 1287 | + msg=_("A new version of InVesalius is available. Do you want to open the download website now?") | |
| 1288 | + title=_("Invesalius Update") | |
| 1289 | + msgdlg = wx.MessageDialog(None,msg,title, wx.YES_NO | wx.ICON_INFORMATION) | |
| 1290 | + if (msgdlg.ShowModal()==wx.ID_YES): | |
| 1291 | + wx.LaunchDefaultBrowser(url) | |
| 1292 | + msgdlg.Destroy() | |
| 1293 | + #except: | |
| 1294 | + # return | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | ... | ... |