# HG changeset patch # User Goffi # Date 1278129661 -28800 # Node ID 6290022ae74d43aed3e35a7361bd9c4c6ae5264f # Parent 07b7dcd314ff566a230b8e2809a2c857df40bfdf misc fixes diff -r 07b7dcd314ff -r 6290022ae74d frontends/primitivus/custom_widgets.py --- 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):