From ea45e2fc58ab2f6faff087c682967e7aa5c7e9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Fri, 23 Mar 2018 21:06:11 +0100 Subject: [PATCH] [omemo] Dont show empty qrcode image --- omemo/config_dialog.ui | 10 +++++----- omemo/ui.py | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/omemo/config_dialog.ui b/omemo/config_dialog.ui index 5944a2e..7c254aa 100644 --- a/omemo/config_dialog.ui +++ b/omemo/config_dialog.ui @@ -1,7 +1,7 @@ - + - + @@ -170,11 +170,11 @@ - True False - 0 + True + start gtk-missing-image - 0 + 1 True diff --git a/omemo/ui.py b/omemo/ui.py index 5b2c6da..3b708f3 100644 --- a/omemo/ui.py +++ b/omemo/ui.py @@ -350,10 +350,13 @@ class OMEMOConfigDialog(GajimPluginConfigDialog): if PILLOW: path = self.get_qrcode( app.get_jid_from_account(account), deviceid, ownfpr[2:]) - self.qrcode.set_from_pixbuf(GdkPixbuf.Pixbuf.new_from_file(path)) + pixbuf = GdkPixbuf.Pixbuf.new_from_file(path) + self.qrcode.set_from_pixbuf(pixbuf) + self.qrcode.show() self.qrinfo.hide() else: self.qrinfo.show() + self.qrcode.hide() class FingerprintWindow(Gtk.Dialog):