[epiphany] Handle the WEBKIT_NETWORK_ERROR_CANCELLED fail
- From: Alejandro Garcia Castro <acastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Handle the WEBKIT_NETWORK_ERROR_CANCELLED fail
- Date: Tue, 4 May 2010 11:53:34 +0000 (UTC)
commit aaf35d0a5cb632c57fe84c5d41648168bc703fe4
Author: Alejandro G. Castro <alex igalia com>
Date: Tue May 4 13:18:14 2010 +0200
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.
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 669ffd6..a0c63c7 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]