aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console/flowview.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-03-22 17:18:53 +1300
committerAldo Cortesi <aldo@nullcube.com>2015-03-22 17:18:53 +1300
commit08bb07653306ed0f84932391732391227ee07ba2 (patch)
treef9b01df3489284f37f3df0c033f324f7e1d58c11 /libmproxy/console/flowview.py
parent120c8db8a413018bde60d156f480ade001b492ef (diff)
downloadmitmproxy-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/flowview.py')
-rw-r--r--libmproxy/console/flowview.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py
index 2dd2cb82..fcb967cc 100644
--- a/libmproxy/console/flowview.py
+++ b/libmproxy/console/flowview.py
@@ -114,9 +114,6 @@ cache = CallbackCache()
class FlowView(urwid.WidgetWrap):
- REQ = 0
- RESP = 1
-
highlight_color = "focusfield"
def __init__(self, master, state, flow):
@@ -633,8 +630,9 @@ class FlowView(urwid.WidgetWrap):
new_flow, new_idx = self.state.get_prev(idx)
if new_flow is None:
signals.status_message.send(message="No more flows!")
- return
- self.master.view_flow(new_flow)
+ else:
+ signals.pop_view_state.send(self)
+ self.master.view_flow(new_flow)
def view_next_flow(self, flow):
return self._view_nextprev_flow("next", flow)
@@ -673,8 +671,8 @@ class FlowView(urwid.WidgetWrap):
conn = self.flow.response
if key == "q":
- self.master.view_flowlist()
- key = None
+ signals.pop_view_state.send(self)
+ return None
elif key == "tab":
if self.state.view_flow_mode == common.VIEW_FLOW_REQUEST:
self.view_response()