diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-12-01 04:48:17 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-12-01 04:48:17 +0800 |
commit | 0ed3933fdf105e7b9ecfd384190f155b225d3630 (patch) | |
tree | 941a8e160ac65e8713cda2528a6fc9d4ed378046 /src | |
parent | a7714b9a77a7edc00383d0b2f9b803b8d5bfdaa7 (diff) | |
download | gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.tar gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.tar.gz gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.tar.bz2 gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.tar.lz gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.tar.xz gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.tar.zst gsoc2013-epiphany-0ed3933fdf105e7b9ecfd384190f155b225d3630.zip |
ephy-window: connect web view to web-view-ready signal when it's created.
Otherwise we rely on the view to be in the active tab in order for us
to be listening to the signal. That's the case right now, but could
change if we implement "always open in new tab" functionality.
svn path=/trunk/; revision=8628
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 4176d78cb..f5211c2e7 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2435,6 +2435,7 @@ create_web_view_cb (WebKitWebView *web_view, EphyWindow *window) { EphyEmbed *embed; + WebKitWebView *new_web_view; embed = ephy_shell_new_tab_full (ephy_shell_get_default (), NULL, NULL, NULL, @@ -2444,7 +2445,12 @@ create_web_view_cb (WebKitWebView *web_view, FALSE, 0); - return EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed); + new_web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed); + g_signal_connect_object (new_web_view, "web-view-ready", + G_CALLBACK (web_view_ready_cb), + NULL, 0); + + return new_web_view; } static void @@ -2476,9 +2482,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed) g_signal_handlers_disconnect_by_func (web_view, G_CALLBACK (create_web_view_cb), window); - g_signal_handlers_disconnect_by_func (web_view, - G_CALLBACK (web_view_ready_cb), - NULL); g_signal_handlers_disconnect_by_func (embed, G_CALLBACK (sync_tab_popup_windows), @@ -2563,9 +2566,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed) g_signal_connect_object (web_view, "create-web-view", G_CALLBACK (create_web_view_cb), window, 0); - g_signal_connect_object (web_view, "web-view-ready", - G_CALLBACK (web_view_ready_cb), - NULL, 0); g_signal_connect_object (embed, "notify::hidden-popup-count", G_CALLBACK (sync_tab_popup_windows), |