aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed.c
diff options
context:
space:
mode:
authorMario Sanchez Prada <msanchez@igalia.com>2010-04-07 01:57:10 +0800
committerXan Lopez <xan@gnome.org>2010-04-20 21:06:14 +0800
commit384588b86e68ea692a8f99db86b45ca0cc54f804 (patch)
tree728217ca375c3f379421f21c688c56a2cca16502 /embed/ephy-embed.c
parentbee24a63dcdbd0c974f04cd12c0ffbf352c7edc2 (diff)
downloadgsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.tar
gsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.tar.gz
gsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.tar.bz2
gsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.tar.lz
gsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.tar.xz
gsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.tar.zst
gsoc2013-epiphany-384588b86e68ea692a8f99db86b45ca0cc54f804.zip
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 <xan@gnome.org>
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r--embed/ephy-embed.c15
1 files changed, 15 insertions, 0 deletions
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
@@ -335,6 +335,13 @@ zoom_changed_cb (WebKitWebView *web_view,
}
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)
{
GtkWidget *child;
@@ -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