# HG changeset patch # User Goffi # Date 1277981571 -28800 # Node ID 07b7dcd314ff566a230b8e2809a2c857df40bfdf # Parent a5c9603dac379dca0fd29c2ef06d1fdbba727185 primitivus: basic contact list, connexion now work \o/ diff -r a5c9603dac37 -r 07b7dcd314ff frontends/primitivus/custom_widgets.py --- a/frontends/primitivus/custom_widgets.py Thu Jul 01 18:18:34 2010 +0800 +++ b/frontends/primitivus/custom_widgets.py Thu Jul 01 18:52:51 2010 +0800 @@ -113,6 +113,13 @@ widget.setState(False, invisible) widget._invalidate() + def deleteValue(self, value): + """Delete the first value equal to the param given""" + try: + self.content.remove(value) + except ValueError: + pass + def getValue(self): """Convenience method to get the value selected as a string in single mode, or None""" values = self.getValues() @@ -126,6 +133,7 @@ return result def changeValues(self, new_values): + """Change all value in one shot""" widgets = [SelectableText(option, self.align) for option in new_values] for widget in widgets: urwid.connect_signal(widget, 'change', self.__onStateChange)