# HG changeset patch # User Goffi # Date 1281352183 -28800 # Node ID 5d7a011d78ba0cf397759b7ff39cea04c8bda7fb # Parent f582fddd0cc03c5da94d7eb0d94b4bb4d4523a07 Primitivus: contact list: new method UnselectAll diff -r f582fddd0cc0 -r 5d7a011d78ba frontends/primitivus/contact_list.py --- a/frontends/primitivus/contact_list.py Mon Aug 09 19:09:13 2010 +0800 +++ b/frontends/primitivus/contact_list.py Mon Aug 09 19:09:43 2010 +0800 @@ -117,6 +117,13 @@ 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