Add an index counter to status bar.

This commit is contained in:
Aldo Cortesi 2012-04-09 09:48:39 +12:00
parent 5553eb6371
commit 8fa96d1f3f
2 changed files with 10 additions and 3 deletions

View File

@ -191,9 +191,17 @@ class StatusBar(common.WWrap):
if self.expire and time.time() > self.expire:
self.message("")
fc = self.master.state.flow_count()
if self.master.currentflow:
idx = self.master.state.view.index(self.master.currentflow) + 1
t = [
('heading', ("[%s]"%self.master.state.flow_count()).ljust(7)),
('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:

View File

@ -95,7 +95,6 @@ class HelpView(urwid.ListBox):
common.highlight_key("xml", "x") +
[("text", ": XML")]
),
("o", "toggle options:"),
(None,
common.highlight_key("anticache", "a") +