From f930456a362922ea87f0c86344546707847682d2 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Fri, 31 Aug 2012 20:00:40 +0300 Subject: 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 file changed, 7 insertions(+) diff --git a/lib/widgets/ephy-frecent-store.c b/lib/widgets/ephy-frecent-store.c index 2a60c7c63..9954d3560 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); } -- cgit v1.2.1