comparison frontends/src/quick_frontend/quick_contact_list.py @ 1000:6f1e03068b5f

primitivus: fixes contact group update
author souliane <souliane@mailoo.org>
date Sun, 27 Apr 2014 18:22:12 +0200
parents 1fe00f0c9a91
children d1084f7e56a5
comparison
equal deleted inserted replaced
999:c37a24922f27 1000:6f1e03068b5f
52 def clearContacts(self): 52 def clearContacts(self):
53 """Clear all the contact list""" 53 """Clear all the contact list"""
54 self.specials.clear() 54 self.specials.clear()
55 55
56 def replace(self, jid, groups=None, attributes=None): 56 def replace(self, jid, groups=None, attributes=None):
57 """add a contact to the list if doesn't exist, else update it""" 57 """Add a contact to the list if doesn't exist, else update it.
58
59 @param jid (JID)
60 @param groups (list): list of groups or None to ignore the groups membership.
61 @param attributes (dict)
62
63 XXX: None value for 'groups' has a different meaning than [None] which is for the default group.
64 """
58 if attributes and 'name' in attributes: 65 if attributes and 'name' in attributes:
59 self.setCache(jid, 'name', attributes['name']) 66 self.setCache(jid, 'name', attributes['name'])
60 67
61 def remove(self, jid): 68 def remove(self, jid):
62 """remove a contact from the list""" 69 """remove a contact from the list"""