Primitivus: contact list: new method UnselectAll

This commit is contained in:
Goffi 2010-08-09 19:09:43 +08:00
commit 489cbcfebf

View file

@ -117,6 +117,13 @@ class ContactList(urwid.WidgetWrap, QuickContactList):
self.__buildContact(content, self.groups[key][1])
return urwid.ListBox(content)
def unselectAll(self):
"""Unselect all contacts"""
for widget in self.frame.body.body:
if widget.__class__ == custom_widgets.SelectableText:
widget.setState(False, invisible=True)
def get_contact(self):
"""Return contact currently selected"""
return self.selected