diff options
author | Xan Lopez <xan@igalia.com> | 2012-03-14 19:35:15 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-03-14 19:45:07 +0800 |
commit | 9d0c171675a92fb30e8bc45f73a513e5dc86912e (patch) | |
tree | 5b56b354f137573068bff8f7e18a617f60a99785 | |
parent | 4f4df6f74af2bd387857f81845bc53a55abbe460 (diff) | |
download | gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar.gz gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar.bz2 gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar.lz gsoc2013-epiphany-9d0c171675a92fb30e8bc45f73a513e5dc86912e.tar.xz 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.
-rw-r--r-- | embed/ephy-embed.c | 15 | ||||
-rw-r--r-- | embed/ephy-web-view.c | 15 |
2 files changed, 15 insertions, 15 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index f1c4c87d5..e78b14fbd 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -381,13 +381,6 @@ zoom_changed_cb (WebKitWebView *web_view, } static void -ephy_embed_history_cleared_cb (EphyHistoryService *history_service, - EphyEmbed *embed) -{ - ephy_web_view_clear_history (EPHY_WEB_VIEW (embed->priv->web_view)); -} - -static void ephy_embed_grab_focus (GtkWidget *widget) { GtkWidget *child; @@ -465,10 +458,6 @@ ephy_embed_finalize (GObject *object) } g_slist_free (priv->destroy_on_transition_list); - g_signal_handlers_disconnect_by_func (priv->history_service, - ephy_embed_history_cleared_cb, - embed); - for (list = priv->messages; list; list = list->next) { EphyEmbedStatusbarMsg *msg; @@ -842,10 +831,6 @@ ephy_embed_constructed (GObject *object) priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ())); priv->history_service_cancellable = g_cancellable_new (); - - g_signal_connect (priv->history_service, - "cleared", G_CALLBACK (ephy_embed_history_cleared_cb), - embed); } static void 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); |