[epiphany] ephy-web-view: take a snapshot if needed when the page load finishes



commit 09b60aea4d1ad8349e18b17cfb3f7ca5d68498cf
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Mon Aug 20 19:05:18 2012 +0300

    ephy-web-view: take a snapshot if needed when the page load finishes

 embed/ephy-web-view.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index f42cb2d..bcef405 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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]