Commit 527e727c00612d2e70c48f94a11d7d54ce18d15f
1 parent
22dfef43
Exists in
master
and in
5 other branches
FIX: updater fix
Showing
4 changed files
with
17 additions
and
8 deletions
Show diff stats
invesalius/control.py
| ... | ... | @@ -38,6 +38,7 @@ import reader.dicom_reader as dcm |
| 38 | 38 | import session as ses |
| 39 | 39 | |
| 40 | 40 | import utils |
| 41 | +import gui.dialogs as dialogs | |
| 41 | 42 | |
| 42 | 43 | DEFAULT_THRESH_MODE = 0 |
| 43 | 44 | |
| ... | ... | @@ -56,6 +57,8 @@ class Controller(): |
| 56 | 57 | |
| 57 | 58 | Publisher.sendMessage('Load Preferences') |
| 58 | 59 | |
| 60 | + utils.CheckForUpdate() | |
| 61 | + | |
| 59 | 62 | |
| 60 | 63 | def __bind_events(self): |
| 61 | 64 | Publisher.subscribe(self.OnImportMedicalImages, 'Import directory') |
| ... | ... | @@ -79,12 +82,16 @@ class Controller(): |
| 79 | 82 | Publisher.subscribe(self.OnOpenProject, 'Open project') |
| 80 | 83 | Publisher.subscribe(self.OnOpenRecentProject, 'Open recent project') |
| 81 | 84 | Publisher.subscribe(self.OnShowAnalyzeFile, 'Show analyze dialog') |
| 85 | + Publisher.subscribe(self.OnShowUpdateDialog, 'Show update dialog') | |
| 86 | + | |
| 82 | 87 | |
| 83 | 88 | def OnCancelImport(self, pubsub_evt): |
| 84 | 89 | #self.cancel_import = True |
| 85 | 90 | Publisher.sendMessage('Hide import panel') |
| 86 | 91 | |
| 87 | 92 | |
| 93 | + | |
| 94 | + | |
| 88 | 95 | ########################### |
| 89 | 96 | ########################### |
| 90 | 97 | |
| ... | ... | @@ -619,3 +626,8 @@ class Controller(): |
| 619 | 626 | preset_name + '.plist') |
| 620 | 627 | plistlib.writePlist(preset, preset_dir) |
| 621 | 628 | |
| 629 | + | |
| 630 | + | |
| 631 | + def OnShowUpdateDialog(self, pubsub_evt): | |
| 632 | + dialogs.UpdateDialog(pubsub_evt.data[0], pubsub_evt.data[1]) | |
| 633 | + | ... | ... |
invesalius/gui/dialogs.py
invesalius/gui/frame.py
invesalius/utils.py
| ... | ... | @@ -379,14 +379,13 @@ def UpdateChecker(): |
| 379 | 379 | last = response.readline().rstrip() |
| 380 | 380 | url = response.readline().rstrip() |
| 381 | 381 | print last, url |
| 382 | - if (last!="3.0 beta 32"): | |
| 382 | + if (last!="3.0 beta 3"): | |
| 383 | 383 | print "New update found!!! -> version:", last, ", url=",url |
| 384 | 384 | from time import sleep |
| 385 | 385 | sleep(5) |
| 386 | - from gui.dialogs import UpdateDialog | |
| 387 | - #UpdateDialog(last,url) | |
| 386 | + from wx.lib.pubsub import pub as Publisher | |
| 387 | + Publisher.sendMessage("Show update dialog", (last,url)) | |
| 388 | 388 | #except: |
| 389 | - # return | |
| 390 | - | |
| 389 | + #return | |
| 391 | 390 | |
| 392 | 391 | ... | ... |