Use urwid constants for widgets instead of string equivalents

* Reduce `DeprecationWarning` amount:
  `get_focus` -> `focus_position` for `Frame` and `focus` for `Pile`
  `set_focus` -> use property `focus_position`
This commit is contained in:
Aleksei Stepanov 2024-01-18 11:58:22 +01:00
parent d856f3fd28
commit 77eca5d23e
11 changed files with 524 additions and 245 deletions

View file

@ -10,7 +10,6 @@ class LogDisplayShortcuts():
class LogDisplay():
def __init__(self, app):
import urwid
self.app = app
self.log_term = None
@ -48,6 +47,6 @@ class LogTerminal(urwid.WidgetWrap):
def keypress(self, size, key):
if key == "up":
nomadnet.NomadNetworkApp.get_shared_instance().ui.main_display.frame.set_focus("header")
nomadnet.NomadNetworkApp.get_shared_instance().ui.main_display.frame.focus_position = "header"
return super(LogTerminal, self).keypress(size, key)