def OnClick(self, e): if(self.index != None): napi = NapiProjekt(self.paths[self.index]) napi.getMoreInfo() InfoBalloon(self.parent, napi.info, False).Show() self.Destroy()
def run(self): if(len(self.list) != 1): for i, path in enumerate(self.list, start=1): napi = NapiProjekt(path) if(napi.downloadSubtitles(self.lang)): downloaded = True else: downloaded = False wx.PostEvent(self.parent, DownloadEvent(EVT_TYPE_DOWNLOAD, -1, (downloaded, i))) else: napi = NapiProjekt(self.list[0]) if(napi.downloadSubtitles(self.lang)): downloaded = True else: downloaded = False napi.getMoreInfo() wx.PostEvent(self.parent, DownloadEvent(EVT_TYPE_DOWNLOAD, -1, (downloaded, napi.info)))
def OnActiveItem(self, e): self.index = e.GetIndex() napi = NapiProjekt(self.paths[self.index]) napi.getMoreInfo() InfoBalloon(self.parent, napi.info, False).Show()