Make related change entries selectable

The default for _selectable in the Pile class was switched to False
with https://github.com/urwid/urwid/pull/367 commit 018509d, so
explicitly set our change entries selectable in order to allow them
to be navigated by keyboard with urwid 2.1.0 and later.

Change-Id: I31f3d62475ec2e8a10e7a553426412ad6aa43f8f
This commit is contained in:
Jeremy Stanley 2021-10-01 18:33:10 +00:00
parent 9ddbebd2cb
commit d9a180bb0a
1 changed files with 8 additions and 3 deletions

View File

@ -640,11 +640,11 @@ class ChangeView(urwid.WidgetWrap):
change_info = urwid.Pile(change_info)
self.commit_message = CommitMessageBox(app, u'')
votes = mywid.Table([])
self.depends_on = urwid.Pile([])
self.depends_on = RelatedChangesSection([])
self.depends_on_rows = {}
self.needed_by = urwid.Pile([])
self.needed_by = RelatedChangesSection([])
self.needed_by_rows = {}
self.conflicts_with = urwid.Pile([])
self.conflicts_with = RelatedChangesSection([])
self.conflicts_with_rows = {}
self.related_changes = urwid.Pile([self.depends_on, self.needed_by, self.conflicts_with])
self.results = mywid.HyperText(u'') # because it scrolls better than a table
@ -1345,3 +1345,8 @@ class ChangeView(urwid.WidgetWrap):
self.refresh()
if self.app.config.close_change_on_review:
self.app.backScreen()
class RelatedChangesSection(urwid.Pile):
def __init__(self, rows):
super(RelatedChangesSection, self).__init__(rows)
self._selectable = True