Mercurial > libervia-backend
diff frontends/primitivus/custom_widgets.py @ 116:7c482ecac0ff
primitivus: basic contact list, connexion now work \o/
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 01 Jul 2010 18:52:51 +0800 |
parents | 77f48939ad6e |
children | 1f0fd6f03e2b |
line wrap: on
line diff
--- a/frontends/primitivus/custom_widgets.py Thu Jul 01 18:19:20 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)