aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorAlejandro G. Castro <alex@igalia.com>2010-05-31 21:42:42 +0800
committerAlejandro G. Castro <alex@igalia.com>2010-06-02 01:34:41 +0800
commit7dbc73e8108d943c162ec118a382587cc4357799 (patch)
tree76f66fdee244043ecbea0a6a27472c68dccf0ec4 /embed/ephy-web-view.c
parent685e4e45b4d984d67f93a04701239baddb16ab0d (diff)
downloadgsoc2013-epiphany-7dbc73e8108d943c162ec118a382587cc4357799.tar.gz
gsoc2013-epiphany-7dbc73e8108d943c162ec118a382587cc4357799.tar.zst
gsoc2013-epiphany-7dbc73e8108d943c162ec118a382587cc4357799.zip
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
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c12
1 files changed, 8 insertions, 4 deletions
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;