aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-14 19:35:15 +0800
committerXan Lopez <xan@igalia.com>2012-03-14 19:45:07 +0800
commit9d0c171675a92fb30e8bc45f73a513e5dc86912e (patch)
tree5b56b354f137573068bff8f7e18a617f60a99785 /embed/ephy-web-view.c
parent4f4df6f74af2bd387857f81845bc53a55abbe460 (diff)
downloadgsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar.gz
gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar.zst
gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.zip
ephy-web-view: let EphyWebView clear its own history
No point in doing it from EphyEmbed.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 915807187..5759eabbc 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1035,10 +1035,21 @@ _ephy_web_view_hook_into_links (EphyWebView *web_view)
}
static void
+ephy_web_view_history_cleared_cb (EphyHistoryService *history_service,
+ EphyWebView *view)
+{
+ ephy_web_view_clear_history (view);
+}
+
+static void
ephy_web_view_finalize (GObject *object)
{
EphyWebViewPrivate *priv = EPHY_WEB_VIEW (object)->priv;
+ g_signal_handlers_disconnect_by_func (priv->history_service,
+ ephy_web_view_history_cleared_cb,
+ EPHY_WEB_VIEW (object));
+
if (priv->icon != NULL) {
g_object_unref (priv->icon);
priv->icon = NULL;
@@ -2225,6 +2236,10 @@ ephy_web_view_init (EphyWebView *web_view)
priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (embed_shell));
+ g_signal_connect (priv->history_service,
+ "cleared", G_CALLBACK (ephy_web_view_history_cleared_cb),
+ web_view);
+
g_signal_connect (web_view, "mime-type-policy-decision-requested",
G_CALLBACK (mime_type_policy_decision_requested_cb),
NULL);