comparison 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
comparison
equal deleted inserted replaced
213:8bbac49765d6 214:7b26be266ab1
204 else: #we send the message to the selected target 204 else: #we send the message to the selected target
205 self._selected_cache.onTextEntered(_txt) 205 self._selected_cache.onTextEntered(_txt)
206 self.setText('') 206 self.setText('')
207 self._timeCb(None) #we remove the popup 207 self._timeCb(None) #we remove the popup
208 sender.cancelKey() 208 sender.cancelKey()
209 else:
210 self.__onComposing()
211
212 def __onComposing(self):
213 """Callback when the user is composing a text."""
214 if hasattr(self._selected_cache, "target"):
215 target_s = str(self._selected_cache.target)
216 self.host.bridge.call('chatStateComposing', None, target_s)
209 217
210 def onMouseUp(self, sender, x, y): 218 def onMouseUp(self, sender, x, y):
211 size = (self.getOffsetWidth(), self.getOffsetHeight()) 219 size = (self.getOffsetWidth(), self.getOffsetHeight())
212 if size != self.__size: 220 if size != self.__size:
213 self.__size = size 221 self.__size = size