aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2003-08-02 21:11:02 +0800
committerChristian Persch <chpe@src.gnome.org>2003-08-02 21:11:02 +0800
commit9279c6b1a75518e24ef9c57b9f9113efa90a6cd6 (patch)
tree61d3e7d36b87f7301323ca15aa9eb6ac151002b9 /src/ephy-window.c
parent01b6a293d1724b772609c97ad8cdea49cb7ff53e (diff)
downloadgsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.tar
gsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.tar.gz
gsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.tar.bz2
gsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.tar.lz
gsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.tar.xz
gsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.tar.zst
gsoc2013-epiphany-9279c6b1a75518e24ef9c57b9f9113efa90a6cd6.zip
2003-08-02 Christian Persch
* src/ephy-encodings-menu.c: (build_group): Fix ui xml string. * src/ephy-tabs-menu.c: (ephy_tabs_menu_update): Fix mem leak. * src/ephy-window.c: (remove_from_session), (ephy_window_destroy), (ephy_window_finalize): * src/session.h: * src/session.c: (session_class_init), (session_remove_window): Move up the removal of the window from the session to when it's still valid and non-finalised. Include the window as parameter in the close signal of the session.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 1f58e3bb3..8195b3135 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -332,13 +332,29 @@ ephy_window_get_type (void)
}
static void
+remove_from_session (EphyWindow *window)
+{
+ Session *session;
+
+ session = SESSION (ephy_shell_get_session (ephy_shell));
+ g_return_if_fail (session != NULL);
+
+ session_remove_window (session, window);
+}
+
+static void
ephy_window_destroy (GtkObject *gtkobject)
{
EphyWindow *window = EPHY_WINDOW (gtkobject);
LOG ("EphyWindow destroy %p", window)
- window->priv->closing = TRUE;
+ if (window->priv->closing == FALSE)
+ {
+ window->priv->closing = TRUE;
+
+ remove_from_session (window);
+ }
if (window->priv->exit_fullscreen_popup)
{
@@ -1435,17 +1451,6 @@ save_window_chrome (EphyWindow *window)
}
static void
-remove_from_session (EphyWindow *window)
-{
- Session *session;
-
- session = SESSION (ephy_shell_get_session (ephy_shell));
- g_return_if_fail (session != NULL);
-
- session_remove_window (session, window);
-}
-
-static void
ephy_window_finalize (GObject *object)
{
EphyWindow *window;
@@ -1456,8 +1461,6 @@ ephy_window_finalize (GObject *object)
g_return_if_fail (window->priv != NULL);
- remove_from_session (window);
-
if (window->priv->find_dialog)
{
g_object_unref (G_OBJECT (window->priv->find_dialog));