Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_app.py @ 943:71926ec2114d
core (memory): entities cache improvments:
- entities cache is no more limited to bare jid
- resources are now automatically updated in bare jid cache
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Mar 2014 18:07:17 +0100 |
parents | a9401694d2dc |
children | cad958239b5c |
comparison
equal
deleted
inserted
replaced
942:598fc223cf59 | 943:71926ec2114d |
---|---|
169 | 169 |
170 ### now we fill the contact list ### | 170 ### now we fill the contact list ### |
171 for contact in self.bridge.getContacts(profile): | 171 for contact in self.bridge.getContacts(profile): |
172 self.newContact(*contact, profile=profile) | 172 self.newContact(*contact, profile=profile) |
173 | 173 |
174 presences = self.bridge.getPresenceStatus(profile) | 174 presences = self.bridge.getPresenceStatuses(profile) |
175 for contact in presences: | 175 for contact in presences: |
176 for res in presences[contact]: | 176 for res in presences[contact]: |
177 jabber_id = contact + ('/' + res if res else '') | 177 jabber_id = contact + ('/' + res if res else '') |
178 show = presences[contact][res][0] | 178 show = presences[contact][res][0] |
179 priority = presences[contact][res][1] | 179 priority = presences[contact][res][1] |
558 elif type == "unsubscribed": | 558 elif type == "unsubscribed": |
559 # this is a subscription refusal, we just have to inform user | 559 # this is a subscription refusal, we just have to inform user |
560 self.showDialog(_("The contact %s has refused your subscription") % entity.bare, _('Subscription refusal'), 'error') | 560 self.showDialog(_("The contact %s has refused your subscription") % entity.bare, _('Subscription refusal'), 'error') |
561 elif type == "subscribe": | 561 elif type == "subscribe": |
562 # this is a subscriptionn request, we have to ask for user confirmation | 562 # this is a subscriptionn request, we have to ask for user confirmation |
563 answer = self.showDialog(_("The contact %s wants to subscribe to your presence.\nDo you accept ?") % entity.bare, _('Subscription confirmation'), 'yes/no', answer_cb=self._subscribe_cb, answer_data=(entity, profile)) | 563 self.showDialog(_("The contact %s wants to subscribe to your presence.\nDo you accept ?") % entity.bare, _('Subscription confirmation'), 'yes/no', answer_cb=self._subscribe_cb, answer_data=(entity, profile)) |
564 | 564 |
565 def showDialog(self, message, title, type="info", answer_cb=None): | 565 def showDialog(self, message, title, type="info", answer_cb=None): |
566 raise NotImplementedError | 566 raise NotImplementedError |
567 | 567 |
568 def showAlert(self, message): | 568 def showAlert(self, message): |