comparison browser_side/panels.py @ 242:a25aa882e09a

browser_side: add context menu for contact: - for now only when a blog exists on the current libervia's server - retrieve the server domain with the bridge method getNewAccountDomain - getNewAccountDomain is also used to display the current libervia domain in the dialogs (new contact default domain, messages for invalid contact or group)
author souliane <souliane@mailoo.org>
date Fri, 18 Oct 2013 11:14:55 +0200
parents 86055ccf69c3
children d7c41c84d062
comparison
equal deleted inserted replaced
241:86055ccf69c3 242:a25aa882e09a
453 453
454 def massiveInsert(self, mblogs): 454 def massiveInsert(self, mblogs):
455 """Insert several microblogs at once 455 """Insert several microblogs at once
456 @param mblogs: dictionary of microblogs, as the result of getMassiveLastGroupBlogs 456 @param mblogs: dictionary of microblogs, as the result of getMassiveLastGroupBlogs
457 """ 457 """
458 print "Massive insertion of microblogs" 458 print "Massive insertion of %d microblogs" % len(mblogs)
459 for publisher in mblogs: 459 for publisher in mblogs:
460 print "adding blogs for [%s]" % publisher 460 print "adding blogs for [%s]" % publisher
461 for mblog in mblogs[publisher]: 461 for mblog in mblogs[publisher]:
462 if not "content" in mblog: 462 if not "content" in mblog:
463 print ("WARNING: No content found in microblog [%s]", mblog) 463 print ("WARNING: No content found in microblog [%s]", mblog)
999 item = Button(title, button_cb) 999 item = Button(title, button_cb)
1000 item.key = _key 1000 item.key = _key
1001 item.setStyleName(self.item_style) 1001 item.setStyleName(self.item_style)
1002 item.setTitle(entry["desc"] if "desc" in entry.keys() else title) 1002 item.setTitle(entry["desc"] if "desc" in entry.keys() else title)
1003 menu.add(item) 1003 menu.add(item)
1004 if len(menu.getChildren()) == 0:
1005 return
1004 self.add(menu) 1006 self.add(menu)
1005 if self.vertical is True: 1007 if self.vertical is True:
1006 x = sender.getAbsoluteLeft() + sender.getOffsetWidth() 1008 x = sender.getAbsoluteLeft() + sender.getOffsetWidth()
1007 y = sender.getAbsoluteTop() 1009 y = sender.getAbsoluteTop()
1008 else: 1010 else: