diff options
author | Alejandro G. Castro <alex@igalia.com> | 2010-05-04 19:18:14 +0800 |
---|---|---|
committer | Alejandro G. Castro <alex@igalia.com> | 2010-05-04 19:52:40 +0800 |
commit | aaf35d0a5cb632c57fe84c5d41648168bc703fe4 (patch) | |
tree | 07127f178f4f33e5b0273bb0e55c110f0aa42376 /embed/ephy-web-view.c | |
parent | c3ce140727235f54c61dca6cc9eb6709422fe3b8 (diff) | |
download | gsoc2013-epiphany-aaf35d0a5cb632c57fe84c5d41648168bc703fe4.tar.gz gsoc2013-epiphany-aaf35d0a5cb632c57fe84c5d41648168bc703fe4.tar.zst gsoc2013-epiphany-aaf35d0a5cb632c57fe84c5d41648168bc703fe4.zip |
Handle the WEBKIT_NETWORK_ERROR_CANCELLED fail
In this case the user cancelled the load, we set the address of the
current page loaded in the webview again in order to avoid showing
an URL that was not committed.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 669ffd6e6..a0c63c7f9 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -2119,8 +2119,9 @@ load_error_cb (WebKitWebView *web_view, GError *error, gpointer user_data) { + EphyWebView *view = EPHY_WEB_VIEW (web_view); + if (error->code != WEBKIT_NETWORK_ERROR_CANCELLED) { - EphyWebView *view = EPHY_WEB_VIEW (web_view); gchar *message; message = g_strdup_printf (_("A problem occurred while loading %s"), @@ -2129,6 +2130,13 @@ load_error_cb (WebKitWebView *web_view, g_free (message); _ephy_web_view_set_icon_address (view, NULL); + } else { + const gchar* uri; + + uri = webkit_web_view_get_uri (web_view); + + ephy_web_view_set_typed_address (view, NULL); + ephy_web_view_set_address (view, uri); } return FALSE; |