From 7dbc73e8108d943c162ec118a382587cc4357799 Mon Sep 17 00:00:00 2001 From: "Alejandro G. Castro" Date: Mon, 31 May 2010 15:42:42 +0200 Subject: Do not change the address if we are still loading the previous page We were replacing the address with the old one even in the case the user cancelled the load because he added a new web page before the previous one finished the loading process. This patch adds a check to control if we can expire the address. Bug #620129 --- embed/ephy-web-view.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'embed') diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 10f4ae8ff..70444bc17 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -2218,12 +2218,16 @@ load_error_cb (WebKitWebView *web_view, _ephy_web_view_set_icon_address (view, NULL); } else { - const gchar* uri; + EphyWebViewPrivate *priv = view->priv; + + if (priv->expire_address_now) { + const gchar* prev_uri; - uri = webkit_web_view_get_uri (web_view); + prev_uri = webkit_web_view_get_uri (web_view); - ephy_web_view_set_typed_address (view, NULL); - ephy_web_view_set_address (view, uri); + ephy_web_view_set_typed_address (view, NULL); + ephy_web_view_set_address (view, prev_uri); + } } return FALSE; -- cgit v1.2.3