class QSControl(object): """ GUI for controlling QuickScan launching. """ def __init__(self, daddy): self.qscontrol = QuickScanControl() def start_quickscan(self): """ Do necessary checks before starting Scheduler. """ err = self.qscontrol.start(from_gui=True) if err: alertdlg = GenericAlert(_("QuickScan Launcher"), _("QuickScan couldn't be started, reason:\n\n") + str(err), buttons={1: (gtk.RESPONSE_OK, gtk.STOCK_OK)}) resp = alertdlg.run() alertdlg.destroy() def _quickscan_control(self, event): """ Verify if QuickScan is not already started. """ running = self.qscontrol.running() if not running: self.start_quickscan()
class QSControl(object): """ GUI for controlling QuickScan launching. """ def __init__(self, daddy): self.qscontrol = QuickScanControl() def start_quickscan(self): """ Do necessary checks before starting Scheduler. """ err = self.qscontrol.start(from_gui=True) if err: alertdlg = GenericAlert( _("QuickScan Launcher"), _("QuickScan couldn't be started, reason:\n\n") + str(err), buttons={1: (gtk.RESPONSE_OK, gtk.STOCK_OK)}) resp = alertdlg.run() alertdlg.destroy() def _quickscan_control(self, event): """ Verify if QuickScan is not already started. """ running = self.qscontrol.running() if not running: self.start_quickscan()
def __init__(self, daddy): self.qscontrol = QuickScanControl()