wardi/urwid — pull request #74 by jeblair (2014-08-21 00:29:52+00:00)
Title: Fix GridFlow focus issue

The GridFlow widget create a Pile which contains Columns, one per
row of the grid. Because it creates the Columns widgets empty,
the Columns widgets all have their focus_position set to the default
of 0. The only time the GridFlow widget will update the focus of
the Columns widgets when constructing them is if the widget it is
adding is the focus widget of the GridFlow. This means that if
a GridFlow ends up with a row whose first widget is not selectable
and the current GridFlow focus position is not in that row, then
the entire Columns widget for that row will be considered not
selectable (as its focus position will remain 0).

Correct this by ensuring that the first selectable widget gets the
focus when a GridFlow creats a Columns widget (or the actual
GridFlow focus widget if it is in the row).

A similar fix is not needed for the Pile focus because as long as
the GridFlow focus position is set, the Pile focus will be as well.

Fixes issue #61.