# HG changeset patch # User souliane # Date 1401730147 -7200 # Node ID d0cd8ae579f7b260eb0981634c7779382d386e03 # Parent 36f27d1e64b2f9d450e7bbbd6ec48ff3063dc9a6 browser side: message of type "headline" sent from the host are displayed in a InfoDialog diff -r 36f27d1e64b2 -r d0cd8ae579f7 src/browser/libervia_main.py --- a/src/browser/libervia_main.py Thu May 29 17:53:53 2014 +0200 +++ b/src/browser/libervia_main.py Mon Jun 02 19:29:07 2014 +0200 @@ -678,6 +678,14 @@ other = _to if _from.bare == self.whoami.bare else _from lib_wid = self.getLiberviaWidget(panels.ChatPanel, other, ignoreOtherTabs=False) self.displayNotification(_from, msg) + if msg_type == 'headline' and from_jid == self._defaultDomain: + try: + assert(extra['subject']) # subject is defined and not empty + title = extra['subject'] + except (KeyError, AssertionError): + title = _('Announcement from %s') % from_jid + dialog.InfoDialog(title, msg).show() + return if lib_wid is not None: lib_wid.printMessage(_from, msg, extra) else: