def on_update_work_finished(self, transaction, status, kwargs): parent = kwargs["parent"] proxy.update_apt_cache(True) if proxy.is_package_upgradable(self.current_app) or ( not proxy.is_package_installed(self.current_app) and proxy.is_package_avaiable(self.current_app) ): worker = AptWorker(self.get_toplevel(), finish_handler=self.on_package_work_finished, data={"parent": self}) worker.install_packages([self.current_app]) else: unset_busy(parent) self.reset_install_button()
def update_app(self, pkgname, *args): if pkgname != self.current_app: self.current_app = pkgname if proxy.is_package_avaiable(pkgname): if proxy.is_package_installed(pkgname): self.update_action_button(self.UNINSTALL_ACTION) else: self.update_action_button(self.INSTALL_ACTION) else: self.update_action_button(self.NOT_AVAILABLE_ACTION) self.update_sources();
def on_update_work_finished(self, transaction, status, kwargs): parent = kwargs['parent'] proxy.update_apt_cache(True) if proxy.is_package_upgradable(self.current_app) or \ (not proxy.is_package_installed(self.current_app) and \ proxy.is_package_avaiable(self.current_app)): worker = AptWorker(self.get_toplevel(), finish_handler=self.on_package_work_finished, data={'parent': self}) worker.install_packages([self.current_app]) else: unset_busy(parent) self.reset_install_button()
def update_app(self, pkgname, *args): if pkgname != self.current_app: self.current_app = pkgname if proxy.is_package_avaiable(pkgname): if proxy.is_package_installed(pkgname): self.execute_script('Utapp.get("router.appController").currentApp.set("isInstalled", true);'); self.update_action_button(self.UNINSTALL_ACTION) else: self.execute_script('Utapp.get("router.appController").currentApp.set("isInstalled", false);'); self.update_action_button(self.INSTALL_ACTION) else: self.update_action_button(self.NOT_AVAILABLE_ACTION) self.update_sources();
def update_app(self, pkgname, *args): if pkgname != self.current_app: self.current_app = pkgname if proxy.is_package_avaiable(pkgname): if proxy.is_package_installed(pkgname): self.execute_script( 'Utapp.get("router.appController").currentApp.set("isInstalled", true);' ) self.update_action_button(self.UNINSTALL_ACTION) else: self.execute_script( 'Utapp.get("router.appController").currentApp.set("isInstalled", false);' ) self.update_action_button(self.INSTALL_ACTION) else: self.update_action_button(self.NOT_AVAILABLE_ACTION) self.update_sources()