mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
console: generalise grideditor help text, only show headers if we have them
This commit is contained in:
parent
a4833a5bbf
commit
ecce260542
@ -294,6 +294,8 @@ class BaseGridEditor(urwid.WidgetWrap):
|
|||||||
first_width = max(len(r), first_width)
|
first_width = max(len(r), first_width)
|
||||||
self.first_width = min(first_width, FIRST_WIDTH_MAX)
|
self.first_width = min(first_width, FIRST_WIDTH_MAX)
|
||||||
|
|
||||||
|
h = None
|
||||||
|
if any(col.heading for col in self.columns):
|
||||||
headings = []
|
headings = []
|
||||||
for i, col in enumerate(self.columns):
|
for i, col in enumerate(self.columns):
|
||||||
c = urwid.Text(col.heading)
|
c = urwid.Text(col.heading)
|
||||||
@ -329,9 +331,9 @@ class BaseGridEditor(urwid.WidgetWrap):
|
|||||||
self._w.set_footer(
|
self._w.set_footer(
|
||||||
urwid.Text(
|
urwid.Text(
|
||||||
[
|
[
|
||||||
("highlight", "No values. Press "),
|
("highlight", "No values - you should add some. Press "),
|
||||||
("key", "a"),
|
("key", "?"),
|
||||||
("highlight", " to add some."),
|
("highlight", " for help."),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user