Ejemplo n.º 1
0
        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()
Ejemplo n.º 2
0
 def new_version_check(self, force=False):
     if cpp.get_check_new_versions() or force:
         import cellprofiler.utilities.check_for_updates as cfu
         import platform
         cfu.check_for_updates('http://cellprofiler.org/CPupdate.html',
                               0 if force else max(self.version, cpp.get_skip_version()), 
                               self.new_version_cb,
                               user_agent='CellProfiler/2.0.%d %s'%(self.version, platform.platform()))
Ejemplo n.º 3
0
    def new_version_check(self, force=False):
        if cpp.get_check_new_versions() or force:
            import cellprofiler.utilities.check_for_updates as cfu
            import platform
            import cellprofiler.utilities.version

            version_string = cellprofiler.utilities.version.version_string
            dotted_version = cellprofiler.utilities.version.dotted_version
            version_number = cellprofiler.utilities.version.version_number
            cfu.check_for_updates('http://cellprofiler.org/CPupdate.html',
                                  0 if force else max(version_number, cpp.get_skip_version()),
                                  self.new_version_cb,
                                  user_agent='CellProfiler/%s %s' % (dotted_version, version_string))
Ejemplo n.º 4
0
    def new_version_check(self, force=False):
        if cpp.get_check_new_versions() or force:
            import cellprofiler.utilities.check_for_updates as cfu
            import platform
            import cellprofiler.utilities.version

            version_string = cellprofiler.utilities.version.version_string
            dotted_version = cellprofiler.utilities.version.dotted_version
            version_number = cellprofiler.utilities.version.version_number
            cfu.check_for_updates(
                'http://cellprofiler.org/CPupdate.html',
                0 if force else max(version_number, cpp.get_skip_version()),
                self.new_version_cb,
                user_agent='CellProfiler/%s %s' %
                (dotted_version, version_string))
Ejemplo n.º 5
0
        def cb2():
            def set_check_pref(val):
                cpp.set_check_new_versions(val)

            def skip_this_version():
                cpp.set_skip_version(new_version)

            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()