[epiphany] Make EphyWindow responsible for its own destruction when the last tab is gone
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Make EphyWindow responsible for its own destruction when the last tab is gone
- Date: Tue, 24 Jan 2012 14:02:17 +0000 (UTC)
commit 22f2e807d040d2d0f51e53e1f022a40d82fc1a24
Author: Xan Lopez <xan igalia com>
Date: Tue Jan 24 15:01:06 2012 +0100
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.
src/ephy-notebook.c | 6 ------
src/ephy-window.c | 7 +++++++
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index b229fb4..686cfe9 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -800,10 +800,4 @@ ephy_notebook_remove (GtkContainer *container,
GTK_CONTAINER_CLASS (ephy_notebook_parent_class)->remove (container, tab_widget);
update_tabs_visibility (notebook, FALSE);
-
- /* if that was the last tab, destroy the window */
- if (gtk_notebook_get_n_pages (gnotebook) == 0)
- {
- gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (notebook)));
- }
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0575f8e..7cfe703 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]