diff browser_side/panels.py @ 214:7b26be266ab1

plugin XEP-0085: Chat State Notifications TODO: check for security limit in core/memory while setting a parameter
author souliane <souliane@mailoo.org>
date Fri, 06 Sep 2013 16:23:30 +0200
parents 8bbac49765d6
children f7ec248192de
line wrap: on
line diff
--- a/browser_side/panels.py	Fri Sep 06 16:07:35 2013 +0200
+++ b/browser_side/panels.py	Fri Sep 06 16:23:30 2013 +0200
@@ -206,6 +206,14 @@
             self.setText('')
             self._timeCb(None) #we remove the popup
             sender.cancelKey()
+        else:
+            self.__onComposing()
+
+    def __onComposing(self):
+        """Callback when the user is composing a text."""
+        if hasattr(self._selected_cache, "target"):
+            target_s = str(self._selected_cache.target)
+            self.host.bridge.call('chatStateComposing', None, target_s)
 
     def onMouseUp(self, sender, x, y):
         size = (self.getOffsetWidth(), self.getOffsetHeight())