diff options
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" + |