primitivus: basic contact list, connexion now work \o/
This commit is contained in:
parent
1fb4156381
commit
9caff8237a
1 changed files with 79 additions and 0 deletions
|
|
@ -113,6 +113,13 @@ class List(urwid.WidgetWrap):
|
|||
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 @@ class List(urwid.WidgetWrap):
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue