aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--embed/ephy-history.c26
-rw-r--r--src/ephy-history-window.c24
3 files changed, 60 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e19db6dc..3c628e966 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
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.
+
+2004-11-11 Christian Persch <chpe@cvs.gnome.org>
+
* src/prefs-dialog.c:
Change column order for the languages list in the code.
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);
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index a3f53a064..d8796c9be 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -65,6 +65,9 @@
#include "ephy-session.h"
#include "ephy-favicon-cache.h"
#include "eel-gconf-extensions.h"
+#include "ephy-node.h"
+#include "ephy-node-common.h"
+#include "ephy-node-view.h"
static GtkTargetEntry page_drag_types [] =
{
@@ -448,6 +451,23 @@ cmd_delete (GtkAction *action,
{
ephy_node_view_remove (EPHY_NODE_VIEW (editor->priv->pages_view));
}
+ else if (ephy_node_view_is_target (EPHY_NODE_VIEW (editor->priv->sites_view)))
+ {
+ EphyNodePriority priority;
+ GList *selected;
+ EphyNode *node;
+
+ selected = ephy_node_view_get_selection (EPHY_NODE_VIEW (editor->priv->sites_view));
+ node = selected->data;
+ priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY);
+
+ if (priority == -1) priority = EPHY_NODE_NORMAL_PRIORITY;
+
+ if (priority == EPHY_NODE_NORMAL_PRIORITY)
+ {
+ ephy_node_view_remove (EPHY_NODE_VIEW (editor->priv->sites_view));
+ }
+ }
}
static void
@@ -1259,6 +1279,10 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
"node_selected",
G_CALLBACK (site_node_selected_cb),
editor);
+ g_signal_connect (G_OBJECT (sites_view),
+ "key_press_event",
+ G_CALLBACK (key_pressed_cb),
+ editor);
g_signal_connect (G_OBJECT (selection),
"changed",
G_CALLBACK (view_selection_changed_cb),