# HG changeset patch # User Björn Ricks # Date 1365673261 -7200 # Node ID bcc5951edaada4b130bc56070ca11997fd8d13f6 # Parent fcd0a8b09fcfd3d5332a08ad038cb7487650c274 Fix compatibility with urwid 1.1 focus is a read only Widget property in urwid 1.1. Therefore it can't be used in Node to store the if the widget has the focus. Renamed focus to has_focus diff -r fcd0a8b09fcf -r bcc5951edaad getan/nodes.py --- a/getan/nodes.py Thu Apr 11 11:37:55 2013 +0200 +++ b/getan/nodes.py Thu Apr 11 11:41:01 2013 +0200 @@ -19,7 +19,7 @@ def __init__(self, item): self.selected = False - self.focus = False + self.has_focus = False self.item = item w = urwid.AttrMap(self.get_widget(), None) self.__super.__init__(w) @@ -31,7 +31,7 @@ return str(self.item) def update_w(self): - if self.focus: + if self.has_focus: if self.selected: self._w.set_focus_map({None: 'selected focus entry'}) self._w.set_attr_map({None: 'selected focus entry'}) @@ -65,7 +65,7 @@ return key def render(self, size, focus=False): - self.focus = focus + self.has_focus = focus self.update_w() return self._w.render(size, focus)