aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-08-21 00:05:18 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-01 02:34:01 +0800
commit09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf (patch)
treef982d08f5d749a8cec48374eab6b04bb33af5c7b
parent9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52 (diff)
downloadgsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.tar
gsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.tar.gz
gsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.tar.bz2
gsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.tar.lz
gsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.tar.xz
gsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.tar.zst
gsoc2013-epiphany-09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf.zip
ephy-web-view: take a snapshot if needed when the page load finishes
-rw-r--r--embed/ephy-web-view.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index f42cb2dd1..bcef40507 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2328,6 +2328,8 @@ load_status_cb (WebKitWebView *web_view,
}
case WEBKIT_LOAD_FINISHED: {
SoupURI *uri;
+ EphyOverviewStore *store;
+ GtkTreeIter iter;
priv->loading_homepage = FALSE;
@@ -2377,6 +2379,13 @@ load_status_cb (WebKitWebView *web_view,
/* Reset visit type. */
priv->visit_type = EPHY_PAGE_VISIT_NONE;
+ store = EPHY_OVERVIEW_STORE (ephy_embed_shell_get_frecent_store (embed_shell));
+ if (ephy_overview_store_find_url (store, webkit_web_view_get_uri (web_view), &iter) &&
+ ephy_overview_store_needs_snapshot (store, &iter))
+ ephy_overview_store_set_snapshot (store, &iter,
+ webkit_web_view_get_snapshot (web_view));
+
+
break;
}
case WEBKIT_LOAD_FAILED: