Mercurial > libervia-web
comparison src/browser/sat_browser/plugin_sec_otr.py @ 681:3b185ccb70b4
browser side: updated trigger import according to backend renaming (sat.tools.misc is now sat.tools.trigger)
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 19 Mar 2015 17:27:22 +0100 |
parents | 2e087e093e7f |
children | 9877607c719a |
comparison
equal
deleted
inserted
replaced
679:a90cc8fc9605 | 681:3b185ccb70b4 |
---|---|
26 from sat.core.log import getLogger | 26 from sat.core.log import getLogger |
27 log = getLogger(__name__) | 27 log = getLogger(__name__) |
28 | 28 |
29 from sat.core.i18n import _, D_ | 29 from sat.core.i18n import _, D_ |
30 from sat.core import exceptions | 30 from sat.core import exceptions |
31 from sat.tools.misc import TriggerManager | 31 from sat.tools import trigger |
32 | 32 |
33 from constants import Const as C | 33 from constants import Const as C |
34 from sat_frontends.tools import jid | 34 from sat_frontends.tools import jid |
35 import otrjs_wrapper as otr | 35 import otrjs_wrapper as otr |
36 import dialog | 36 import dialog |
386 def __init__(self, host): | 386 def __init__(self, host): |
387 log.info(_(u"OTR plugin initialization")) | 387 log.info(_(u"OTR plugin initialization")) |
388 self.host = host | 388 self.host = host |
389 self.context_manager = None | 389 self.context_manager = None |
390 self.host.bridge._registerMethods(["skipOTR"]) | 390 self.host.bridge._registerMethods(["skipOTR"]) |
391 self.host.trigger.add("newMessageTrigger", self.newMessageTg, priority=TriggerManager.MAX_PRIORITY) | 391 self.host.trigger.add("newMessageTrigger", self.newMessageTg, priority=trigger.TriggerManager.MAX_PRIORITY) |
392 self.host.trigger.add("sendMessageTrigger", self.sendMessageTg, priority=TriggerManager.MAX_PRIORITY) | 392 self.host.trigger.add("sendMessageTrigger", self.sendMessageTg, priority=trigger.TriggerManager.MAX_PRIORITY) |
393 | 393 |
394 # FIXME: workaround for a pyjamas issue: calling hash on a class method always return a different value if that method is defined directly within the class (with the "def" keyword) | 394 # FIXME: workaround for a pyjamas issue: calling hash on a class method always return a different value if that method is defined directly within the class (with the "def" keyword) |
395 self._profilePluggedListener = self.profilePluggedListener | 395 self._profilePluggedListener = self.profilePluggedListener |
396 self._gotMenusListener = self.gotMenusListener | 396 self._gotMenusListener = self.gotMenusListener |
397 # FIXME: these listeners are never removed, can't be removed by themselves (it modifies the list while looping), maybe need a 'one_shot' argument | 397 # FIXME: these listeners are never removed, can't be removed by themselves (it modifies the list while looping), maybe need a 'one_shot' argument |