From 15cc09f1b8d49ce57918acbfe8fd249a4977b036 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 2 Apr 2012 10:30:35 +1200 Subject: Start rationalizing content views. We now no longer have distinction between "pretty" view and hex/raw. Instead, we simply a default AUTO view with a global override (M) and a local override (m). --- libmproxy/console/__init__.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libmproxy/console/__init__.py') diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index ee295755..1e5524d8 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -231,7 +231,7 @@ class ConsoleState(flow.State): def __init__(self): flow.State.__init__(self) self.focus = None - self.view_body_mode = contentview.VIEW_CONTENT_PRETTY + self.default_body_view = contentview.VIEW_AUTO self.view_flow_mode = common.VIEW_FLOW_REQUEST self.last_script = "" self.last_saveload = "" @@ -686,15 +686,6 @@ class ConsoleMaster(flow.FlowMaster): return "Invalid reverse proxy specification" self.server.config.reverse_proxy = s - def changeview(self, v): - if v == "r": - self.state.view_body_mode = contentview.VIEW_CONTENT_RAW - elif v == "h": - self.state.view_body_mode = contentview.VIEW_CONTENT_HEX - elif v == "p": - self.state.view_body_mode = contentview.VIEW_CONTENT_PRETTY - self.refresh_flow(self.currentflow) - def drawscreen(self): size = self.ui.get_cols_rows() canvas = self.view.render(size, focus=1) -- cgit v1.2.3