diff options
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 1a9ce6439..6b717a061 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1943,6 +1943,20 @@ load_status_cb (WebKitWebView *web_view, } } +static gboolean +close_web_view_cb (WebKitWebView *web_view, + gpointer user_data) +{ + EphyEmbedContainer *window; + GtkWidget *widget = gtk_widget_get_toplevel (GTK_WIDGET (web_view)); + window = EPHY_EMBED_CONTAINER (widget); + + if (ephy_embed_container_get_is_popup (window)) + gtk_widget_destroy (GTK_WIDGET (window)); + + return TRUE; +} + static void ephy_web_view_init (EphyWebView *web_view) { @@ -1978,6 +1992,10 @@ ephy_web_view_init (EphyWebView *web_view) G_CALLBACK (load_status_cb), NULL); + g_signal_connect (web_view, "close-web-view", + G_CALLBACK (close_web_view_cb), + NULL); + g_signal_connect_object (web_view, "icon-loaded", G_CALLBACK (favicon_cb), web_view, (GConnectFlags)0); |