diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-web-view.c | 18 | ||||
-rw-r--r-- | embed/ephy-web-view.h | 1 |
2 files changed, 19 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 * diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h index 28203b274..398285a3e 100644 --- a/embed/ephy-web-view.h +++ b/embed/ephy-web-view.h @@ -137,6 +137,7 @@ void ephy_web_view_load_url (EphyWebView void ephy_web_view_copy_back_history (EphyWebView *source, EphyWebView *dest); gboolean ephy_web_view_is_loading (EphyWebView *view); +gboolean ephy_web_view_load_failed (EphyWebView *view); const char * ephy_web_view_get_loading_title (EphyWebView *view); GdkPixbuf * ephy_web_view_get_icon (EphyWebView *view); EphyWebViewDocumentType ephy_web_view_get_document_type (EphyWebView *view); |