plugin OTR: disabled menu as the new generic encryption menu allows to start/stop OTR or display the trust UI.

This commit is contained in:
Goffi 2019-02-24 14:12:06 +01:00
commit f40b43dca5

View file

@ -325,33 +325,35 @@ class OTR(object):
host.bridge.addSignal( host.bridge.addSignal(
"otrState", ".plugin", signature="sss" "otrState", ".plugin", signature="sss"
) # args: state, destinee_jid, profile ) # args: state, destinee_jid, profile
host.importMenu( # XXX: menus are disabled in favor to the new more generic encryption menu
(OTR_MENU, D_(u"Start/Refresh")), # there are let here commented for a little while as a reference
self._otrStartRefresh, # host.importMenu(
security_limit=0, # (OTR_MENU, D_(u"Start/Refresh")),
help_string=D_(u"Start or refresh an OTR session"), # self._otrStartRefresh,
type_=C.MENU_SINGLE, # security_limit=0,
) # help_string=D_(u"Start or refresh an OTR session"),
host.importMenu( # type_=C.MENU_SINGLE,
(OTR_MENU, D_(u"End session")), # )
self._otrSessionEnd, # host.importMenu(
security_limit=0, # (OTR_MENU, D_(u"End session")),
help_string=D_(u"Finish an OTR session"), # self._otrSessionEnd,
type_=C.MENU_SINGLE, # security_limit=0,
) # help_string=D_(u"Finish an OTR session"),
host.importMenu( # type_=C.MENU_SINGLE,
(OTR_MENU, D_(u"Authenticate")), # )
self._otrAuthenticate, # host.importMenu(
security_limit=0, # (OTR_MENU, D_(u"Authenticate")),
help_string=D_(u"Authenticate user/see your fingerprint"), # self._otrAuthenticate,
type_=C.MENU_SINGLE, # security_limit=0,
) # help_string=D_(u"Authenticate user/see your fingerprint"),
host.importMenu( # type_=C.MENU_SINGLE,
(OTR_MENU, D_(u"Drop private key")), # )
self._dropPrivKey, # host.importMenu(
security_limit=0, # (OTR_MENU, D_(u"Drop private key")),
type_=C.MENU_SINGLE, # self._dropPrivKey,
) # security_limit=0,
# type_=C.MENU_SINGLE,
# )
host.trigger.add("presenceReceived", self._presenceReceivedTrigger) host.trigger.add("presenceReceived", self._presenceReceivedTrigger)
self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR, directed=True) self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR, directed=True)