Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Malte L
gajim-plugins
Commits
a7c7689c
Commit
a7c7689c
authored
Nov 09, 2018
by
Philipp Hörist
Browse files
[pgp] Show correct message encryption icon
parent
f9bea2d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
pgp/pgpplugin.py
View file @
a7c7689c
...
...
@@ -157,6 +157,7 @@ class OldPGPPlugin(GajimPlugin):
key_id
=
app
.
config
.
get_per
(
'accounts'
,
account
,
'keyid'
)
if
key_id
:
obj
.
encrypted
=
self
.
encryption_name
self
.
add_additional_data
(
obj
.
additional_data
)
self
.
decrypt_queue
.
put
([
encmsg
,
key_id
,
obj
,
conn
,
callback
])
if
not
self
.
thread
:
self
.
thread
=
threading
.
Thread
(
target
=
self
.
worker
)
...
...
@@ -255,6 +256,7 @@ class OldPGPPlugin(GajimPlugin):
# Set xhtml to None so it doesnt get logged
obj
.
xhtml
=
None
obj
.
encrypted
=
self
.
encryption_name
self
.
add_additional_data
(
obj
.
additional_data
)
print_msg_to_log
(
obj
.
msg_iq
)
callback
(
obj
)
...
...
@@ -282,7 +284,7 @@ class OldPGPPlugin(GajimPlugin):
return
GLib
.
idle_add
(
callback
,
file
)
@
staticmethod
@
staticmethod
def
_on_file_encryption_error
(
file
,
error
):
dialogs
.
ErrorDialog
(
_
(
'Error'
),
error
,
transient_for
=
file
.
control
.
parent_win
.
window
)
...
...
@@ -301,6 +303,9 @@ class OldPGPPlugin(GajimPlugin):
stanza
.
addChild
(
node
=
node
)
obj
.
msg_iq
=
stanza
def
add_additional_data
(
self
,
data
):
data
[
'encrypted'
]
=
{
'name'
:
self
.
encryption_name
}
def
print_msg_to_log
(
stanza
):
""" Prints a stanza in a fancy way to the log """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment