Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_app.py @ 2128:aa94f33fd2ad
plugin otr: various improvments:
- messageSend trigger now use pre_xml_treatments so it doesn't block other triggers of higher priority
- text commands now use a very high priority, as it is local command and should not be blocked in most of cases
- new otrState signal, to send state change to frontends
- history is not skipped anymore, a future option may change this behaviour
- OTR trigger are skipped on groupchat messages
- context_manager is now in client instead of being global to plugin
- removed fixPotr as it is fixed upstream
note triggers should be improved for encryption methods, as skipping an encrypter may break security, but putting it in top priority may break nice features.
fix bug 170
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 01 Feb 2017 21:44:24 +0100 |
parents | 2f264f3df280 |
children | 4e67d6ffea66 |
comparison
equal
deleted
inserted
replaced
2127:8717e9cc95c0 | 2128:aa94f33fd2ad |
---|---|
321 @param function_name (str): name of the signal to handle | 321 @param function_name (str): name of the signal to handle |
322 @param handler (instancemethod): method to call when the signal arrive, None for calling an automatically named handler (function_name + 'Handler') | 322 @param handler (instancemethod): method to call when the signal arrive, None for calling an automatically named handler (function_name + 'Handler') |
323 @param iface (str): interface of the bridge to use ('core' or 'plugin') | 323 @param iface (str): interface of the bridge to use ('core' or 'plugin') |
324 @param with_profile (boolean): True if the signal concerns a specific profile, in that case the profile name has to be passed by the caller | 324 @param with_profile (boolean): True if the signal concerns a specific profile, in that case the profile name has to be passed by the caller |
325 """ | 325 """ |
326 log.debug(u"registering signal {name}".format(name = function_name)) | |
326 if handler is None: | 327 if handler is None: |
327 handler = getattr(self, "{}{}".format(function_name, 'Handler')) | 328 handler = getattr(self, "{}{}".format(function_name, 'Handler')) |
328 if not with_profile: | 329 if not with_profile: |
329 self.bridge.register_signal(function_name, handler, iface) | 330 self.bridge.register_signal(function_name, handler, iface) |
330 return | 331 return |
491 self.profiles.clear() | 492 self.profiles.clear() |
492 | 493 |
493 def newWidget(self, widget): | 494 def newWidget(self, widget): |
494 raise NotImplementedError | 495 raise NotImplementedError |
495 | 496 |
497 # bridge signals hanlers | |
498 | |
496 def connectedHandler(self, profile, jid_s): | 499 def connectedHandler(self, profile, jid_s): |
497 """Called when the connection is made. | 500 """Called when the connection is made. |
498 | 501 |
499 @param jid_s (unicode): the JID that we were assigned by the server, | 502 @param jid_s (unicode): the JID that we were assigned by the server, |
500 as the resource might differ from the JID we asked for. | 503 as the resource might differ from the JID we asked for. |