def _install_app(self, report_install=True): installer = AppInstaller(self._app['id'], self._apps, None, self._window) installer.set_report_install(report_install) if not installer.install(): return # We need to reload the application information, readd it to # the desktop and send an update to the parent object. new_app = load_from_app_file(installer.get_loc()) self._app['origin'] = new_app['origin'] remove_from_desktop(self._app) self._apps.update_app(new_app) add_to_desktop(new_app)
def _install_app(self, report_install=True): installer = AppInstaller(self._app['id'], self._apps, None, self._window) installer.set_report_install(report_install) if not installer.install(): return # We need to reload the application information, readd it to # the desktop and send an update to the parent object. new_app = load_from_app_file(installer.get_loc()) self._app['origin'] = new_app['origin'] remove_from_desktop(self._app) self._apps.update_app(new_app) if new_app.get('desktop'): add_to_desktop(new_app)
def _download_app(self): try: app_data_file, app_icon_file = download_app(self._handle) self._tmp_data_file = app_data_file self._tmp_icon_file = app_icon_file except AppDownloadError as err: head = _("Unable to download the application") dialog = KanoDialog(head, unicode(err), { _("OK"): { "return_value": 0 }, }, parent_window=self._win) dialog.run() del dialog return False self._app = load_from_app_file(self._tmp_data_file, False) return True
def _download_app(self): try: app_data_file, app_icon_file = download_app(self._handle) self._tmp_data_file = app_data_file self._tmp_icon_file = app_icon_file except AppDownloadError as err: head = "Unable to download the application" dialog = KanoDialog( head, str(err), { "OK": { "return_value": 0 }, }, parent_window=self._win ) dialog.run() del dialog return False self._app = load_from_app_file(self._tmp_data_file, False) return True