comparison frontends/src/quick_frontend/quick_app.py @ 1436:e27963c9c219

quick_frontend: add a couple of TODOs
author souliane <souliane@mailoo.org>
date Mon, 13 Jul 2015 13:33:54 +0200
parents 7590bbf44eed
children 6ce18c4e5708
comparison
equal deleted inserted replaced
1435:7590bbf44eed 1436:e27963c9c219
620 def subscribeHandler(self, type, raw_jid, profile): 620 def subscribeHandler(self, type, raw_jid, profile):
621 """Called when a subsciption management signal is received""" 621 """Called when a subsciption management signal is received"""
622 entity = jid.JID(raw_jid) 622 entity = jid.JID(raw_jid)
623 if type == "subscribed": 623 if type == "subscribed":
624 # this is a subscription confirmation, we just have to inform user 624 # this is a subscription confirmation, we just have to inform user
625 # TODO: call self.getEntityMBlog to add the new contact blogs
625 self.showDialog(_("The contact %s has accepted your subscription") % entity.bare, _('Subscription confirmation')) 626 self.showDialog(_("The contact %s has accepted your subscription") % entity.bare, _('Subscription confirmation'))
626 elif type == "unsubscribed": 627 elif type == "unsubscribed":
627 # this is a subscription refusal, we just have to inform user 628 # this is a subscription refusal, we just have to inform user
628 self.showDialog(_("The contact %s has refused your subscription") % entity.bare, _('Subscription refusal'), 'error') 629 self.showDialog(_("The contact %s has refused your subscription") % entity.bare, _('Subscription refusal'), 'error')
629 elif type == "subscribe": 630 elif type == "subscribe":
630 # this is a subscriptionn request, we have to ask for user confirmation 631 # this is a subscriptionn request, we have to ask for user confirmation
632 # TODO: use sat.stdui.ui_contact_list to display the groups selector
631 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)) 633 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))
632 634
633 def showDialog(self, message, title, type="info", answer_cb=None, answer_data=None): 635 def showDialog(self, message, title, type="info", answer_cb=None, answer_data=None):
634 raise NotImplementedError 636 raise NotImplementedError
635 637