Mercurial > urwid-satext
changeset 3:6290022ae74d
misc fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 03 Jul 2010 12:01:01 +0800 |
parents | 07b7dcd314ff |
children | c94cdbfdf3e8 |
files | frontends/primitivus/custom_widgets.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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):