def settings_startup_app(state): apps = app.get_apps() print(apps) selection = prompt_option([{"title": a.title, "app": a} for a in apps], text="Select App:", none_text="Back", title="Set startup app") if selection: app.write_launch_file(selection["app"].name, "default_app.txt")
def __init__(self, apps=[]): "system start-up" # set up the application and the security checks self.apps = get_apps(apps) # build the app classes self._sync = thread.allocate_lock() self.acquire = self._sync.acquire self.release = self._sync.release self.locked = self._sync.locked # license print self.apps.values()[0]['Config'].copyright
def settings_launcher(state): apps = app.get_apps("Launcher") selection = prompt_option([{ "title": a.title, "app": a } for a in apps], text="Select App:", none_text="Back", title="Set default launcher") if selection: app.write_launch_file(selection["app"].name, "default_launcher.txt")
def backup_all(): users = app_module.get_sysusers() apps = app_module.get_apps() databases = app_module.get_databases() for app in apps: if 'serverid' in os.environ and app['serverid'] == os.environ['serverid'] : # attach the user for user in users: if(user['id'] == app['sysuserid']): app['sysuser'] = user # attach the databases app['databases'] = [] for database in databases: if(database['appid'] == app['id']): app['databases'].append(database) # do backupy things here _backup_app(app)
def _get_current_apps(): return [a.name for a in app.get_apps()]