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
gajim
gajim-plugins
Commits
2db6d03f
Verified
Commit
2db6d03f
authored
Mar 16, 2019
by
Malte L
Browse files
[omemo] Fix fingerprint window for qrcode v. < 6.0
parent
f660fbf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
omemo/gtk/key.py
View file @
2db6d03f
...
...
@@ -23,6 +23,9 @@ import tempfile
from
gi.repository
import
Gtk
from
gi.repository
import
GdkPixbuf
from
pkg_resources
import
get_distribution
from
distutils.version
import
LooseVersion
as
V
from
gajim.common
import
app
from
gajim.plugins.plugins_i18n
import
_
from
gajim.plugins.helpers
import
get_builder
...
...
@@ -176,10 +179,18 @@ class KeyDialog(Gtk.Dialog):
qr
.
make
(
fit
=
True
)
qr
.
make
()
fill_color
=
'black'
back_color
=
'transparent'
if
app
.
css_config
.
prefer_dark
:
back_color
=
'white'
img
=
qr
.
make_image
(
fill_color
=
'black'
,
back_color
=
back_color
)
if
V
(
get_distribution
(
'qrcode'
).
version
)
<
V
(
'6.0'
):
# meaning of fill_color and back_color were switched
# before this commit in qrcode between versions 5.3
# and 6.0: https://github.com/lincolnloop/python-qrcode/
# commit/01f440d64b7d1f61bb75161ce118b86eca85b15c
back_color
,
fill_color
=
fill_color
,
back_color
img
=
qr
.
make_image
(
fill_color
=
fill_color
,
back_color
=
back_color
)
img
.
save
(
path
)
return
path
...
...
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