comparison src/browser/libervia_main.py @ 651:2df91d0308ac frontends_multi_profiles

browser_side, server_side: MicroblogPanel.onGroupDrop and bridge method getMassiveLastMBlogs now only accepts the publishers as a set of unicode (no more None value or single unicode).
author souliane <souliane@mailoo.org>
date Fri, 27 Feb 2015 01:08:36 +0100
parents 6d3142b782c3
children 40c72f3b7638
comparison
equal deleted inserted replaced
650:7e3cdc39c3e7 651:2df91d0308ac
346 def profilePlugged(self, dummy): 346 def profilePlugged(self, dummy):
347 QuickApp.profilePlugged(self, dummy) 347 QuickApp.profilePlugged(self, dummy)
348 # we fill the panels already here 348 # we fill the panels already here
349 for wid in self.widgets.getWidgets(blog.MicroblogPanel): 349 for wid in self.widgets.getWidgets(blog.MicroblogPanel):
350 if wid.accept_all(): 350 if wid.accept_all():
351 self.bridge.getMassiveLastMblogs('ALL', [], 10, profile=C.PROF_KEY_NONE, callback=wid.massiveInsert) 351 self.bridge.getMassiveLastMblogs('ALL', (), 10, profile=C.PROF_KEY_NONE, callback=wid.massiveInsert)
352 else: 352 else:
353 self.bridge.getMassiveLastMblogs('GROUP', wid.accepted_groups, 10, profile=C.PROF_KEY_NONE, callback=wid.massiveInsert) 353 self.bridge.getMassiveLastMblogs('GROUP', wid.accepted_groups, 10, profile=C.PROF_KEY_NONE, callback=wid.massiveInsert)
354 354
355 #we ask for our own microblogs: 355 #we ask for our own microblogs:
356 self.bridge.getMassiveLastMblogs('JID', [unicode(self.whoami.bare)], 10, profile=C.PROF_KEY_NONE, callback=self._ownBlogsFills) 356 self.bridge.getMassiveLastMblogs('JID', (unicode(self.whoami.bare),), 10, profile=C.PROF_KEY_NONE, callback=self._ownBlogsFills)
357 357
358 # initialize plugins which waited for the connection to be done 358 # initialize plugins which waited for the connection to be done
359 for plugin in self.plugins.values(): 359 for plugin in self.plugins.values():
360 if hasattr(plugin, 'profileConnected'): 360 if hasattr(plugin, 'profileConnected'):
361 plugin.profileConnected() 361 plugin.profileConnected()
560 def getEntityMBlog(self, entity): 560 def getEntityMBlog(self, entity):
561 log.info("geting mblog for entity [%s]" % (entity,)) 561 log.info("geting mblog for entity [%s]" % (entity,))
562 for lib_wid in self.libervia_widgets: 562 for lib_wid in self.libervia_widgets:
563 if isinstance(lib_wid, blog.MicroblogPanel): 563 if isinstance(lib_wid, blog.MicroblogPanel):
564 if lib_wid.isJidAccepted(entity): 564 if lib_wid.isJidAccepted(entity):
565 self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'JID', [entity], 10) 565 self.bridge.call('getMassiveLastMblogs', lib_wid.massiveInsert, 'JID', (entity,), 10)
566 566
567 # def getLiberviaWidget(self, class_, entity, ignoreOtherTabs=True): 567 # def getLiberviaWidget(self, class_, entity, ignoreOtherTabs=True):
568 # """Get the corresponding panel if it exists. 568 # """Get the corresponding panel if it exists.
569 # @param class_ (class): class of the panel (ChatPanel, MicroblogPanel...) 569 # @param class_ (class): class of the panel (ChatPanel, MicroblogPanel...)
570 # @param entity (dict): dictionnary to define the entity. 570 # @param entity (dict): dictionnary to define the entity.