aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-08-21 00:00:45 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-01 02:34:01 +0800
commit9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52 (patch)
treeca2f3c7a1c29da93fb04bd03b2e2b6c3a9235870 /src
parent38b410011b97e995ee7feb1c448e903d2f323098 (diff)
downloadgsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.tar
gsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.tar.gz
gsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.tar.bz2
gsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.tar.lz
gsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.tar.xz
gsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.tar.zst
gsoc2013-epiphany-9fe45e52bb0629bc28f50a62d3d9995f5a6a8e52.zip
ephy-window: handle open-link for the overview in the active tab
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index a710258c7..f28a62cd5 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2119,6 +2119,14 @@ ephy_window_visibility_cb (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *wind
}
static void
+overview_open_link_cb (EphyOverview *overview,
+ const char *url,
+ EphyWindow *window)
+{
+ ephy_link_open (EPHY_LINK (window), url, NULL, 0);
+}
+
+static void
ephy_window_set_is_popup (EphyWindow *window,
gboolean is_popup)
{
@@ -2559,6 +2567,7 @@ ephy_window_connect_active_embed (EphyWindow *window)
EphyEmbed *embed;
WebKitWebView *web_view;
EphyWebView *view;
+ EphyOverview *overview;
g_return_if_fail (window->priv->active_embed != NULL);
@@ -2655,6 +2664,11 @@ ephy_window_connect_active_embed (EphyWindow *window)
G_CALLBACK (ephy_window_visibility_cb),
window, 0);
+ overview = ephy_embed_get_overview (embed);
+ g_signal_connect_object (overview, "open-link",
+ G_CALLBACK (overview_open_link_cb),
+ window, 0);
+
g_object_notify (G_OBJECT (window), "active-child");
}
@@ -2664,6 +2678,7 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
EphyEmbed *embed;
WebKitWebView *web_view;
EphyWebView *view;
+ EphyOverview *overview;
guint sid;
g_return_if_fail (window->priv->active_embed != NULL);
@@ -2740,6 +2755,11 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
G_CALLBACK (ephy_window_visibility_cb),
window);
+ overview = ephy_embed_get_overview (embed);
+ g_signal_handlers_disconnect_by_func (overview,
+ G_CALLBACK (overview_open_link_cb),
+ window);
+
g_signal_handlers_disconnect_by_func
(view, G_CALLBACK (ephy_window_dom_mouse_click_cb), window);
}