def on_slash(self): """ '/' is pressed, activate the input """ curses.curs_set(1) self.input = windows.CommandInput("", self.reset_help_message, self.execute_slash_command) self.input.resize(1, self.width, self.height-1, 0) self.input.do_command("/") # we add the slash
def start_search_slow(self): curses.curs_set(1) self.input = windows.CommandInput("[Search]", self.on_search_terminate, self.on_search_terminate, self.set_roster_filter_slow) self.input.resize(1, self.width, self.height - 1, 0) self.input.disable_history() return True
def on_slash(self): """ '/' is pressed, we enter "input mode" """ if isinstance(self.input, windows.YesNoInput): return curses.curs_set(1) self.input = windows.CommandInput("", self.reset_help_message, self.execute_slash_command) self.input.resize(1, self.width, self.height - 1, 0) self.input.do_command("/") # we add the slash
def start_search(self): """ Start the search. The input should appear with a short instruction in it. """ curses.curs_set(1) self.input = windows.CommandInput("[Search]", self.on_search_terminate, self.on_search_terminate, self.set_roster_filter) self.input.resize(1, self.width, self.height - 1, 0) self.input.disable_history() roster.modified() self.refresh() return True