aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2010-01-26 02:55:17 +0800
committerXan Lopez <xan@gnome.org>2010-01-26 03:03:01 +0800
commitc0b52d834cbc43fa7cbba5d92411d2114b8650c1 (patch)
tree3409e82f7c5490f8d7226f4dddab778f151dc58e /embed/ephy-web-view.c
parentcdac681c60058885ed3ea1ee43d878b1c00a61b6 (diff)
downloadgsoc2013-epiphany-c0b52d834cbc43fa7cbba5d92411d2114b8650c1.tar.gz
gsoc2013-epiphany-c0b52d834cbc43fa7cbba5d92411d2114b8650c1.tar.zst
gsoc2013-epiphany-c0b52d834cbc43fa7cbba5d92411d2114b8650c1.zip
ephy-web-view.c: allow all windows to be closed by JSactual-2.29.6
Since we are not marking windows as popups for now.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 62941358f..25f0f63b3 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1957,11 +1957,18 @@ close_web_view_cb (WebKitWebView *web_view,
gpointer user_data)
{
EphyEmbedContainer *window;
+ GList *children;
GtkWidget *widget = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
window = EPHY_EMBED_CONTAINER (widget);
- if (ephy_embed_container_get_is_popup (window))
+ children = ephy_embed_container_get_children (window);
+
+ if (g_list_length (children) == 1)
gtk_widget_destroy (GTK_WIDGET (window));
+ else
+ ephy_embed_container_remove_child (window, EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view));
+
+ g_list_free (children);
return TRUE;
}