mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-05-05 23:55:13 -04:00
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:
parent
d856f3fd28
commit
77eca5d23e
11 changed files with 524 additions and 245 deletions
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue