def start_ui(self): if self.model.current_lang is None: self.model.load_language('C') view = KeyboardView(self.model, self, self.opts) self.ui.set_body(view) if 'layout' in self.answers: layout = self.answers['layout'] variant = self.answers.get('variant', '') self.done(KeyboardSetting(layout=layout, variant=variant))
def default(self): if self.model.current_lang is None: self.model.load_language('C') title = "Keyboard configuration" if self.opts.run_on_serial: excerpt = 'Please select the layout of the keyboard directly attached to the system, if any.' else: excerpt = 'Please select your keyboard layout below, or select "Identify keyboard" to detect your layout automatically.' footer = _("Use UP, DOWN and ENTER keys to select your keyboard.") self.ui.set_header(title, excerpt) self.ui.set_footer(footer) view = KeyboardView(self.model, self, self.opts) self.ui.set_body(view) if 'layout' in self.answers: layout = self.answers['layout'] variant = self.answers.get('variant', '') self.done(KeyboardSetting(layout=layout, variant=variant))
async def make_ui(self): if self.keyboard_list.current_lang is None: self.keyboard_list.load_language('C') initial_setting = await self.endpoint.GET() view = KeyboardView(self, initial_setting) return view
async def make_ui(self): setup = await self.endpoint.GET() return KeyboardView(self, setup)
def make_ui(self): if self.keyboard_list.current_lang is None: self.keyboard_list.load_language('C') return KeyboardView(self, self.model.setting)