Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evert Mouw
gajim-plugins
Commits
add87812
Commit
add87812
authored
13 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
don't hide otr plugin when potr is not available, just inform user when he wants to enable it.
parent
21e306b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gotr/manifest.ini
+1
-1
1 addition, 1 deletion
gotr/manifest.ini
gotr/otrmodule.py
+13
-3
13 additions, 3 deletions
gotr/otrmodule.py
with
14 additions
and
4 deletions
gotr/manifest.ini
+
1
−
1
View file @
add87812
[info]
name:
Off-The-Record
Encryption
short_name:
gotr
version:
1.
1
version:
1.
2
description:
See
http://www.cypherpunks.ca/otr/
authors:
Kjell
Braden
<afflux.gajim@pentabarf.de>
homepage:
http://gajim-otr.pentabarf.de
This diff is collapsed.
Click to expand it.
gotr/otrmodule.py
+
13
−
3
View file @
add87812
...
...
@@ -63,14 +63,17 @@ from common.connection_handlers_events import MessageOutgoingEvent
from
plugins
import
GajimPlugin
from
message_control
import
TYPE_CHAT
,
MessageControl
from
plugins.helpers
import
log_calls
,
log
from
plugins.plugin
import
GajimPluginException
import
ui
import
pickle
import
potr
if
not
hasattr
(
potr
,
'
VERSION
'
)
or
potr
.
VERSION
<
MINVERSION
:
raise
ImportError
(
'
old / unsupported python-otr version
'
)
HAS_POTR
=
True
try
:
import
potr
except
ImportError
:
HAS_POTR
=
False
class
GajimContext
(
potr
.
context
.
Context
):
__slots__
=
[
'
smpWindow
'
]
...
...
@@ -233,6 +236,13 @@ class OtrPlugin(GajimPlugin):
if
acc
not
in
self
.
config
or
None
not
in
self
.
config
[
acc
]:
self
.
config
[
acc
]
=
{
None
:
DEFAULTFLAGS
.
copy
()}
@log_calls
(
'
OtrPlugin
'
)
def
activate
(
self
):
if
not
HAS_POTR
:
raise
GajimPluginException
(
'
python-otr is missing!
'
)
if
not
hasattr
(
potr
,
'
VERSION
'
)
or
potr
.
VERSION
<
MINVERSION
:
raise
GajimPluginException
(
'
old / unsupported python-otr version
'
)
def
get_otr_status
(
self
,
account
,
contact
):
ctx
=
self
.
us
[
account
].
getContext
(
contact
.
get_full_jid
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment