From 3307a35bc76131d03e392f4e87a9baddc3b3c883 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 11 Nov 2004 14:17:24 +0000 Subject: Implement history deletion on per-site basis. Fixes bug #116609. 2004-11-11 Christian Persch * 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. --- src/ephy-history-window.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src') 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), -- cgit v1.2.3