summaryrefslogtreecommitdiff
path: root/plugins/common/WebAuthenticationPane.vala
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/common/WebAuthenticationPane.vala
parentf83e6f04c2e430326656513ce02c4206aac8cc07 (diff)
parentde21437207c39bdacacc74896c0d1c820c314d22 (diff)
Merge branch 'release/debian/0.30.5-1'debian/0.30.5-1
Diffstat (limited to 'plugins/common/WebAuthenticationPane.vala')
-rw-r--r--plugins/common/WebAuthenticationPane.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/common/WebAuthenticationPane.vala b/plugins/common/WebAuthenticationPane.vala
index c537748..1704780 100644
--- a/plugins/common/WebAuthenticationPane.vala
+++ b/plugins/common/WebAuthenticationPane.vala
@@ -12,6 +12,7 @@ namespace Shotwell.Plugins.Common {
}
public string login_uri { owned get; construct; }
+ public Error load_error { get; private set; default = null; }
private WebKit.WebView webview;
@@ -22,6 +23,7 @@ namespace Shotwell.Plugins.Common {
this.webview.get_settings ().enable_plugins = false;
this.webview.load_changed.connect (this.on_page_load_changed);
+ this.webview.load_failed.connect (this.on_page_load_failed);
this.webview.context_menu.connect ( () => { return false; });
}
@@ -29,11 +31,24 @@ namespace Shotwell.Plugins.Common {
protected void set_cursor (Gdk.CursorType type) {
var window = webview.get_window ();
+ if (window == null)
+ return;
+
var display = window.get_display ();
+ if (display == null)
+ return;
+
var cursor = new Gdk.Cursor.for_display (display, type);
window.set_cursor (cursor);
}
+ private bool on_page_load_failed (WebKit.LoadEvent load_event, string uri, Error error) {
+ critical ("Failed to load uri %s: %s", uri, error.message);
+ this.load_error = error;
+
+ return false;
+ }
+
private void on_page_load_changed (WebKit.LoadEvent load_event) {
switch (load_event) {
case WebKit.LoadEvent.STARTED: