[omemo] Dont show empty qrcode image
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user