def show_readme(self): _, rows = EventLoop.screen_size() cur_spell = self.selected_spell spellname = cur_spell['name'] spelldir = cur_spell['spell-dir'] brmv = BundleReadmeView(self.app.metadata_controller, spellname, spelldir, self.hide_readme, int(rows * .75)) self.app.ui.set_header("Spell Readme") self.app.ui.set_body(brmv)
def keypress(self, size, key): rv = super().keypress(size, key) if key in ['tab', 'shift tab']: self._swap_focus() self.handle_focus_changed() if key in ['r'] and self.selected_spell_w is not None: _, rows = EventLoop.screen_size() cur_spell = self.selected_spell_w.spell spellname = cur_spell['name'] spelldir = cur_spell['spell-dir'] brmv = BundleReadmeView(self.app.metadata_controller, spellname, spelldir, self.handle_readme_done, int(rows * .75)) self.app.ui.set_header("Spell Readme") self.app.ui.set_body(brmv) return rv
def render(self): _, rows = EventLoop.screen_size() rows = int(rows * .75) brmv = BundleReadmeView(app.metadata_controller, self.finish, rows) app.ui.set_header("Review Spell") app.ui.set_body(brmv)