aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2007-12-20 05:46:55 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-12-20 05:46:55 +0800
commitea01b45780e5e3eecb2a55b94af5b541c20322be (patch)
tree729060e6d96bea2dafd639a629416baed01fc1a8
parent77a871ac0d7fe76058362e081a150d09f1b92873 (diff)
downloadgsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.tar
gsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.tar.gz
gsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.tar.bz2
gsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.tar.lz
gsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.tar.xz
gsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.tar.zst
gsoc2013-epiphany-ea01b45780e5e3eecb2a55b94af5b541c20322be.zip
Middle click on entries in History Window and Bookmark Editor opens the page
in a new tab. Close bug #385037. svn path=/trunk/; revision=7791
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c23
-rw-r--r--src/ephy-history-window.c23
2 files changed, 46 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index ac2159f71..0ebe927ab 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1281,6 +1281,25 @@ ephy_bookmarks_editor_node_activated_cb (GtkWidget *view,
}
static void
+ephy_bookmarks_editor_node_middle_clicked_cb (GtkWidget *view,
+ EphyNode *node,
+ EphyBookmarksEditor *editor)
+{
+ EphyWindow *window;
+ const char *location;
+
+ window = EPHY_WINDOW (get_target_window (editor));
+
+ location = ephy_node_get_property_string
+ (node, EPHY_NODE_BMK_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_bookmarks_editor_update_menu (EphyBookmarksEditor *editor)
{
gboolean open_in_window, open_in_tab,
@@ -1971,6 +1990,10 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
G_CALLBACK (ephy_bookmarks_editor_node_activated_cb),
editor);
g_signal_connect (G_OBJECT (bm_view),
+ "node_middle_clicked",
+ G_CALLBACK (ephy_bookmarks_editor_node_middle_clicked_cb),
+ editor);
+ g_signal_connect (G_OBJECT (bm_view),
"popup_menu",
G_CALLBACK (ephy_bookmarks_editor_show_popup_cb),
editor);
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);