def __init__(self): self.config = Config() self.db = DataBase() self.engine = Engine(self.db) self.ui = Ui(self.engine, self.config) self.ui.connect('destroy', self.quit) self.engine.set_shell_items(self.ui) self.engine.load_plugins()
class Core: def __init__(self): self.config = Config() self.db = DataBase() self.engine = Engine(self.db) self.ui = Ui(self.engine, self.config) self.ui.connect('destroy', self.quit) self.engine.set_shell_items(self.ui) self.engine.load_plugins() def run(self): self.ui.show_all() gtk.main() def quit(self, window): self.engine.deactivate_all() gtk.main_quit()