diff libervia.py @ 361:f4efffb9627c

browser_side: the popup notifying the message's recipient is no more dependent to the unibox.
author souliane <souliane@mailoo.org>
date Wed, 19 Feb 2014 14:17:03 +0100
parents f488692c4903
children 564208366dd6
line wrap: on
line diff
--- a/libervia.py	Tue Feb 18 00:15:43 2014 +0100
+++ b/libervia.py	Wed Feb 19 14:17:03 2014 +0100
@@ -857,6 +857,16 @@
                 extra.update({'address': '\n'.join([('%s:%s' % entry) for entry in addresses])})
                 self.bridge.call('sendMessage', (None, self.sendError), self.whoami.domain, text, '', type_, extra)
 
+    def showWarning(self, type_=None, msg=None):
+        """Display a popup information message, e.g. to notify the recipient of a message being composed.
+        If type_ is None, a popup being currently displayed will be hidden.
+        @type_: a type determining the CSS style to be applied (see WarningPopup.showWarning)
+        @msg: message to be displayed
+        """
+        if not hasattr(self, "warning_popup"):
+            self.warning_popup = panels.WarningPopup()
+        self.warning_popup.showWarning(type_, msg)
+
 
 if __name__ == '__main__':
     pyjd.setup("http://localhost:8080/libervia.html")