[epiphany/in-tab-overview] ephy-frecent-store: set default icon in new rows



commit ac94b58dfb0ce5f3f25cb7b830ac57a38126fb23
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Fri Aug 31 20:00:40 2012 +0300

    ephy-frecent-store: set default icon in new rows
    
    Otherwise they look empty until the icon is loaded. This is specially
    annoying when opening the overview and all the icons are scheduled for load.

 lib/widgets/ephy-frecent-store.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/lib/widgets/ephy-frecent-store.c b/lib/widgets/ephy-frecent-store.c
index 2a60c7c..9954d35 100644
--- a/lib/widgets/ephy-frecent-store.c
+++ b/lib/widgets/ephy-frecent-store.c
@@ -51,6 +51,7 @@ on_find_urls_cb (EphyHistoryService *service,
   gboolean valid;
   GList *iter;
   gboolean peek_snapshot;
+  GdkPixbuf *default_icon;
 
   if (success != TRUE)
     return;
@@ -58,6 +59,9 @@ on_find_urls_cb (EphyHistoryService *service,
   valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store),
                                          &treeiter);
 
+  g_object_get (store,
+                "default-icon", &default_icon,
+                NULL);
   for (iter = urls; iter != NULL; iter = iter->next) {
     peek_snapshot = FALSE;
     url = (EphyHistoryURL *)iter->data;
@@ -85,6 +89,7 @@ on_find_urls_cb (EphyHistoryService *service,
                                          EPHY_OVERVIEW_STORE_TITLE, url->title,
                                          EPHY_OVERVIEW_STORE_URI, url->url,
                                          EPHY_OVERVIEW_STORE_LAST_VISIT, url->last_visit_time,
+                                         EPHY_OVERVIEW_STORE_SNAPSHOT, default_icon,
                                          -1);
       peek_snapshot = TRUE;
     }
@@ -98,6 +103,8 @@ on_find_urls_cb (EphyHistoryService *service,
 
   g_list_free_full (urls, (GDestroyNotify)ephy_history_url_free);
 
+  g_object_unref (default_icon);
+
   while (valid)
     valid = ephy_overview_store_remove (EPHY_OVERVIEW_STORE (store), &treeiter);
 }



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