[epiphany] Replace EphyFaviconCache by WebKit's icon database cache
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Replace EphyFaviconCache by WebKit's icon database cache
- Date: Tue, 20 Mar 2012 11:18:34 +0000 (UTC)
commit 6119b95ca4c0c2d4d78b27422dfb6ba9203bab56
Author: Sergio Villar Senin <svillar igalia com>
Date: Wed Mar 7 18:28:02 2012 +0100
Replace EphyFaviconCache by WebKit's icon database cache
https://bugzilla.gnome.org/show_bug.cgi?id=648653
embed/Makefile.am | 2 -
embed/ephy-embed-prefs.h | 1 +
embed/ephy-embed-shell.c | 30 --
embed/ephy-embed-shell.h | 2 -
embed/ephy-embed-single.c | 6 +
embed/ephy-favicon-cache.c | 869 ---------------------------------
embed/ephy-favicon-cache.h | 73 ---
embed/ephy-web-view.c | 42 +--
src/Makefile.am | 2 -
src/bookmarks/ephy-bookmark-action.c | 44 +-
src/bookmarks/ephy-bookmarks-editor.c | 44 ++-
src/ephy-completion-model.c | 61 ++-
src/ephy-history-window.c | 24 +-
src/ephy-shell.c | 1 -
src/pdm-dialog.c | 5 +-
src/prefs-dialog.c | 1 -
16 files changed, 130 insertions(+), 1077 deletions(-)
---
diff --git a/embed/Makefile.am b/embed/Makefile.am
index ff79e02..ddcdb14 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -11,7 +11,6 @@ NOINST_H_FILES = \
ephy-embed-dialog.h \
ephy-embed-private.h \
ephy-encodings.h \
- ephy-favicon-cache.h \
ephy-request-about.h \
ephy-web-app-utils.h
@@ -47,7 +46,6 @@ libephyembed_la_SOURCES = \
ephy-embed-shell.c \
ephy-embed-utils.c \
ephy-encodings.c \
- ephy-favicon-cache.c \
ephy-history.c \
ephy-permission-manager.c \
ephy-request-about.c \
diff --git a/embed/ephy-embed-prefs.h b/embed/ephy-embed-prefs.h
index 0afbef5..ee86da0 100644
--- a/embed/ephy-embed-prefs.h
+++ b/embed/ephy-embed-prefs.h
@@ -28,6 +28,7 @@
#endif
#define USER_STYLESHEET_FILENAME "user-stylesheet.css"
+#define FAVICON_SIZE 16
G_BEGIN_DECLS
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index cda96e2..3b521f1 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -34,7 +34,6 @@
#include "ephy-embed-single.h"
#include "ephy-embed-type-builtins.h"
#include "ephy-encodings.h"
-#include "ephy-favicon-cache.h"
#include "ephy-file-helpers.h"
#include "ephy-history.h"
#include "ephy-history-service.h"
@@ -54,7 +53,6 @@ struct _EphyEmbedShellPrivate
EphyHistory *global_history;
EphyHistoryService *global_history_service;
GList *downloads;
- EphyFaviconCache *favicon_cache;
EphyEmbedSingle *embed_single;
EphyEncodings *encodings;
EphyAdBlockManager *adblock_manager;
@@ -96,13 +94,6 @@ ephy_embed_shell_dispose (GObject *object)
EphyEmbedShell *shell = EPHY_EMBED_SHELL (object);
EphyEmbedShellPrivate *priv = shell->priv;
- if (priv->favicon_cache != NULL)
- {
- LOG ("Unref favicon cache");
- g_object_unref (priv->favicon_cache);
- priv->favicon_cache = NULL;
- }
-
if (priv->encodings != NULL)
{
LOG ("Unref encodings");
@@ -167,27 +158,6 @@ ephy_embed_shell_finalize (GObject *object)
}
/**
- * ephy_embed_shell_get_favicon_cache:
- * @shell: the #EphyEmbedShell
- *
- * Returns the favicons cache.
- *
- * Return value: (transfer none): the favicons cache
- **/
-GObject *
-ephy_embed_shell_get_favicon_cache (EphyEmbedShell *shell)
-{
- g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
-
- if (shell->priv->favicon_cache == NULL)
- {
- shell->priv->favicon_cache = ephy_favicon_cache_new ();
- }
-
- return G_OBJECT (shell->priv->favicon_cache);
-}
-
-/**
* ephy_embed_shell_get_global_history:
* @shell: the #EphyEmbedShell
*
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index 4bab3a4..84b507f 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -79,8 +79,6 @@ GType ephy_embed_shell_get_type (void);
EphyEmbedShell *ephy_embed_shell_get_default (void);
-GObject *ephy_embed_shell_get_favicon_cache (EphyEmbedShell *shell);
-
GObject *ephy_embed_shell_get_global_history (EphyEmbedShell *shell);
GObject *ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell);
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index bf815ed..a9a2017 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -350,6 +350,7 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
char *filename;
char *cookie_policy;
char *cache_dir;
+ char *favicon_db_path;
EphyEmbedSinglePrivate *priv = single->priv;
SoupSessionFeature *requester;
@@ -412,6 +413,11 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
soup_session_add_feature_by_type (session, SOUP_TYPE_PASSWORD_MANAGER_GNOME);
#endif
+ /* Initialize the favicon cache. */
+ favicon_db_path = g_build_filename (g_get_user_data_dir (), g_get_prgname (), NULL);
+ webkit_favicon_database_set_path (webkit_get_favicon_database (), favicon_db_path);
+ g_free (favicon_db_path);
+
return TRUE;
}
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2f6579e..66c057d 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -32,7 +32,6 @@
#include "ephy-embed-type-builtins.h"
#include "ephy-embed-utils.h"
#include "ephy-embed.h"
-#include "ephy-favicon-cache.h"
#include "ephy-file-helpers.h"
#include "ephy-history.h"
#include "ephy-history-service.h"
@@ -1593,42 +1592,19 @@ static void
_ephy_web_view_load_icon (EphyWebView *view)
{
EphyWebViewPrivate *priv = view->priv;
- EphyEmbedShell *shell;
- EphyFaviconCache *cache;
- const char *icon_address;
-
- icon_address = webkit_web_view_get_icon_uri (WEBKIT_WEB_VIEW (view));
+ const char* uri;
- if (icon_address == NULL || priv->icon != NULL) return;
-
- shell = ephy_embed_shell_get_default ();
- cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache (shell));
+ if (priv->icon != NULL)
+ return;
- /* ephy_favicon_cache_get returns a reference already */
- priv->icon = ephy_favicon_cache_get (cache, icon_address);
+ uri = webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view));
+ priv->icon = webkit_favicon_database_try_get_favicon_pixbuf (webkit_get_favicon_database (), uri,
+ FAVICON_SIZE, FAVICON_SIZE);
g_object_notify (G_OBJECT (view), "icon");
}
static void
-icon_cache_changed_cb (EphyFaviconCache *cache,
- const char *address,
- EphyWebView *view)
-{
- const char *icon_address;
-
- g_return_if_fail (address != NULL);
-
- icon_address = webkit_web_view_get_icon_uri (WEBKIT_WEB_VIEW (view));
-
- /* is this for us? */
- if (icon_address != NULL &&
- strcmp (icon_address, address) == 0) {
- _ephy_web_view_load_icon (view);
- }
-}
-
-static void
_ephy_web_view_set_icon_address (EphyWebView *view,
const char *icon_address)
{
@@ -2337,7 +2313,6 @@ static void
ephy_web_view_init (EphyWebView *web_view)
{
EphyWebViewPrivate *priv;
- EphyFaviconCache *cache;
priv = web_view->priv = EPHY_WEB_VIEW_GET_PRIVATE (web_view);
@@ -2407,11 +2382,6 @@ ephy_web_view_init (EphyWebView *web_view)
G_CALLBACK (ge_popup_blocked_cb),
NULL);
- cache = EPHY_FAVICON_CACHE
- (ephy_embed_shell_get_favicon_cache (embed_shell));
- g_signal_connect_object (G_OBJECT (cache), "changed",
- G_CALLBACK (icon_cache_changed_cb),
- web_view, (GConnectFlags)0);
}
/**
diff --git a/src/Makefile.am b/src/Makefile.am
index 56e699b..7ea753b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -224,7 +224,6 @@ EPHY_GIR_H_FILES = \
$(top_srcdir)/embed/ephy-embed-event.h \
$(top_srcdir)/embed/ephy-embed-shell.h \
$(top_srcdir)/embed/ephy-embed-single.h \
- $(top_srcdir)/embed/ephy-favicon-cache.h \
$(top_srcdir)/embed/ephy-history.h \
$(top_srcdir)/embed/ephy-permission-manager.h \
$(top_srcdir)/embed/ephy-web-view.h \
@@ -254,7 +253,6 @@ EPHY_GIR_C_FILES = \
$(top_srcdir)/embed/ephy-embed-event.c \
$(top_srcdir)/embed/ephy-embed-shell.c \
$(top_srcdir)/embed/ephy-embed-single.c \
- $(top_srcdir)/embed/ephy-favicon-cache.c \
$(top_srcdir)/embed/ephy-history.c \
$(top_srcdir)/embed/ephy-permission-manager.c \
$(top_srcdir)/embed/ephy-web-view.c \
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index 814fadd..7aa3001 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -26,7 +26,7 @@
#include "ephy-bookmarks.h"
#include "ephy-debug.h"
#include "ephy-dnd.h"
-#include "ephy-favicon-cache.h"
+#include "ephy-embed-prefs.h"
#include "ephy-gui.h"
#include "ephy-shell.h"
#include "ephy-string.h"
@@ -67,20 +67,22 @@ typedef struct
G_DEFINE_TYPE (EphyBookmarkAction, ephy_bookmark_action, EPHY_TYPE_LINK_ACTION)
static void
-favicon_cache_changed_cb (EphyFaviconCache *cache,
- const char *icon_address,
- EphyBookmarkAction *action)
+favicon_loaded_cb (WebKitFaviconDatabase *database,
+ const char *page_address,
+ EphyBookmarkAction *action)
{
const char *icon;
+ char *icon_address;
g_return_if_fail (action->priv->node != NULL);
icon = ephy_node_get_property_string (action->priv->node,
EPHY_NODE_BMK_PROP_ICON);
-
- if (icon != NULL && strcmp (icon, icon_address) == 0)
+ icon_address = webkit_favicon_database_get_favicon_uri (database, page_address);
+
+ if (g_strcmp0 (icon, icon_address) == 0)
{
- g_signal_handler_disconnect (cache, action->priv->cache_handler);
+ g_signal_handler_disconnect (database, action->priv->cache_handler);
action->priv->cache_handler = 0;
g_object_notify (G_OBJECT (action), "icon");
@@ -93,28 +95,27 @@ ephy_bookmark_action_sync_icon (GtkAction *action,
GtkWidget *proxy)
{
EphyBookmarkAction *bma = EPHY_BOOKMARK_ACTION (action);
- const char *icon_location;
- EphyFaviconCache *cache;
+ const char *page_location;
+ WebKitFaviconDatabase *database;
GdkPixbuf *pixbuf = NULL;
g_return_if_fail (bma->priv->node != NULL);
- icon_location = ephy_node_get_property_string (bma->priv->node,
- EPHY_NODE_BMK_PROP_ICON);
+ page_location = ephy_node_get_property_string (bma->priv->node,
+ EPHY_NODE_BMK_PROP_LOCATION);
- cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache
- (ephy_embed_shell_get_default ()));
-
- if (icon_location && *icon_location)
+ database = webkit_get_favicon_database ();
+ if (page_location && *page_location)
{
- pixbuf = ephy_favicon_cache_get (cache, icon_location);
+ pixbuf = webkit_favicon_database_try_get_favicon_pixbuf (database, page_location,
+ FAVICON_SIZE, FAVICON_SIZE);
if (pixbuf == NULL && bma->priv->cache_handler == 0)
{
bma->priv->cache_handler =
g_signal_connect_object
- (cache, "changed",
- G_CALLBACK (favicon_cache_changed_cb),
+ (database, "icon-loaded",
+ G_CALLBACK (favicon_loaded_cb),
action, 0);
}
}
@@ -370,14 +371,11 @@ ephy_bookmark_action_dispose (GObject *object)
{
EphyBookmarkAction *action = (EphyBookmarkAction *) object;
EphyBookmarkActionPrivate *priv = action->priv;
- GObject *cache;
if (priv->cache_handler != 0)
{
- cache = ephy_embed_shell_get_favicon_cache
- (ephy_embed_shell_get_default ());
-
- g_signal_handler_disconnect (cache, priv->cache_handler);
+ WebKitFaviconDatabase *database = webkit_get_favicon_database ();
+ g_signal_handler_disconnect (database, priv->cache_handler);
priv->cache_handler = 0;
}
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index c64d1db..b30b542 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -26,7 +26,7 @@
#include "ephy-bookmarks-ui.h"
#include "ephy-debug.h"
#include "ephy-dnd.h"
-#include "ephy-favicon-cache.h"
+#include "ephy-embed-prefs.h"
#include "ephy-file-chooser.h"
#include "ephy-file-helpers.h"
#include "ephy-gui.h"
@@ -1461,26 +1461,42 @@ node_dropped_cb (EphyNodeView *view,
}
static void
+icon_loaded_cb (WebKitFaviconDatabase *database, GAsyncResult *result, GValue *value)
+{
+ GdkPixbuf *favicon = webkit_favicon_database_get_favicon_pixbuf_finish (database, result, NULL);
+ if (!favicon)
+ return;
+
+ g_value_take_object (value, favicon);
+}
+
+static void
provide_favicon (EphyNode *node, GValue *value, gpointer user_data)
{
- EphyFaviconCache *cache;
- const char *icon_location;
- GdkPixbuf *pixbuf = NULL;
+ const char *page_location;
+ GdkPixbuf *favicon = NULL;
- cache = EPHY_FAVICON_CACHE
- (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
- icon_location = ephy_node_get_property_string
- (node, EPHY_NODE_BMK_PROP_ICON);
+ page_location = ephy_node_get_property_string
+ (node, EPHY_NODE_BMK_PROP_LOCATION);
- LOG ("Get favicon for %s", icon_location ? icon_location : "None");
+ LOG ("Get favicon for %s", page_location ? page_location : "None");
- if (icon_location)
- {
- pixbuf = ephy_favicon_cache_get (cache, icon_location);
- }
+ if (page_location)
+ {
+ WebKitFaviconDatabase *database = webkit_get_favicon_database ();
+
+ /* Try with the sync version first as this method will be frequently called. */
+ favicon = webkit_favicon_database_try_get_favicon_pixbuf (database, page_location,
+ FAVICON_SIZE, FAVICON_SIZE);
+
+ if (!favicon && webkit_favicon_database_get_favicon_uri (database, page_location))
+ webkit_favicon_database_get_favicon_pixbuf (database, page_location,
+ FAVICON_SIZE, FAVICON_SIZE, NULL,
+ (GAsyncReadyCallback) icon_loaded_cb, value);
+ }
g_value_init (value, GDK_TYPE_PIXBUF);
- g_value_take_object (value, pixbuf);
+ g_value_take_object (value, favicon);
}
static void
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index e3f25bd..9b6507e 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -21,8 +21,8 @@
#include "config.h"
#include "ephy-completion-model.h"
+#include "ephy-embed-prefs.h"
#include "ephy-embed-shell.h"
-#include "ephy-favicon-cache.h"
#include "ephy-history.h"
#include "ephy-history-service.h"
#include "ephy-shell.h"
@@ -36,7 +36,6 @@ G_DEFINE_TYPE (EphyCompletionModel, ephy_completion_model, GTK_TYPE_LIST_STORE)
struct _EphyCompletionModelPrivate {
EphyHistoryService *history_service;
EphyHistory *legacy_history_service;
- EphyFaviconCache *favicon_cache;
EphyNode *bookmarks;
GSList *search_terms;
@@ -99,7 +98,6 @@ ephy_completion_model_init (EphyCompletionModel *model)
priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (embed_shell));
priv->legacy_history_service = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
- priv->favicon_cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache (embed_shell));
bookmarks_service = ephy_shell_get_bookmarks (ephy_shell);
priv->bookmarks = ephy_bookmarks_get_bookmarks (bookmarks_service);
@@ -165,22 +163,69 @@ typedef struct {
gboolean is_bookmark;
} PotentialRow;
+typedef struct {
+ GtkListStore *model;
+ GtkTreeRowReference *row_reference;
+} IconLoadData;
+
+
+static void
+icon_loaded_cb (GObject *source, GAsyncResult *result, gpointer user_data)
+{
+ GtkTreeIter iter;
+ IconLoadData *data = (IconLoadData *) user_data;
+ GdkPixbuf *favicon = webkit_favicon_database_get_favicon_pixbuf_finish (webkit_get_favicon_database (), result, NULL);
+
+ if (favicon) {
+ /* The completion model might have changed its contents */
+ if (gtk_tree_row_reference_valid (data->row_reference)) {
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (data->model), &iter,
+ gtk_tree_row_reference_get_path (data->row_reference));
+ gtk_list_store_set (data->model, &iter, EPHY_COMPLETION_FAVICON_COL, favicon, -1);
+ }
+ }
+
+ g_object_unref (data->model);
+ gtk_tree_row_reference_free (data->row_reference);
+ g_slice_free (IconLoadData, data);
+}
+
static void
set_row_in_model (EphyCompletionModel *model, int position, PotentialRow *row)
{
- const char *favicon_location = ephy_history_get_icon (model->priv->legacy_history_service,
- row->location);
+ GtkTreeIter iter;
+ GdkPixbuf *favicon;
+ GtkTreePath *path;
+ IconLoadData *data;
+ WebKitFaviconDatabase* database = webkit_get_favicon_database ();
- gtk_list_store_insert_with_values (GTK_LIST_STORE (model), NULL, position,
+ gtk_list_store_insert_with_values (GTK_LIST_STORE (model), &iter, position,
EPHY_COMPLETION_TEXT_COL, row->title ? row->title : "",
EPHY_COMPLETION_URL_COL, row->location,
EPHY_COMPLETION_ACTION_COL, row->location,
EPHY_COMPLETION_KEYWORDS_COL, row->keywords ? row->keywords : "",
EPHY_COMPLETION_EXTRA_COL, row->is_bookmark,
- EPHY_COMPLETION_FAVICON_COL, ephy_favicon_cache_get (model->priv->favicon_cache,
- favicon_location),
EPHY_COMPLETION_RELEVANCE_COL, row->relevance,
-1);
+
+ /* We try first with the try_get_favicon_pixbuf() because if the icon
+ is in the DB it's faster than the async version. */
+ favicon = webkit_favicon_database_try_get_favicon_pixbuf (database, row->location,
+ FAVICON_SIZE, FAVICON_SIZE);
+ if (favicon) {
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, EPHY_COMPLETION_FAVICON_COL, favicon, -1);
+ return;
+ }
+
+ data = g_slice_new (IconLoadData);
+ data->model = GTK_LIST_STORE (g_object_ref(model));
+ path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter);
+ data->row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (model), path);
+ gtk_tree_path_free (path);
+
+ webkit_favicon_database_get_favicon_pixbuf (webkit_get_favicon_database (), row->location,
+ FAVICON_SIZE, FAVICON_SIZE, NULL,
+ icon_loaded_cb, data);
}
static void
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 5ddb0cb..39783b5 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -26,7 +26,6 @@
#include "ephy-bookmarks-ui.h"
#include "ephy-debug.h"
#include "ephy-dnd.h"
-#include "ephy-favicon-cache.h"
#include "ephy-file-helpers.h"
#include "ephy-gui.h"
#include "ephy-hosts-store.h"
@@ -870,21 +869,22 @@ delete_event_cb (EphyHistoryWindow *editor)
static void
provide_favicon (EphyNode *node, GValue *value, gpointer user_data)
{
- EphyFaviconCache *cache;
- const char *icon_location;
+ const char *page_location;
GdkPixbuf *pixbuf = NULL;
- cache = EPHY_FAVICON_CACHE
- (ephy_embed_shell_get_favicon_cache (EPHY_EMBED_SHELL (ephy_shell)));
- icon_location = ephy_node_get_property_string
- (node, EPHY_NODE_PAGE_PROP_ICON);
+ page_location = ephy_node_get_property_string
+ (node, EPHY_NODE_PAGE_PROP_LOCATION);
- LOG ("Get favicon for %s", icon_location ? icon_location : "None");
+ LOG ("Get favicon for %s", page_location ? page_location : "None");
- if (icon_location)
- {
- pixbuf = ephy_favicon_cache_get (cache, icon_location);
- }
+ if (page_location)
+ {
+ /* No need to use the async version as this function will be
+ called many times by the treeview. */
+ WebKitFaviconDatabase *database = webkit_get_favicon_database ();
+ pixbuf = webkit_favicon_database_get_favicon_pixbuf (database, page_location,
+ FAVICON_SIZE, FAVICON_SIZE);
+ }
g_value_init (value, GDK_TYPE_PIXBUF);
g_value_take_object (value, pixbuf);
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 6964cef..510017a 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -30,7 +30,6 @@
#include "ephy-embed-single.h"
#include "ephy-embed-utils.h"
#include "ephy-extensions-manager.h"
-#include "ephy-favicon-cache.h"
#include "ephy-file-helpers.h"
#include "ephy-gui.h"
#include "ephy-history-window.h"
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 4f0139e..24d0758 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -33,7 +33,6 @@
#include "ephy-debug.h"
#include "ephy-time-helpers.h"
#include "ephy-embed-single.h"
-#include "ephy-favicon-cache.h"
#include "ephy-history-service.h"
#include "ephy-password-info.h"
@@ -284,7 +283,6 @@ clear_all_dialog_response_cb (GtkDialog *dialog,
{
EphyEmbedShell *shell;
EphyEmbedSingle *single;
- EphyFaviconCache *cache;
shell = ephy_embed_shell_get_default ();
@@ -292,8 +290,7 @@ clear_all_dialog_response_cb (GtkDialog *dialog,
ephy_embed_single_clear_cache (single);
- cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache (shell));
- ephy_favicon_cache_clear (cache);
+ webkit_favicon_database_clear (webkit_get_favicon_database ());
}
}
gtk_widget_destroy (GTK_WIDGET (dialog));
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 7c3ec5c..d3c0c09 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -31,7 +31,6 @@
#include "ephy-embed-single.h"
#include "ephy-embed-utils.h"
#include "ephy-encodings.h"
-#include "ephy-favicon-cache.h"
#include "ephy-file-chooser.h"
#include "ephy-file-helpers.h"
#include "ephy-gui.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]