diff options
author | Xan Lopez <xan@gnome.org> | 2010-01-09 03:27:19 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-01-09 03:28:58 +0800 |
commit | 344ad68544ea313f54409fc72c0d8782152d0084 (patch) | |
tree | b48e464bb4af838b89e1bce3c897dbad4a91bb28 /src | |
parent | 41408b64330a96953b453c8bb6a3773abbfc64a4 (diff) | |
download | gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.tar gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.tar.gz gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.tar.bz2 gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.tar.lz gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.tar.xz gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.tar.zst gsoc2013-epiphany-344ad68544ea313f54409fc72c0d8782152d0084.zip |
Emit again EphyWebView::ge-new-window when required
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-window.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 4d339ca83..6de59f999 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2447,14 +2447,15 @@ ephy_window_set_is_popup (EphyWindow *window, static gboolean web_view_ready_cb (WebKitWebView *web_view, - gpointer user_data) + WebKitWebView *parent_web_view) { - EphyWindow *window; + EphyWindow *window, *parent_view_window; gboolean using_new_window; - using_new_window = GPOINTER_TO_INT (user_data); - window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (web_view))); + parent_view_window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (parent_web_view))); + + using_new_window = window != parent_view_window; if (using_new_window) { @@ -2493,6 +2494,8 @@ web_view_ready_cb (WebKitWebView *web_view, update_chromes_actions (window); sync_chromes_visibility (window); + + g_signal_emit_by_name (parent_web_view, "ge-new-window", web_view); } gtk_widget_show (GTK_WIDGET (window)); @@ -2509,7 +2512,6 @@ create_web_view_cb (WebKitWebView *web_view, WebKitWebView *new_web_view; EphyNewTabFlags flags; EphyWindow *parent_window; - gboolean using_new_window; if (eel_gconf_get_boolean (CONF_INTERFACE_OPEN_NEW_WINDOWS_IN_TAB)) { @@ -2533,12 +2535,10 @@ create_web_view_cb (WebKitWebView *web_view, TRUE, /* is popup? */ 0); - using_new_window = parent_window == NULL; - new_web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed); g_signal_connect (new_web_view, "web-view-ready", G_CALLBACK (web_view_ready_cb), - GINT_TO_POINTER (using_new_window)); + web_view); return new_web_view; } |