diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-08-15 09:42:33 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-08-15 09:42:33 +0200 |
commit | b57c8088c3dad237b04bb792c6dade9c470ce9fd (patch) | |
tree | bcf0e22d1a26313488a3fb37e30c479dcfa8537d /plugins/shotwell-publishing/PiwigoPublishing.vala | |
parent | 6710aa856175300e598b23b701c0d2741f2cb6b3 (diff) |
New upstream version 0.30.5upstream/0.30.5
Diffstat (limited to 'plugins/shotwell-publishing/PiwigoPublishing.vala')
-rw-r--r-- | plugins/shotwell-publishing/PiwigoPublishing.vala | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/plugins/shotwell-publishing/PiwigoPublishing.vala b/plugins/shotwell-publishing/PiwigoPublishing.vala index 649f135..f177789 100644 --- a/plugins/shotwell-publishing/PiwigoPublishing.vala +++ b/plugins/shotwell-publishing/PiwigoPublishing.vala @@ -1010,7 +1010,7 @@ internal class SSLErrorPane : Shotwell.Plugins.Common.BuilderPane { public signal void proceed (); public string host { owned get; construct; } - public TlsCertificate cert { private get; construct; } + public TlsCertificate? cert { private get; construct; } public string error_text { owned get; construct; } public SSLErrorPane (SessionLoginTransaction transaction, @@ -1037,28 +1037,32 @@ internal class SSLErrorPane : Shotwell.Plugins.Common.BuilderPane { label.set_text (error_text); var info = this.get_builder ().get_object ("default") as Gtk.Button; - info.clicked.connect (() => { - var simple_cert = new Gcr.SimpleCertificate (cert.certificate.data); - var widget = new Gcr.CertificateWidget (simple_cert); - bool use_header = true; - Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header); - var flags = (Gtk.DialogFlags) 0; - if (use_header) { - flags |= Gtk.DialogFlags.USE_HEADER_BAR; - } + if (cert != null) { + info.clicked.connect (() => { + var simple_cert = new Gcr.SimpleCertificate (cert.certificate.data); + var widget = new Gcr.CertificateWidget (simple_cert); + bool use_header = true; + Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header); + var flags = (Gtk.DialogFlags) 0; + if (use_header) { + flags |= Gtk.DialogFlags.USE_HEADER_BAR; + } - var dialog = new Gtk.Dialog.with_buttons ( - _("Certificate of %s").printf (host), - null, - flags, - _("_OK"), Gtk.ResponseType.OK); - dialog.get_content_area ().add (widget); - dialog.set_default_response (Gtk.ResponseType.OK); - dialog.set_default_size (640, -1); - dialog.show_all (); - dialog.run (); - dialog.destroy (); - }); + var dialog = new Gtk.Dialog.with_buttons ( + _("Certificate of %s").printf (host), + null, + flags, + _("_OK"), Gtk.ResponseType.OK); + dialog.get_content_area ().add (widget); + dialog.set_default_response (Gtk.ResponseType.OK); + dialog.set_default_size (640, -1); + dialog.show_all (); + dialog.run (); + dialog.destroy (); + }); + } else { + info.get_parent().remove(info); + } var proceed = this.get_builder ().get_object ("proceed_button") as Gtk.Button; proceed.clicked.connect (() => { this.proceed (); }); |