def reload(user_event: UserEvent): desktop.on_layout_changed() state.reload() applications.reload() terminal.reload() messages.clean() reading.reload(recreate_view=True) model.windows.read_default_screen() model.windows.apply_decoration_config()
def _post_processing(user_event: UserEvent): if model.windows.staging: model.windows.commit_navigation(user_event.time) messages.clean() if messages.has_message(): reading.begin(user_event.time) if reading.is_transient(): reading.end()
def _window_key_press_callback(self, widget, event): ctrl = (event.state & Gdk.ModifierType.CONTROL_MASK) if event.keyval == Gdk.KEY_Escape or (ctrl and event.keyval == Gdk.KEY_bracketleft): self.end() return if self.in_command_mode(): return if event.keyval == Gdk.KEY_colon and not ctrl: self.set_command_mode() return True if event.keyval == Gdk.KEY_Return: messages.clean() self.view.update() return True
def end(self): self.remove_focus_callback() self.view.hide() messages.clean()
def escape(self, c_in: UserEvent): messages.clean()
def show_prompt(self, user_event: UserEvent): messages.clean() self.begin(user_event.time) self.set_command_mode() self.show_completions()