aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2013-03-21 20:31:03 +0800
committerXan Lopez <xan@igalia.com>2013-03-21 20:31:03 +0800
commit6f0c6b15e006dc4ad85b2ea5e3b688164d335de1 (patch)
treee72e9e0de474cb89f3445bc1c1a24a3d490b66fa
parent67eff917589e8b6e7add001e7b3e910e3ea25cce (diff)
downloadgsoc2013-epiphany-6f0c6b15e006dc4ad85b2ea5e3b688164d335de1.tar.gz
gsoc2013-epiphany-6f0c6b15e006dc4ad85b2ea5e3b688164d335de1.tar.zst
gsoc2013-epiphany-6f0c6b15e006dc4ad85b2ea5e3b688164d335de1.zip
Move the clear cache method to EphyEmbedShell
EphyEmbedSingle is almost dead!
-rw-r--r--embed/ephy-embed-shell.c12
-rw-r--r--embed/ephy-embed-shell.h2
-rw-r--r--embed/ephy-embed-single.c11
-rw-r--r--embed/ephy-embed-single.h2
-rw-r--r--src/pdm-dialog.c7
5 files changed, 16 insertions, 18 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index b775075fc..e64fab833 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -856,3 +856,15 @@ ephy_embed_shell_get_web_extension_proxy (EphyEmbedShell *shell)
return shell->priv->web_extension;
}
#endif
+
+/**
+ * ephy_embed_shell_clear_cache:
+ * @shell: an #EphyEmbedShell
+ *
+ * Clears the HTTP cache (temporarily saved web pages).
+ **/
+void
+ephy_embed_shell_clear_cache (EphyEmbedShell *shell)
+{
+ webkit_web_context_clear_cache (webkit_web_context_get_default ());
+}
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index 85e7df52c..67a60a7c2 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -102,6 +102,8 @@ gboolean ephy_embed_shell_launch_handler (EphyEmbedShell
GFile *file,
const char *mime_type,
guint32 user_time);
+void ephy_embed_shell_clear_cache (EphyEmbedShell *shell);
+
#ifdef HAVE_WEBKIT2
GDBusProxy *ephy_embed_shell_get_web_extension_proxy (EphyEmbedShell *shell);
#endif
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index d8af4fd2d..f9f8bc7c4 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -147,14 +147,3 @@ ephy_embed_single_initialize (EphyEmbedSingle *single)
return TRUE;
}
-/**
- * ephy_embed_single_clear_cache:
- * @single: the #EphyEmbedSingle
- *
- * Clears the HTTP cache (temporarily saved web pages).
- **/
-void
-ephy_embed_single_clear_cache (EphyEmbedSingle *single)
-{
- webkit_web_context_clear_cache (webkit_web_context_get_default ());
-}
diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h
index 1e2b032de..517a0b09b 100644
--- a/embed/ephy-embed-single.h
+++ b/embed/ephy-embed-single.h
@@ -53,8 +53,6 @@ GType ephy_embed_single_get_type (void);
gboolean ephy_embed_single_initialize (EphyEmbedSingle *single);
-void ephy_embed_single_clear_cache (EphyEmbedSingle *single);
-
G_END_DECLS
#endif
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 33a5c46a8..d6a3279e6 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -31,7 +31,7 @@
#include "ephy-string.h"
#include "ephy-debug.h"
#include "ephy-time-helpers.h"
-#include "ephy-embed-single.h"
+#include "ephy-embed-shell.h"
#include "ephy-history-service.h"
#include <gtk/gtk.h>
@@ -276,14 +276,11 @@ clear_all_dialog_response_cb (GtkDialog *dialog,
(GTK_TOGGLE_BUTTON (checkbuttons->checkbutton_cache)))
{
EphyEmbedShell *shell;
- EphyEmbedSingle *single;
WebKitFaviconDatabase *database;
shell = ephy_embed_shell_get_default ();
- single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (shell));
-
- ephy_embed_single_clear_cache (single);
+ ephy_embed_shell_clear_cache (shell);
#ifdef HAVE_WEBKIT2
database = webkit_web_context_get_favicon_database (webkit_web_context_get_default ());