Mercurial > getan
changeset 563:5ec211c172ed
Removed the filter_input step in the processing of states.
As far as I see it is not used anywhere.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 22 Sep 2020 17:30:02 +0200 |
parents | 5fd64fde95a8 |
children | c8e63e919a90 |
files | getan/controller.py getan/states.py |
diffstat | 2 files changed, 3 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/controller.py Thu May 14 20:39:58 2020 +0200 +++ b/getan/controller.py Tue Sep 22 17:30:02 2020 +0200 @@ -63,7 +63,6 @@ self.loop.screen_size = None self.loop.draw_screen() else: - input = self.state.input_filter(input, raw_input) self.loop.process_input(input) self.state.handle_input(input)
--- a/getan/states.py Thu May 14 20:39:58 2020 +0200 +++ b/getan/states.py Tue Sep 22 17:30:02 2020 +0200 @@ -26,9 +26,9 @@ """ Represents a State of Getan A State can be used to handle user input. The user input handling is done - in three phases. First it is possible to filter keys that shouldn't be - passed to a widget in input_filter. Afterwards it is possible to redirect - a key to a specific widget in keypress. In the third phase it is possible + in two phases. + First it is possible to redirect a key to a specific widget in keypress. + In the second phase it is possible to act on user input which isn't handled by a widget yet. The corresponing method is handle_input. @@ -45,13 +45,6 @@ self.config = controller.get_config() self.set_focus() - def input_filter(self, input, raw): - """Filters input that should not be passed to widget elements - - By default no input is filtered and input is returned unchanged. - """ - return input - def keypress(self, size, key): """Redirects user input to the current view""" self.view.keypress(size, key)