diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-08-15 09:42:50 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-08-15 09:42:50 +0200 |
commit | bf92a282ab553ace71530391de33bdbf676a66bd (patch) | |
tree | 9166cc293d60df92084ef07232d89db30818f87f /plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala | |
parent | 6ff104c4ac1f934296b996458b15bea29f062323 (diff) | |
parent | b57c8088c3dad237b04bb792c6dade9c470ce9fd (diff) |
Update upstream source from tag 'upstream/0.30.5'
Update to upstream version '0.30.5'
with Debian dir 414e83264d008ad44f5b2ae7107ff5acc3b3ea86
Diffstat (limited to 'plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala')
-rw-r--r-- | plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala index 5188ed6..ea4d9ce 100644 --- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala +++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala @@ -54,6 +54,12 @@ namespace Publishing.Authenticator.Shotwell.Flickr { } public override void on_page_load() { + if (this.load_error != null) { + this.error(); + + return; + } + var uri = new Soup.URI(get_view().get_uri()); if (uri.scheme == "shotwell-auth" && this.auth_code == null) { var form_data = Soup.Form.decode (uri.query); @@ -77,6 +83,8 @@ namespace Publishing.Authenticator.Shotwell.Flickr { } internal class Flickr : Publishing.Authenticator.Shotwell.OAuth1.Authenticator { + private WebAuthenticationPane pane; + public Flickr(Spit.Publishing.PluginHost host) { base(API_KEY, API_SECRET, host); } @@ -185,13 +193,17 @@ namespace Publishing.Authenticator.Shotwell.Flickr { } private void do_web_authentication(string token) { - var pane = new WebAuthenticationPane(token); + pane = new WebAuthenticationPane(token); host.install_dialog_pane(pane); pane.authorized.connect(this.do_verify_pin); pane.error.connect(this.on_web_login_error); } private void on_web_login_error() { + if (pane.load_error != null) { + host.post_error(pane.load_error); + return; + } host.post_error(new Spit.Publishing.PublishingError.PROTOCOL_ERROR(_("Flickr authorization failed"))); } |