diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-08-19 13:15:54 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-08-19 13:15:54 +1200 |
commit | 3787f8befb3d0ec35a9359d76f86e0db0e5ad2b0 (patch) | |
tree | b9ea47dd3092932d252cc4c74636279e1f0ed1cc /libmproxy/console/grideditor.py | |
parent | a77ccc406dc23a419b32cd37ca3a83542bd6681a (diff) | |
download | mitmproxy-3787f8befb3d0ec35a9359d76f86e0db0e5ad2b0.tar.gz mitmproxy-3787f8befb3d0ec35a9359d76f86e0db0e5ad2b0.tar.bz2 mitmproxy-3787f8befb3d0ec35a9359d76f86e0db0e5ad2b0.zip |
Add a graphical editor for path components (e -> p shortcut from request view screen).
Diffstat (limited to 'libmproxy/console/grideditor.py')
-rw-r--r-- | libmproxy/console/grideditor.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libmproxy/console/grideditor.py b/libmproxy/console/grideditor.py index d62cb206..138ca12e 100644 --- a/libmproxy/console/grideditor.py +++ b/libmproxy/console/grideditor.py @@ -95,7 +95,8 @@ class GridRow(common.WWrap): ) fspecs = self.fields[:] - fspecs[0] = ("fixed", self.editor.first_width + 2, fspecs[0]) + if len(self.fields) > 1: + fspecs[0] = ("fixed", self.editor.first_width + 2, fspecs[0]) w = urwid.Columns( fspecs, dividechars = 2 @@ -252,7 +253,7 @@ class GridEditor(common.WWrap): headings = [] for i, h in enumerate(self.headings): c = urwid.Text(h) - if i == 0: + if i == 0 and len(self.headings) > 1: headings.append(("fixed", first_width + 2, c)) else: headings.append(c) @@ -384,3 +385,10 @@ class SetHeadersEditor(GridEditor): return True return False + +class PathEditor(GridEditor): + title = "Editing URL path components" + columns = 1 + headings = ("Component",) + encoding = "ascii" + |