Mercurial > libervia-web
changeset 711:052d1d19016d
browser_side: remove methods that were used before the merge, when Libervia was not based on quick_frontend
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 13 Jul 2015 13:33:01 +0200 |
parents | df8cb7bedfbf |
children | bf562fb9c273 |
files | src/browser/libervia_main.py |
diffstat | 1 files changed, 1 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- 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 <b>%s</b> 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 <b>%s</b> 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 <b>%s</b> 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('<b>Add contact request</b>') - _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 = {}