aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-09 09:48:39 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-09 09:48:39 +1200
commit8fa96d1f3f961b4db67bc6c2edf2566f3d96a27f (patch)
treee0bc92377fbb4b0fffc2dd586660e3a0dec25656 /libmproxy/console
parent5553eb6371e98a6d4878cd090d342114714d20a7 (diff)
downloadmitmproxy-8fa96d1f3f961b4db67bc6c2edf2566f3d96a27f.tar.gz
mitmproxy-8fa96d1f3f961b4db67bc6c2edf2566f3d96a27f.tar.bz2
mitmproxy-8fa96d1f3f961b4db67bc6c2edf2566f3d96a27f.zip
Add an index counter to status bar.
Diffstat (limited to 'libmproxy/console')
-rw-r--r--libmproxy/console/__init__.py12
-rw-r--r--libmproxy/console/help.py1
2 files changed, 10 insertions, 3 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py
index 6f1a3d32..ee2ca408 100644
--- a/libmproxy/console/__init__.py
+++ b/libmproxy/console/__init__.py
@@ -191,9 +191,17 @@ class StatusBar(common.WWrap):
if self.expire and time.time() > self.expire:
self.message("")
- t = [
- ('heading', ("[%s]"%self.master.state.flow_count()).ljust(7)),
+ fc = self.master.state.flow_count()
+ if self.master.currentflow:
+ idx = self.master.state.view.index(self.master.currentflow) + 1
+ t = [
+ ('heading', ("[%s/%s]"%(idx, fc)).ljust(9))
]
+ else:
+ t = [
+ ('heading', ("[%s]"%fc).ljust(9))
+ ]
+
if self.master.server.bound:
boundaddr = "[%s:%s]"%(self.master.server.address or "*", self.master.server.port)
else:
diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py
index c9fded3b..c75d2ae2 100644
--- a/libmproxy/console/help.py
+++ b/libmproxy/console/help.py
@@ -95,7 +95,6 @@ class HelpView(urwid.ListBox):
common.highlight_key("xml", "x") +
[("text", ": XML")]
),
-
("o", "toggle options:"),
(None,
common.highlight_key("anticache", "a") +