From ec9060610c40fef18534b414d1979f4359f59a5e Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 7 Aug 2005 21:47:11 +0000 Subject: Add way to clear the favicon cache. Also removes any extraneous files from 2005-08-07 Christian Persch * embed/ephy-favicon-cache.c: (icons_removed_cb), (remove_obsolete_icons), (delete_file), (ephy_favicon_cache_finalize), (ephy_favicon_cache_get), (ephy_favicon_cache_clear): * embed/ephy-favicon-cache.h: Add way to clear the favicon cache. Also removes any extraneous files from favicon cache directory. Fix a crash which I wonder why we never experienced it! * src/prefs-dialog.c: (prefs_clear_cache_button_clicked_cb): Also clear favicon cache when clearing the cache. --- src/prefs-dialog.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 42b71f257..c8e7187b0 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -25,7 +25,7 @@ #include "ephy-dialog.h" #include "ephy-prefs.h" #include "ephy-embed-shell.h" -#include "ephy-shell.h" +#include "ephy-favicon-cache.h" #include "ephy-session.h" #include "ephy-embed-prefs.h" #include "ephy-embed-single.h" @@ -1272,10 +1272,17 @@ void prefs_clear_cache_button_clicked_cb (GtkWidget *button, gpointer data) { + EphyEmbedShell *shell; EphyEmbedSingle *single; + EphyFaviconCache *cache; - single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell)); + shell = ephy_embed_shell_get_default (); + + single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (shell)); ephy_embed_single_clear_cache (single); + + cache = EPHY_FAVICON_CACHE (ephy_embed_shell_get_favicon_cache (shell)); + ephy_favicon_cache_clear (cache); } static void -- cgit v1.2.3