From 384588b86e68ea692a8f99db86b45ca0cc54f804 Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Tue, 6 Apr 2010 19:57:10 +0200 Subject: Make sure WebKitWebHistory is cleared when cleared EphyHistory Added new function in EphyWebView to clear the history from WebKitWebView, and connect to the 'cleared' signal in EphyEmbed to call to such a function when needed. Bug #539716 Signed-off-by: Xan Lopez --- embed/ephy-embed.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'embed/ephy-embed.c') diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 46ed19294..8f2c4738b 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -334,6 +334,13 @@ zoom_changed_cb (WebKitWebView *web_view, g_free (address); } +static void +ephy_embed_history_cleared_cb (EphyHistory *history, + EphyEmbed *embed) +{ + ephy_web_view_clear_history (EPHY_WEB_VIEW (embed->priv->web_view)); +} + static void ephy_embed_grab_focus (GtkWidget *widget) { @@ -360,6 +367,10 @@ ephy_embed_finalize (GObject *object) } g_slist_free (embed->priv->destroy_on_transition_list); + g_signal_handlers_disconnect_by_func (embed->priv->history, + ephy_embed_history_cleared_cb, + embed); + G_OBJECT_CLASS (ephy_embed_parent_class)->finalize (object); } @@ -956,6 +967,10 @@ ephy_embed_constructed (GObject *object) ephy_embed_prefs_add_embed (embed); embed->priv->history = EPHY_HISTORY (ephy_embed_shell_get_global_history (ephy_embed_shell_get_default ())); + + g_signal_connect (embed->priv->history, + "cleared", G_CALLBACK (ephy_embed_history_cleared_cb), + embed); } static void -- cgit