diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-06-21 23:17:18 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-06-24 19:34:07 +0800 |
commit | ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9 (patch) | |
tree | 07aa4625ed0b1731c5ce4d95bf5d778cfefc02dd /embed/ephy-web-view.c | |
parent | 64bc15de3f1dcbd68243f0544d0514ef341534b4 (diff) | |
download | gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.tar gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.tar.gz gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.tar.bz2 gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.tar.lz gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.tar.xz gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.tar.zst gsoc2013-epiphany-ccc2a6f6a9cfea8a06dd7b8968c3ad59597950e9.zip |
ephy-web-view: Add ephy_web_view_load_failed()
To check whether the load operation in the web view failed.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index c0350a3ca..df290c82a 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -83,6 +83,7 @@ struct _EphyWebViewPrivate { guint visibility : 1; guint loading_homepage : 1; guint is_setting_zoom : 1; + guint load_failed : 1; char *address; char *typed_address; @@ -1943,6 +1944,7 @@ load_status_cb (WebKitWebView *web_view, WebKitWebDataSource *source; WebKitNetworkRequest *request; + priv->load_failed = FALSE; frame = webkit_web_view_get_main_frame (web_view); source = webkit_web_frame_get_provisional_data_source (frame); @@ -2074,6 +2076,7 @@ load_status_cb (WebKitWebView *web_view, break; } case WEBKIT_LOAD_FAILED: + priv->load_failed = TRUE; ephy_web_view_set_link_message (view, NULL); ephy_web_view_set_loading_title (view, NULL, FALSE); @@ -3160,6 +3163,21 @@ ephy_web_view_is_loading (EphyWebView *view) } /** + * ephy_web_view_load_failed: + * @view: an #EphyWebView + * + * Returns whether the web page in @view has failed to load. + * + * Return value: %TRUE if the page failed to load, %FALSE if it's loading + * or load finished successfully + **/ +gboolean +ephy_web_view_load_failed (EphyWebView *view) +{ + return view->priv->load_failed; +} + +/** * ephy_web_view_get_loading_title: * @view: an #EphyWebView * |