aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-01-24 22:01:06 +0800
committerXan Lopez <xan@igalia.com>2012-01-24 22:01:06 +0800
commit22f2e807d040d2d0f51e53e1f022a40d82fc1a24 (patch)
tree660ae156c01417ceb724140784218e1c12819a67 /src/ephy-window.c
parentfe562478cc9fc4e2fc53edb44f39c33f0a063685 (diff)
downloadgsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.tar
gsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.tar.gz
gsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.tar.bz2
gsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.tar.lz
gsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.tar.xz
gsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.tar.zst
gsoc2013-epiphany-22f2e807d040d2d0f51e53e1f022a40d82fc1a24.zip
Make EphyWindow responsible for its own destruction when the last tab is gone
EphyNotebook was destroying its toplevel when the last tab was destroyed. I think this is really weird, so move the responsibility to the window. This will probably break something, I'm sure.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0575f8ea3..7cfe703d7 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2730,6 +2730,13 @@ notebook_page_close_request_cb (EphyNotebook *notebook,
{
gtk_widget_destroy (GTK_WIDGET (embed));
}
+
+ /* If that was the last tab, destroy the window. */
+ if (gtk_notebook_get_n_pages (priv->notebook) == 0)
+ {
+ gtk_widget_destroy (GTK_WIDGET (window));
+ }
+
}
static GtkWidget *