Mercurial > libervia-backend
diff frontends/primitivus/custom_widgets.py @ 117:1f0fd6f03e2b
misc fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 03 Jul 2010 12:01:01 +0800 |
parents | 7c482ecac0ff |
children | 76055a209ed9 |
line wrap: on
line diff
--- a/frontends/primitivus/custom_widgets.py Thu Jul 01 18:52:51 2010 +0800 +++ b/frontends/primitivus/custom_widgets.py Sat Jul 03 12:01:01 2010 +0800 @@ -118,7 +118,7 @@ try: self.content.remove(value) except ValueError: - pass + raise ValuError("%s ==> %s" % (str(value),str(self.content))) def getValue(self): """Convenience method to get the value selected as a string in single mode, or None""" @@ -140,7 +140,7 @@ self.content[:] = widgets if self.single and new_values: self.content[0].setState(True) - display_widget = urwid.BoxAdapter(self.list_box, min(len(new_values),5)) + display_widget = urwid.BoxAdapter(self.list_box, min(len(new_values),5) or 1) urwid.WidgetWrap.__init__(self, display_widget) def selectValue(self, value):