aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-history.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-11 22:17:24 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-11 22:17:24 +0800
commit3307a35bc76131d03e392f4e87a9baddc3b3c883 (patch)
tree57bfaf008c0fda4e902d1ec035c3190a07207a4d /embed/ephy-history.c
parent30511d4441c2f5238737ac57dc165b00e558942c (diff)
downloadgsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.tar
gsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.tar.gz
gsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.tar.bz2
gsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.tar.lz
gsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.tar.xz
gsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.tar.zst
gsoc2013-epiphany-3307a35bc76131d03e392f4e87a9baddc3b3c883.zip
Implement history deletion on per-site basis. Fixes bug #116609.
2004-11-11 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-history.c: (remove_pages_from_host_cb), (connect_page_removed_from_host), (ephy_history_get_host): * src/ephy-history-window.c: (cmd_delete), (ephy_history_window_construct): * src/ephy-window.c: (ephy_window_fullscreen): Implement history deletion on per-site basis. Fixes bug #116609.
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r--embed/ephy-history.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 4fc3e9f56..e8ef6c007 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -434,6 +434,24 @@ page_removed_from_host_cb (EphyNode *node,
}
static void
+remove_pages_from_host_cb (EphyNode *host,
+ EphyHistory *eh)
+{
+ GPtrArray *children;
+ EphyNode *site;
+ int i;
+
+ children = ephy_node_get_children (host);
+
+ for (i = (int) children->len - 1; i >= 0; i--)
+ {
+ site = g_ptr_array_index (children, i);
+
+ ephy_node_unref (site);
+ }
+}
+
+static void
connect_page_removed_from_host (char *url,
EphyNode *node,
EphyHistory *eb)
@@ -444,6 +462,10 @@ connect_page_removed_from_host (char *url,
EPHY_NODE_CHILD_REMOVED,
(EphyNodeCallback) page_removed_from_host_cb,
G_OBJECT (eb));
+ ephy_node_signal_connect_object (node,
+ EPHY_NODE_DESTROY,
+ (EphyNodeCallback) remove_pages_from_host_cb,
+ G_OBJECT (eb));
}
static void
@@ -704,6 +726,10 @@ ephy_history_get_host (EphyHistory *eh, const char *url)
EPHY_NODE_CHILD_REMOVED,
(EphyNodeCallback) page_removed_from_host_cb,
G_OBJECT (eh));
+ ephy_node_signal_connect_object (host,
+ EPHY_NODE_DESTROY,
+ (EphyNodeCallback) remove_pages_from_host_cb,
+ G_OBJECT (eh));
g_value_init (&value, G_TYPE_STRING);
g_value_set_string (&value, host_name);