[epiphany] Move the clear cache method to EphyEmbedShell
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Move the clear cache method to EphyEmbedShell
- Date: Thu, 21 Mar 2013 12:35:31 +0000 (UTC)
commit 6f0c6b15e006dc4ad85b2ea5e3b688164d335de1
Author: Xan Lopez <xan igalia com>
Date: Thu Mar 21 13:31:03 2013 +0100
Move the clear cache method to EphyEmbedShell
EphyEmbedSingle is almost dead!
embed/ephy-embed-shell.c | 12 ++++++++++++
embed/ephy-embed-shell.h | 2 ++
embed/ephy-embed-single.c | 11 -----------
embed/ephy-embed-single.h | 2 --
src/pdm-dialog.c | 7 ++-----
5 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index b775075..e64fab8 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 85e7df5..67a60a7 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 d8af4fd..f9f8bc7 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 1e2b032..517a0b0 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 33a5c46..d6a3279 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
());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]