diff options
author | Mario Sanchez Prada <msanchez@gnome.org> | 2012-12-04 20:32:07 +0800 |
---|---|---|
committer | Mario Sanchez Prada <msanchez@gnome.org> | 2012-12-04 20:05:07 +0800 |
commit | 24ec29a91bf161c84270ec2b3ad66dfaa3731738 (patch) | |
tree | b34522e9f744e905ce43e9feff5f342516b719ee /src/bookmarks/ephy-bookmarks.c | |
parent | 7fbf27f3685dab40270b9ed697c6c15b6b120fe4 (diff) | |
download | gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.tar gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.tar.gz gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.tar.bz2 gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.tar.lz gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.tar.xz gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.tar.zst gsoc2013-epiphany-24ec29a91bf161c84270ec2b3ad66dfaa3731738.zip |
Port EphyBookmarks and EphyBookmarkAction to WebKit2GTK+ favicons API.
https://bugzilla.gnome.org/show_bug.cgi?id=679370
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); |