MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / show

Method show

mitmproxy/tools/console/tabs.py:43–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 return self._w.keypress(size, key)
42
43 def show(self):
44 if not self.tabs:
45 return
46
47 headers = []
48 for i in range(len(self.tabs)):
49 txt = self.tabs[i][0]()
50 if i == self.tab_offset % len(self.tabs):
51 headers.append(Tab(i, txt, "heading", self.change_tab))
52 else:
53 headers.append(Tab(i, txt, "heading_inactive", self.change_tab))
54 headers = urwid.Columns(headers, dividechars=1)
55 self._w = urwid.Frame(
56 body=self.tabs[self.tab_offset % len(self.tabs)][1](), header=headers
57 )
58 self._w.focus_position = "body"

Callers 6

__init__Method · 0.95
change_tabMethod · 0.95
layout_pushedMethod · 0.80
__init__Method · 0.80
contentview_changedMethod · 0.80
focus_changedMethod · 0.80

Calls 2

TabClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected