def cb2(): def set_check_pref(val): cpp.set_check_new_versions(val) def skip_this_version(): cpp.set_skip_version(new_version) # showing a modal dialog while the splashscreen is up causes a hang try: self.splash.Destroy() except: pass if new_version <= self.version: # special case: force must have been set in new_version_check, so give feedback to the user. wx.MessageBox('Your copy of CellProfiler is up to date.', '', wx.ICON_INFORMATION) return import cellprofiler.gui.newversiondialog as nvd dlg = nvd.NewVersionDialog( None, "CellProfiler update available (version %d)" % (new_version), new_version_info, 'http://cellprofiler.org/download.htm', cpp.get_check_new_versions(), set_check_pref, skip_this_version) dlg.ShowModal() dlg.Destroy()
def cb2(): def set_check_pref(val): cpaprefs.set_check_new_versions(val) def skip_this_version(): cpaprefs.set_skip_version(new_version) # showing a modal dialog while the splashscreen is up causes a hang try: wx.GetApp().splash.Destroy() except: pass import cellprofiler.gui.newversiondialog as nvd dlg = nvd.NewVersionDialog( None, "CellProfiler Analyst update available (version %d)" % (new_version), new_version_info, 'http://cellprofiler.org/downloadCPA.htm', cpaprefs.get_check_new_versions(), set_check_pref, skip_this_version) dlg.Show()