Restore header edit functionality.

This commit is contained in:
Aldo Cortesi 2012-02-07 12:07:18 +13:00
parent a98d287e26
commit 56d2f9fbdb

View File

@ -520,12 +520,11 @@ class ConnectionView(WWrap):
c = self._spawn_editor(conn.content or "") c = self._spawn_editor(conn.content or "")
conn.content = c.rstrip("\n") conn.content = c.rstrip("\n")
elif part == "h": elif part == "h":
self.master.view_kveditor("Editing headers", conn.headers.lst, None) headertext = self._spawn_editor(repr(conn.headers))
#headertext = self._spawn_editor(repr(conn.headers)) headers = flow.Headers()
#headers = flow.Headers() fp = cStringIO.StringIO(headertext)
#fp = cStringIO.StringIO(headertext) headers.read(fp)
#headers.read(fp) conn.headers = headers
#conn.headers = headers
elif part == "u" and self.state.view_flow_mode == VIEW_FLOW_REQUEST: elif part == "u" and self.state.view_flow_mode == VIEW_FLOW_REQUEST:
self.master.prompt_edit("URL", conn.get_url(), self.set_url) self.master.prompt_edit("URL", conn.get_url(), self.set_url)
elif part == "m" and self.state.view_flow_mode == VIEW_FLOW_REQUEST: elif part == "m" and self.state.view_flow_mode == VIEW_FLOW_REQUEST: