aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-03-08 18:00:56 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-03-13 16:14:03 +0800
commitf4ed0fb98f033727eb22f62ddb3ba60424c8cc91 (patch)
tree94d2eccf85ff338173aa619d65251ec1f072e8b5 /src
parent12c233832347dddfe64ac842998e043692ecb2be (diff)
downloadgsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.tar
gsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.tar.gz
gsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.tar.bz2
gsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.tar.lz
gsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.tar.xz
gsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.tar.zst
gsoc2013-epiphany-f4ed0fb98f033727eb22f62ddb3ba60424c8cc91.zip
ephy-history-view: open pages in a new tab on middle click
This was present in the old EphyNodeView history. Bring it back. https://bugzilla.gnome.org/show_bug.cgi?id=671635
Diffstat (limited to 'src')
-rw-r--r--src/ephy-history-window.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 228c61eb0..0601278c6 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -576,26 +576,23 @@ ephy_history_window_row_activated_cb (GtkTreeView *view,
ephy_history_url_free (url);
}
-#if 0
static void
-ephy_history_window_node_middle_clicked_cb (GtkWidget *view,
- EphyNode *node,
- EphyHistoryWindow *editor)
+ephy_history_window_row_middle_clicked_cb (EphyHistoryView *view,
+ GtkTreePath *path,
+ EphyHistoryWindow *editor)
{
EphyWindow *window;
- const char *location;
+ EphyHistoryURL *url;
window = EPHY_WINDOW (get_target_window (editor));
+ url = ephy_urls_store_get_url_from_path (editor->priv->urls_store, path);
+ g_return_if_fail (url != NULL);
- 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_shell_new_tab (ephy_shell, window, NULL, url->url,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+ ephy_history_url_free (url);
}
-#endif
static void
ephy_history_window_update_menu (EphyHistoryWindow *editor)
@@ -1270,6 +1267,9 @@ ephy_history_window_constructed (GObject *object)
"row-activated",
G_CALLBACK (ephy_history_window_row_activated_cb),
editor);
+ g_signal_connect (pages_view, "row-middle-clicked",
+ G_CALLBACK (ephy_history_window_row_middle_clicked_cb),
+ editor);
g_signal_connect (G_OBJECT (pages_view),
"popup_menu",
G_CALLBACK (ephy_history_window_show_popup_cb),