summaryrefslogtreecommitdiff
path: root/plugins/shotwell-publishing
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-08-16 07:14:05 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-08-16 07:14:05 +0200
commit10ce63378912ef63c8882889f02ed4dff0416f32 (patch)
tree7cc5bafae0364fa659af2013b2a36bd1baf336af /plugins/shotwell-publishing
parentf83e6f04c2e430326656513ce02c4206aac8cc07 (diff)
parentde21437207c39bdacacc74896c0d1c820c314d22 (diff)
Merge branch 'release/debian/0.30.5-1'debian/0.30.5-1
Diffstat (limited to 'plugins/shotwell-publishing')
-rw-r--r--plugins/shotwell-publishing/PhotosPublisher.vala5
-rw-r--r--plugins/shotwell-publishing/PiwigoPublishing.vala48
2 files changed, 29 insertions, 24 deletions
diff --git a/plugins/shotwell-publishing/PhotosPublisher.vala b/plugins/shotwell-publishing/PhotosPublisher.vala
index d878158..ce5e505 100644
--- a/plugins/shotwell-publishing/PhotosPublisher.vala
+++ b/plugins/shotwell-publishing/PhotosPublisher.vala
@@ -203,9 +203,10 @@ private class AlbumDirectoryTransaction : Publishing.RESTSupport.GooglePublisher
var response_albums = object.get_member ("albums").get_array();
response_albums.foreach_element( (a, b, element) => {
var album = element.get_object();
+ var title = album.get_member("title");
var is_writable = album.get_member("isWriteable");
- if (is_writable != null && is_writable.get_boolean())
- albums += new Album(album.get_string_member("title"), album.get_string_member("id"));
+ if (title != null && is_writable != null && is_writable.get_boolean())
+ albums += new Album(title.get_string(), album.get_string_member("id"));
});
if (pagination_token_node != null) {
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 (); });