From d9a180bb0a0bc3cec39c595fec56010df3d43fc2 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 1 Oct 2021 18:33:10 +0000 Subject: [PATCH] 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 --- gertty/view/change.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gertty/view/change.py b/gertty/view/change.py index a3f517d..589bcba 100644 --- a/gertty/view/change.py +++ b/gertty/view/change.py @@ -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