mirror of
https://github.com/ihabunek/toot
synced 2025-02-08 08:08:40 +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
|
||||
if img:
|
||||
try:
|
||||
status.placeholders[placeholder_index]._set_original_widget(
|
||||
graphics_widget(img, image_format=self.tui.options.image_format, corner_radius=10,
|
||||
colors=self.tui.options.colors))
|
||||
status.placeholders[placeholder_index].original_widget = graphics_widget(
|
||||
img, image_format=self.tui.options.image_format, corner_radius=10, colors=self.tui.options.colors
|
||||
)
|
||||
|
||||
except IndexError:
|
||||
# ignore IndexErrors.
|
||||
|
@ -58,7 +58,7 @@ class CheckBox(urwid.AttrWrap):
|
||||
|
||||
def get_state(self):
|
||||
"""Return the state of the checkbox."""
|
||||
return self.button._state
|
||||
return self.button.get_state()
|
||||
|
||||
|
||||
class RadioButton(urwid.AttrWrap):
|
||||
|
Loading…
x
Reference in New Issue
Block a user