comparison frontends/primitivus/contact_list.py @ 128:2240f34f6452

Primitivus: misc fixes + menubar first draft - Menu bar: first draft of class - Password widget fixed - change some str to unicode, notably for JID
author Goffi <goffi@goffi.org>
date Tue, 13 Jul 2010 02:24:59 +0800
parents 8d611eb9ae48
children f197b52796ee
comparison
equal deleted inserted replaced
127:55d3ef84f01f 128:2240f34f6452
148 148
149 def disconnect(self, jid): 149 def disconnect(self, jid):
150 """mark a contact disconnected""" 150 """mark a contact disconnected"""
151 self.remove(jid.short) 151 self.remove(jid.short)
152 152
153 def remove(self, jid): 153 def remove(self, param_jid):
154 """remove a contact from the list""" 154 """remove a contact from the list"""
155 groups_to_remove = [] 155 groups_to_remove = []
156 jid = JID(param_jid)
156 for group in self.groups: 157 for group in self.groups:
157 contacts = self.groups[group][1] 158 contacts = self.groups[group][1]
158 if jid.short in contacts: 159 if jid.short in contacts:
159 contacts.remove(jid.short) 160 contacts.remove(jid.short)
160 if not len(contacts): 161 if not len(contacts):