diff --git a/gertty/mywid.py b/gertty/mywid.py index 0cf1963..cb0b58b 100644 --- a/gertty/mywid.py +++ b/gertty/mywid.py @@ -533,20 +533,3 @@ class Link(urwid.Widget): if focus: return self.focused_attr return self.attr - -# A workaround for the issue fixed in -# https://github.com/wardi/urwid/pull/74 -# included here until thi fix is released -class MyGridFlow(urwid.GridFlow): - def generate_display_widget(self, size): - p = super(MyGridFlow, self).generate_display_widget(size) - for item in p.contents: - if isinstance(item[0], urwid.Padding): - c = item[0].original_widget - if isinstance(c, urwid.Columns): - if c.focus_position == 0 and not c.contents[0][0].selectable(): - for i, w in enumerate(c.contents): - if w[0].selectable(): - c.focus_position = i - break - return p diff --git a/gertty/view/change.py b/gertty/view/change.py index 65b51d3..da9a5ff 100644 --- a/gertty/view/change.py +++ b/gertty/view/change.py @@ -648,8 +648,8 @@ class ChangeView(urwid.WidgetWrap): 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 - self.grid = mywid.MyGridFlow([change_info, self.commit_message, votes, self.results], - cell_width=80, h_sep=2, v_sep=1, align='left') + self.grid = urwid.GridFlow([change_info, self.commit_message, votes, self.results], + cell_width=80, h_sep=2, v_sep=1, align='left') self.listbox = urwid.ListBox(urwid.SimpleFocusListWalker([])) self._w.contents.append((self.app.header, ('pack', 1))) self._w.contents.append((urwid.Divider(), ('pack', 1)))