Mercurial > libervia-backend
changeset 149:3c3f70c01333
Primitivus: wix: xmlui misc fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 28 Jul 2010 19:56:56 +0800 |
parents | 1d74c59a36a9 |
children | 63d20bda5754 |
files | frontends/primitivus/xmlui.py frontends/wix/xmlui.py |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/primitivus/xmlui.py Wed Jul 28 19:56:12 2010 +0800 +++ b/frontends/primitivus/xmlui.py Wed Jul 28 19:56:56 2010 +0800 @@ -37,6 +37,8 @@ pile = self._w.widget_list[self.idx] if pile.__class__ == urwid.Text: self._w.widget_list[self.idx] = urwid.Pile([widget]) + if self.idx == 1: + self._w.set_focus(1) else: pile.widget_list.append(widget) pile.item_types.append(('weight',getattr(self,'weight_'+str(self.idx)))) @@ -70,7 +72,7 @@ elif type=="text": try: value = elem.childNodes[0].wholeText - except KeyError: + except IndexError: warning (_("text node has no child !")) ctrl = urwid.Text(value) elif type=="label":
--- a/frontends/wix/xmlui.py Wed Jul 28 19:56:12 2010 +0800 +++ b/frontends/wix/xmlui.py Wed Jul 28 19:56:56 2010 +0800 @@ -71,7 +71,7 @@ elif type=="text": try: value = elem.childNodes[0].wholeText - except KeyError: + except IndexError: warning (_("text node has no child !")) ctrl = wx.StaticText(parent, -1, value) elif type=="label":