def OnCheckSoftware(self,e): # can be long ... wx.SetCursor(wx.HOURGLASS_CURSOR) url = itrade_config.checkNewRelease() # restore wx.SetCursor(wx.STANDARD_CURSOR) if url=='ok': iTradeInformation(self,message('checksoftware_uptodate'),message('checksoftware_title')) elif url=='dev': iTradeInformation(self,message('checksoftware_development'),message('checksoftware_title')) elif url=='err': iTradeError(self,message('checksoftware_error'),message('checksoftware_title')) else: if iTradeYesNo(self,message('checksoftware_needupdate'),message('checksoftware_title'))==wx.ID_YES: iTradeLaunchBrowser(url,new=True)
def Run(self): time.sleep(3) self.Close(True) if itrade_config.isConnected(): itrade_config.checkNewRelease(ping=True)