aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-history-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r--src/ephy-history-window.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index f535ee6ef..42164e5dd 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -693,6 +693,25 @@ ephy_history_window_node_activated_cb (GtkWidget *view,
}
static void
+ephy_history_window_node_middle_clicked_cb (GtkWidget *view,
+ EphyNode *node,
+ EphyHistoryWindow *editor)
+{
+ EphyWindow *window;
+ const char *location;
+
+ window = EPHY_WINDOW (get_target_window (editor));
+
+ location = ephy_node_get_property_string
+ (node, EPHY_NODE_PAGE_PROP_LOCATION);
+ g_return_if_fail (location != NULL);
+
+ ephy_shell_new_tab (ephy_shell, window, NULL, location,
+ EPHY_NEW_TAB_OPEN_PAGE |
+ EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+}
+
+static void
ephy_history_window_update_menu (EphyHistoryWindow *editor)
{
gboolean open_in_window, open_in_tab;
@@ -1467,6 +1486,10 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
G_CALLBACK (ephy_history_window_node_activated_cb),
editor);
g_signal_connect (G_OBJECT (pages_view),
+ "node-middle-clicked",
+ G_CALLBACK (ephy_history_window_node_middle_clicked_cb),
+ editor);
+ g_signal_connect (G_OBJECT (pages_view),
"popup_menu",
G_CALLBACK (ephy_history_window_show_popup_cb),
editor);