Mercurial > libervia-web
comparison src/browser/libervia_main.py @ 752:9b57d117e8c5
browser side: features are checked for microblogging and group blogging. If one of them is not available, a pop-up warns it, and it is not possible to write a new entry.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 23 Nov 2015 23:30:34 +0100 |
parents | 108bb9d74fa2 |
children | b392ea1514ee |
comparison
equal
deleted
inserted
replaced
751:2ddd85551612 | 752:9b57d117e8c5 |
---|---|
361 # during profile plugging, we prevent it before it's plugged | 361 # during profile plugging, we prevent it before it's plugged |
362 # and do all at once now | 362 # and do all at once now |
363 contact_list = self.contact_list | 363 contact_list = self.contact_list |
364 contact_list.update() | 364 contact_list.update() |
365 | 365 |
366 try: | |
367 self.mblog_available = C.bool(self.features['XEP-0277']['available']) | |
368 except KeyError: | |
369 self.mblog_available = False | |
370 | |
371 try: | |
372 self.groupblog_available = C.bool(self.features['GROUPBLOG']['available']) | |
373 except KeyError: | |
374 self.groupblog_available = False | |
366 | 375 |
367 blog_widget = self.displayWidget(blog.Blog, ()) | 376 blog_widget = self.displayWidget(blog.Blog, ()) |
368 self.setSelected(blog_widget) | 377 self.setSelected(blog_widget) |
378 | |
379 if self.mblog_available: | |
380 if not self.groupblog_available: | |
381 dialog.InfoDialog(_(u"Group blogging not available"), _(u"Your server can manage (micro)blogging, but not fine permissions.<br />You'll only be able to talk publicly.")).show() | |
382 | |
383 else: | |
384 dialog.InfoDialog(_(u"Blogging not available"), _(u"Your server can't handle (micro)blogging.<br />You'll be able to see your contacts (micro)blogs, but not to post yourself.")).show() | |
369 | 385 |
370 # we fill the panels already here | 386 # we fill the panels already here |
371 # for wid in self.widgets.getWidgets(blog.MicroblogPanel): | 387 # for wid in self.widgets.getWidgets(blog.MicroblogPanel): |
372 # if wid.accept_all(): | 388 # if wid.accept_all(): |
373 # self.bridge.getMassiveMblogs('ALL', (), None, profile=C.PROF_KEY_NONE, callback=wid.massiveInsert) | 389 # self.bridge.getMassiveMblogs('ALL', (), None, profile=C.PROF_KEY_NONE, callback=wid.massiveInsert) |