def OnInit(self): wxInitAllImageHandlers() if self.mode == 'scanner': if pyc.isWow64(): self.DisablefsRedirect() self.exit_code = wxDialogUtils.wxScan(parent=None, config=self.config, path=self.path, autoClose=self.autoClose) elif self.mode == 'update': self.exit_code = wxDialogUtils.wxUpdateVirDB(parent=None, config=self.config, autoClose=self.autoClose) elif self.mode == 'configure': wxDialogUtils.wxConfigure(parent=None, config=self.config) elif self.mode == 'configure_schedule': wxDialogUtils.wxConfigure(parent=None, config=self.config, switchToSchedule=True) elif self.mode == 'about': wxDialogUtils.wxAbout(parent=None, config=self.config) elif self.mode == 'viewlog': wxDialogUtils.wxShowLog(parent=None, logfile=self.path.strip('"')) elif self.mode == 'checkversion': if not wxDialogUtils.wxCheckUpdate(parent=None, config=self.config): self.exit_code = 1 else: # mode == 'main' if pyc.isWow64(): self.DisablefsRedirect() self.main = wxFrameMain.create(parent=None, config=self.config) self.main.Show() #workaround for running in wxProcess self.SetTopWindow(self.main) return True
def OnViewScanLog(self, event): wxDialogUtils.wxShowLog(self, self._config.Get('ClamAV', 'LogFile'))
def OnViewUpdateLog(self, event): wxDialogUtils.wxShowLog(self, self._config.Get('Updates', 'DBUpdateLogFile'))