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