comparison frontends/src/quick_frontend/quick_contact_list.py @ 1462:c74015dc2785

quick_frontend: minor fixes
author Goffi <goffi@goffi.org>
date Sun, 16 Aug 2015 01:01:34 +0200
parents 6ce18c4e5708
children 6a6fe840c3a6
comparison
equal deleted inserted replaced
1461:9fce331ba0fd 1462:c74015dc2785
132 continue 132 continue
133 for entity in data['jids']: 133 for entity in data['jids']:
134 result.setdefault(entity, set()).add(group) 134 result.setdefault(entity, set()).add(group)
135 return result 135 return result
136 136
137 def _gotContacts(self, contacts):
138 for contact in contacts:
139 self.host.newContactHandler(*contact, profile=self.profile)
140
137 def fill(self): 141 def fill(self):
138 """Get all contacts from backend, and fill the widget 142 """Get all contacts from backend, and fill the widget
139 143
140 Contacts will be cleared before refilling them 144 Contacts will be cleared before refilling them
141 """ 145 """
142 self.clearContacts(keep_cache=True) 146 self.clearContacts(keep_cache=True)
143 def gotContacts(contacts): 147
144 for contact in contacts: 148 self.host.bridge.getContacts(self.profile, callback=self._gotContacts)
145 self.host.newContactHandler(*contact, profile=self.profile)
146
147 self.host.bridge.getContacts(self.profile, callback=gotContacts)
148 149
149 def update(self): 150 def update(self):
150 """Update the display when something changed""" 151 """Update the display when something changed"""
151 raise NotImplementedError 152 raise NotImplementedError
152 153