changeset 2:07b7dcd314ff

primitivus: basic contact list, connexion now work \o/
author Goffi <goffi@goffi.org>
date Thu, 01 Jul 2010 18:52:51 +0800 (2010-07-01)
parents a5c9603dac37
children 6290022ae74d
files frontends/primitivus/custom_widgets.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)