diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-03-20 11:11:53 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-03-20 11:11:53 +1300 |
commit | 1441fade907142598e26ef7c4850700d936988a9 (patch) | |
tree | 8d9df63df56bd101cca183b530f476ac0e481b24 /libmproxy/console/__init__.py | |
parent | 215383554525535816accdd8580d06b9e4cf7565 (diff) | |
download | mitmproxy-1441fade907142598e26ef7c4850700d936988a9.tar.gz mitmproxy-1441fade907142598e26ef7c4850700d936988a9.tar.bz2 mitmproxy-1441fade907142598e26ef7c4850700d936988a9.zip |
More work on pretty view forcing.
- Make this setting apply only to the currently viewed flow. I think it's more
likely that this is the behaviour the user will want, rather than globally
setting the pretty type.
- Update help.
Diffstat (limited to 'libmproxy/console/__init__.py')
-rw-r--r-- | libmproxy/console/__init__.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 553b560b..73912129 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -232,7 +232,6 @@ class ConsoleState(flow.State): flow.State.__init__(self) self.focus = None self.view_body_mode = common.VIEW_BODY_PRETTY - self.view_body_pretty_type = common.VIEW_BODY_PRETTY_TYPE_AUTO self.view_flow_mode = common.VIEW_FLOW_REQUEST self.last_script = "" self.last_saveload = "" @@ -571,8 +570,8 @@ class ConsoleMaster(flow.FlowMaster): self.help_context = flowlist.help_context def view_flow(self, flow): - self.body = flowview.ConnectionView(self, self.state, flow) - self.header = flowview.ConnectionViewHeader(self, flow) + self.body = flowview.FlowView(self, self.state, flow) + self.header = flowview.FlowViewHeader(self, flow) self.statusbar = StatusBar(self, self.footer_text_flowview) self.currentflow = flow @@ -698,17 +697,6 @@ class ConsoleMaster(flow.FlowMaster): self.state.view_body_mode = common.VIEW_BODY_PRETTY self.refresh_flow(self.currentflow) - def change_pretty_type(self, t): - if t == "a": - self.state.view_body_pretty_type = common.VIEW_BODY_PRETTY_TYPE_AUTO - elif t == "j": - self.state.view_body_pretty_type = common.VIEW_BODY_PRETTY_TYPE_JSON - elif t == "u": - self.state.view_body_pretty_type = common.VIEW_BODY_PRETTY_TYPE_URLENCODED - elif t == "x": - self.state.view_body_pretty_type = common.VIEW_BODY_PRETTY_TYPE_XML - self.refresh_flow(self.currentflow) - def drawscreen(self): size = self.ui.get_cols_rows() canvas = self.view.render(size, focus=1) |