diff options
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index f86b34a61..cf2ca9a56 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -230,9 +230,6 @@ ephy_bookmarks_save_delayed (EphyBookmarks *bookmarks, int delay) } } -#ifdef HAVE_WEBKIT2 -/* TODO: Favicons */ -#else static void icon_updated_cb (WebKitFaviconDatabase *favicon_database, const char *address, @@ -244,16 +241,17 @@ icon_updated_cb (WebKitFaviconDatabase *favicon_database, ephy_bookmarks_set_icon (eb, address, icon); g_free (icon); } -#endif static void ephy_setup_history_notifiers (EphyBookmarks *eb) { + WebKitFaviconDatabase *favicon_database; + #ifdef HAVE_WEBKIT2 - /* TODO: Favicons */ + favicon_database = webkit_web_context_get_favicon_database (webkit_web_context_get_default ()); + g_signal_connect (favicon_database, "favicon-ready", + G_CALLBACK (icon_updated_cb), eb); #else - WebKitFaviconDatabase *favicon_database; - favicon_database = webkit_get_favicon_database (); g_signal_connect (favicon_database, "icon-loaded", G_CALLBACK (icon_updated_cb), eb); @@ -1143,11 +1141,7 @@ ephy_bookmarks_add (EphyBookmarks *eb, const char *url) { EphyNode *bm; -#ifdef HAVE_WEBKIT2 - /* TODO: Favicons */ -#else WebKitFaviconDatabase *favicon_database; -#endif bm = ephy_node_new (eb->priv->db); @@ -1163,9 +1157,10 @@ ephy_bookmarks_add (EphyBookmarks *eb, ephy_node_set_property_string (bm, EPHY_NODE_BMK_PROP_TITLE, title); #ifdef HAVE_WEBKIT2 - /* TODO: Favicons */ + favicon_database = webkit_web_context_get_favicon_database (webkit_web_context_get_default ()); #else favicon_database = webkit_get_favicon_database (); +#endif if (favicon_database != NULL) { char *icon = webkit_favicon_database_get_favicon_uri (favicon_database, url); @@ -1176,7 +1171,6 @@ ephy_bookmarks_add (EphyBookmarks *eb, g_free (icon); } } -#endif update_has_smart_address (eb, bm, url); update_bookmark_keywords (eb, bm); |