(self)
| 321 | return r |
| 322 | |
| 323 | def redraw(self) -> None: |
| 324 | fc = self.master.commands.execute("view.properties.length") |
| 325 | if self.master.view.focus.index is None: |
| 326 | offset = 0 |
| 327 | else: |
| 328 | offset = self.master.view.focus.index + 1 |
| 329 | |
| 330 | if self.master.options.view_order_reversed: |
| 331 | arrow = common.SYMBOL_UP |
| 332 | else: |
| 333 | arrow = common.SYMBOL_DOWN |
| 334 | |
| 335 | marked = "" |
| 336 | if self.master.commands.execute("view.properties.marked"): |
| 337 | marked = "M" |
| 338 | |
| 339 | t: list[tuple[str, str] | str] = [ |
| 340 | ("heading", f"{arrow} {marked} [{offset}/{fc}]".ljust(11)), |
| 341 | ] |
| 342 | |
| 343 | listen_addrs: list[str] = list( |
| 344 | dict.fromkeys( |
| 345 | human.format_address(a) |
| 346 | for a in self.master.addons.get("proxyserver").listen_addrs() |
| 347 | ) |
| 348 | ) |
| 349 | if listen_addrs: |
| 350 | boundaddr = f"[{', '.join(listen_addrs)}]" |
| 351 | else: |
| 352 | boundaddr = "" |
| 353 | t.extend(self.get_status()) |
| 354 | status = urwid.AttrMap( |
| 355 | urwid.Columns( |
| 356 | [ |
| 357 | urwid.Text(t), |
| 358 | urwid.Text(boundaddr, align="right"), |
| 359 | ] |
| 360 | ), |
| 361 | "heading", |
| 362 | ) |
| 363 | self.ib._w = status |
| 364 | |
| 365 | def selectable(self) -> bool: |
| 366 | return True |
no test coverage detected