Example #1
0
 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()
Example #2
0
    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();
Example #3
0
 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()
Example #4
0
    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();
Example #5
0
    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();
Example #6
0
    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()