aboutsummaryrefslogtreecommitdiffstats
path: root/src/session.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/session.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/session.c')
-rw-r--r--src/session.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/session.c b/src/session.c
index 4f1c8e8d5..7718586b3 100644
--- a/src/session.c
+++ b/src/session.c
@@ -133,9 +133,10 @@ session_class_init (SessionClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (SessionClass, close_window),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE,
- 0);
+ 1,
+ G_TYPE_OBJECT);
}
static char *
@@ -681,11 +682,15 @@ void
session_remove_window (Session *session,
EphyWindow *window)
{
+ g_object_ref (window);
+
+ session->priv->windows = g_list_remove (session->priv->windows, window);
+
g_signal_emit (G_OBJECT (session),
session_signals[CLOSE_WINDOW],
- 0);
+ 0, window);
- session->priv->windows = g_list_remove (session->priv->windows, window);
+ g_object_unref (window);
/* autodestroy of the session, necessay to avoid
* conflicts with the nautilus view */