aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-20 19:14:50 +0800
committerXan Lopez <xan@igalia.com>2012-03-20 19:14:50 +0800
commitfaf0c7c89a02f38e2272048ae6aa3ba3e11e5f63 (patch)
treebe7425afa4e15fc7337c9068489dc116ad5121e2
parent6119b95ca4c0c2d4d78b27422dfb6ba9203bab56 (diff)
downloadgsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.tar
gsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.tar.gz
gsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.tar.bz2
gsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.tar.lz
gsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.tar.xz
gsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.tar.zst
gsoc2013-epiphany-faf0c7c89a02f38e2272048ae6aa3ba3e11e5f63.zip
bookmarks: use the new favicon database
-rw-r--r--src/bookmarks/ephy-bookmarks.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 7c0e19ccf..f20e150dc 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -29,7 +29,6 @@
#include "ephy-debug.h"
#include "ephy-embed-shell.h"
#include "ephy-file-helpers.h"
-#include "ephy-history.h"
#include "ephy-history-service.h"
#include "ephy-node-common.h"
#include "ephy-prefs.h"
@@ -249,22 +248,23 @@ ephy_bookmarks_save_delayed (EphyBookmarks *bookmarks, int delay)
}
static void
-icon_updated_cb (EphyHistory *history,
+icon_updated_cb (WebKitFaviconDatabase *favicon_database,
const char *address,
- const char *icon,
EphyBookmarks *eb)
{
+ const char *icon;
+
+ icon = webkit_favicon_database_get_favicon_uri (favicon_database, address);
ephy_bookmarks_set_icon (eb, address, icon);
}
static void
ephy_setup_history_notifiers (EphyBookmarks *eb)
{
- EphyHistory *history;
-
- history = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
-
- g_signal_connect (history, "icon-updated",
+ WebKitFaviconDatabase *favicon_database;
+
+ favicon_database = webkit_get_favicon_database ();
+ g_signal_connect (favicon_database, "icon-loaded",
G_CALLBACK (icon_updated_cb), eb);
}
@@ -1164,8 +1164,8 @@ ephy_bookmarks_add (EphyBookmarks *eb,
const char *title,
const char *url)
{
- EphyHistory *history;
EphyNode *bm;
+ WebKitFaviconDatabase *favicon_database;
bm = ephy_node_new (eb->priv->db);
@@ -1180,10 +1180,11 @@ ephy_bookmarks_add (EphyBookmarks *eb,
}
ephy_node_set_property_string (bm, EPHY_NODE_BMK_PROP_TITLE, title);
- history = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
- if (history != NULL)
+
+ favicon_database = webkit_get_favicon_database ();
+ if (favicon_database != NULL)
{
- const char *icon = ephy_history_get_icon (history, url);
+ const char *icon = webkit_favicon_database_get_favicon_uri (favicon_database, url);
if (icon != NULL)
{
ephy_node_set_property_string