diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-03-22 17:18:53 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-03-22 17:18:53 +1300 |
commit | 08bb07653306ed0f84932391732391227ee07ba2 (patch) | |
tree | f9b01df3489284f37f3df0c033f324f7e1d58c11 /libmproxy/console/help.py | |
parent | 120c8db8a413018bde60d156f480ade001b492ef (diff) | |
download | mitmproxy-08bb07653306ed0f84932391732391227ee07ba2.tar.gz mitmproxy-08bb07653306ed0f84932391732391227ee07ba2.tar.bz2 mitmproxy-08bb07653306ed0f84932391732391227ee07ba2.zip |
console: signal-based view stack, unifying mechanisms for help, flow views, etc.
Diffstat (limited to 'libmproxy/console/help.py')
-rw-r--r-- | libmproxy/console/help.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py index 109a9792..73cd8a50 100644 --- a/libmproxy/console/help.py +++ b/libmproxy/console/help.py @@ -2,7 +2,7 @@ from __future__ import absolute_import import urwid -from . import common +from . import common, signals from .. import filt, version footer = [ @@ -12,8 +12,7 @@ footer = [ class HelpView(urwid.ListBox): - def __init__(self, master, help_context, state): - self.master, self.state = master, state + def __init__(self, help_context): self.help_context = help_context or [] urwid.ListBox.__init__( self, @@ -180,7 +179,7 @@ class HelpView(urwid.ListBox): def keypress(self, size, key): key = common.shortcuts(key) if key == "q": - self.master.loop.widget = self.state + signals.pop_view_state.send(self) return None elif key == "?": key = None |