Primitivus: wix: xmlui misc fixes

This commit is contained in:
Goffi 2010-07-28 19:56:56 +08:00
commit d1ec39d721
2 changed files with 4 additions and 2 deletions

View file

@ -37,6 +37,8 @@ class Pairs(urwid.WidgetWrap):
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 @@ class XMLUI(urwid.WidgetWrap):
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":

View file

@ -71,7 +71,7 @@ class XMLUI(wx.Frame):
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":