Primitivus: contact list: new method UnselectAll
This commit is contained in:
parent
7e80cd7658
commit
489cbcfebf
1 changed files with 7 additions and 0 deletions
|
|
@ -117,6 +117,13 @@ class ContactList(urwid.WidgetWrap, QuickContactList):
|
||||||
self.__buildContact(content, self.groups[key][1])
|
self.__buildContact(content, self.groups[key][1])
|
||||||
return urwid.ListBox(content)
|
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):
|
def get_contact(self):
|
||||||
"""Return contact currently selected"""
|
"""Return contact currently selected"""
|
||||||
return self.selected
|
return self.selected
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue