aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-09-17 20:48:08 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-17 21:31:41 +0800
commit009c7766067fb710ef87a82701ccc2c7125bf2c2 (patch)
tree8ad432fd1d6245e6c0d5d90d5c0bdc778620b11a
parent9d8795a0919ed771bf380630a4a034e0e6d37164 (diff)
downloadgsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.tar
gsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.tar.gz
gsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.tar.bz2
gsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.tar.lz
gsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.tar.xz
gsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.tar.zst
gsoc2013-epiphany-009c7766067fb710ef87a82701ccc2c7125bf2c2.zip
ephy-web-view: freeze history on homepage load
And remove redundant check. https://bugzilla.gnome.org/show_bug.cgi?id=683796
-rw-r--r--embed/ephy-web-view.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a6215145b..dc20d120d 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1036,6 +1036,25 @@ update_navigation_flags (EphyWebView *view)
}
static void
+ephy_web_view_freeze_history (EphyWebView *view)
+{
+ view->priv->history_frozen = TRUE;
+}
+
+static void
+ephy_web_view_thaw_history (EphyWebView *view)
+{
+ view->priv->history_frozen = FALSE;
+}
+
+static gboolean
+ephy_web_view_is_history_frozen (EphyWebView *view)
+{
+ return view->priv->history_frozen;
+}
+
+
+static void
ephy_web_view_clear_history (EphyWebView *view)
{
#ifdef HAVE_WEBKIT2
@@ -1282,6 +1301,7 @@ static void
impl_loading_homepage (EphyWebView *view)
{
view->priv->loading_homepage = TRUE;
+ ephy_web_view_freeze_history (view);
}
static void
@@ -2080,24 +2100,6 @@ ephy_web_view_location_changed (EphyWebView *view,
g_object_thaw_notify (object);
}
-static void
-ephy_web_view_freeze_history (EphyWebView *view)
-{
- view->priv->history_frozen = TRUE;
-}
-
-static void
-ephy_web_view_thaw_history (EphyWebView *view)
-{
- view->priv->history_frozen = FALSE;
-}
-
-static gboolean
-ephy_web_view_is_history_frozen (EphyWebView *view)
-{
- return view->priv->history_frozen;
-}
-
#ifndef HAVE_WEBKIT2
static gboolean
web_view_check_snapshot (WebKitWebView *web_view)
@@ -2183,8 +2185,7 @@ load_changed_cb (WebKitWebView *web_view,
restore_zoom_level (view, uri);
/* History. */
- if (!ephy_web_view_is_loading_homepage (view) &&
- !ephy_web_view_is_history_frozen (view)) {
+ if (!ephy_web_view_is_history_frozen (view)) {
char *history_uri = NULL;
/* TODO: move the normalization down to the history service? */
@@ -2344,8 +2345,7 @@ load_status_cb (WebKitWebView *web_view,
restore_zoom_level (view, uri);
/* History. */
- if (!ephy_web_view_is_loading_homepage (view) &&
- !ephy_web_view_is_history_frozen (view)) {
+ if (!ephy_web_view_is_history_frozen (view)) {
char *history_uri = NULL;
/* TODO: move the normalization down to the history service? */