mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-10-25 18:40:13 -04:00
Compatibility with urwid 5.0
- Scrollable: use Pile.focus instead of Pile.get_focus(), which urwid 5.0 removes. - ImageScreen: subclass urwid.display.raw.Screen instead of the urwid.raw_display path, deprecated since urwid 2.4.0 and to be removed in urwid 7.0. Both replacements work with urwid 3.0.5, the declared minimum.
This commit is contained in:
parent
b2f852c9e0
commit
17ffafc757
2 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ from ._termlib import is_kitty_supported
|
|||
from .widget import ImageWidget
|
||||
|
||||
# A raw display screen subclass with Kitty TGP side-channel support
|
||||
class ImageScreen(urwid.raw_display.Screen):
|
||||
class ImageScreen(urwid.display.raw.Screen):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self._ti_images = {}
|
||||
|
|
|
|||
2
nomadnet/vendor/Scrollable.py
vendored
2
nomadnet/vendor/Scrollable.py
vendored
|
|
@ -146,7 +146,7 @@ class Scrollable(urwid.WidgetDecoration):
|
|||
ow.focus = pwi
|
||||
|
||||
st = None
|
||||
nf = ow.get_focus()
|
||||
nf = ow.focus
|
||||
if hasattr(nf, "key_timeout"):
|
||||
st = nf
|
||||
elif hasattr(nf, "original_widget"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue