diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2018-03-23 23:06:11 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2018-03-23 23:06:11 +0300 |
commit | ea45e2fc58ab2f6faff087c682967e7aa5c7e9cb (patch) | |
tree | eba69888f7cdbd5e6575819b5c61a854edf82444 | |
parent | 6521e47679d75504b3075b90219c8a1cd7d0f20a (diff) |
[omemo] Dont show empty qrcode image
-rw-r--r-- | omemo/config_dialog.ui | 10 | ||||
-rw-r--r-- | 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.20.2 --> <interface> - <requires lib="gtk+" version="3.0"/> + <requires lib="gtk+" version="3.20"/> <object class="GtkListStore" id="account_store"> <columns> <!-- column-name accounts --> @@ -170,11 +170,11 @@ </child> <child> <object class="GtkImage" id="qrcode"> - <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> + <property name="no_show_all">True</property> + <property name="halign">start</property> <property name="stock">gtk-missing-image</property> - <property name="icon_size">0</property> + <property name="icon_size">1</property> </object> <packing> <property name="expand">True</property> 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):
|