comparison frontends/src/primitivus/xmlui.py @ 607:c123dddaea6b

primitivus: fixed urwid issues with recent urwid versions fix bug 18
author Goffi <goffi@goffi.org>
date Sun, 24 Feb 2013 13:57:37 +0100
parents 952322b1d490
children 84a6e83157c2
comparison
equal deleted inserted replaced
606:21ddafccf32d 607:c123dddaea6b
39 if isinstance(pile, urwid.Text): 39 if isinstance(pile, urwid.Text):
40 self._w.widget_list[self.idx] = urwid.Pile([widget]) 40 self._w.widget_list[self.idx] = urwid.Pile([widget])
41 if self.idx == 1: 41 if self.idx == 1:
42 self._w.set_focus(1) 42 self._w.set_focus(1)
43 else: 43 else:
44 pile.widget_list.append(widget) 44 pile.contents.append((widget,('weight',getattr(self,'weight_'+str(self.idx)), False)))
45 pile.item_types.append(('weight',getattr(self,'weight_'+str(self.idx))))
46 self.idx = (self.idx + 1) % 2 45 self.idx = (self.idx + 1) % 2
47 46
48 class InvalidXMLUI(Exception): 47 class InvalidXMLUI(Exception):
49 pass 48 pass
50 49