mirror of
https://github.com/ihabunek/toot
synced 2025-02-12 18:10:45 +01:00
Handle urwid API deprecations
* `_set_original_widget` -> `original_widget` property (setter) * `button._state` -> `button.get_state()` (not deprecated, but we have public getter)
This commit is contained in:
parent
1368a89125
commit
d4a991e956
@ -338,9 +338,9 @@ class Timeline(urwid.Columns):
|
|||||||
pass
|
pass
|
||||||
if img:
|
if img:
|
||||||
try:
|
try:
|
||||||
status.placeholders[placeholder_index]._set_original_widget(
|
status.placeholders[placeholder_index].original_widget = graphics_widget(
|
||||||
graphics_widget(img, image_format=self.tui.options.image_format, corner_radius=10,
|
img, image_format=self.tui.options.image_format, corner_radius=10, colors=self.tui.options.colors
|
||||||
colors=self.tui.options.colors))
|
)
|
||||||
|
|
||||||
except IndexError:
|
except IndexError:
|
||||||
# ignore IndexErrors.
|
# ignore IndexErrors.
|
||||||
|
@ -58,7 +58,7 @@ class CheckBox(urwid.AttrWrap):
|
|||||||
|
|
||||||
def get_state(self):
|
def get_state(self):
|
||||||
"""Return the state of the checkbox."""
|
"""Return the state of the checkbox."""
|
||||||
return self.button._state
|
return self.button.get_state()
|
||||||
|
|
||||||
|
|
||||||
class RadioButton(urwid.AttrWrap):
|
class RadioButton(urwid.AttrWrap):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user