# HG changeset patch # User souliane # Date 1436787181 -7200 # Node ID 052d1d19016d690634807e7f4e1a9de0f309a3c4 # Parent df8cb7bedfbf0c5c399c337733c6e42d1abd2644 browser_side: remove methods that were used before the merge, when Libervia was not based on quick_frontend diff -r df8cb7bedfbf -r 052d1d19016d src/browser/libervia_main.py --- a/src/browser/libervia_main.py Mon Jul 13 12:44:04 2015 +0200 +++ b/src/browser/libervia_main.py Mon Jul 13 13:33:01 2015 +0200 @@ -460,16 +460,6 @@ data = {} self.bridge.launchAction(callback_id, data, profile=profile, callback=self._actionCb, errback=self._actionEb) - def _getContactsCB(self, contacts_data): - for contact_ in contacts_data: - jid, attributes, groups = contact_ - self._newContactCb(jid, attributes, groups) - - def _getParamsUICB(self, xml_ui): - """Hide the parameters item if there's nothing to display""" - if not xml_ui: - self.panel.menu.removeItemParams() - def _ownBlogsFills(self, mblogs, mblog_panel=None): """Put our own microblogs in cache, then fill the panels with them. @@ -584,6 +574,7 @@ mblog_panel.addEntryIfAccepted(self.whoami.bare, *cache_entry) def getEntityMBlog(self, entity): + # FIXME: call this after a contact has been added to roster log.info(u"geting mblog for entity [%s]" % (entity,)) for lib_wid in self.libervia_widgets: if isinstance(lib_wid, blog.MicroblogPanel): @@ -639,52 +630,6 @@ self.setSelected(wid) return wid - def _getPresenceStatusesCb(self, presence_data): - for entity in presence_data: - for resource in presence_data[entity]: - args = presence_data[entity][resource] - full = ('%s/%s' % (jid.JID(entity).bare, resource)) if resource else entity - self._presenceUpdateCb(full, *args) - - def _getRoomsJoinedCb(self, room_data): - for room in room_data: - self._roomJoinedCb(*room) - - def _getWaitingSubCb(self, waiting_sub): - for sub in waiting_sub: - self._subscribeCb(waiting_sub[sub], sub) - - def _subscribeCb(self, sub_type, entity): - if sub_type == 'subscribed': - dialog.InfoDialog('Subscription confirmation', 'The contact %s has added you to his/her contact list' % html_tools.html_sanitize(entity)).show() - self.getEntityMBlog(entity) - - elif sub_type == 'unsubscribed': - dialog.InfoDialog('Subscription refusal', 'The contact %s has refused to add you in his/her contact list' % html_tools.html_sanitize(entity)).show() - #TODO: remove microblogs from panels - - elif sub_type == 'subscribe': - #The user want to subscribe to our presence - _dialog = None - msg = HTML('The contact %s want to add you in his/her contact list, do you accept ?' % html_tools.html_sanitize(entity)) - - def ok_cb(ignore): - self.bridge.call('subscription', None, "subscribed", entity) - self.bridge.updateContact(entity, '', _dialog.getSelectedGroups()) - - def cancel_cb(ignore): - self.bridge.call('subscription', None, "unsubscribed", entity, '', '') - - _dialog = dialog.GroupSelector([msg], self.contact_panel.getGroups(), [], "Add", ok_cb, cancel_cb) - _dialog.setHTML('Add contact request') - _dialog.show() - - def _contactDeletedCb(self, entity): - self.contact_panel.removeContactBox(entity) - - def _newContactCb(self, contact_jid, attributes, groups): - self.contact_panel.updateContact(contact_jid, attributes, groups) - def askConfirmationHandler(self, confirmation_id, confirmation_type, data): answer_data = {}