aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-09-25 02:45:03 +0800
committerChristian Persch <chpe@src.gnome.org>2003-09-25 02:45:03 +0800
commitf9b785e9f0e388bcebcfefdaf440b4c8a7773fb0 (patch)
treeba00836f282f6fe385a212e90e63b79361a85481
parentca8f357fd917b4cab36550fd837777b6b5b3caed (diff)
downloadgsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.tar
gsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.tar.gz
gsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.tar.bz2
gsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.tar.lz
gsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.tar.xz
gsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.tar.zst
gsoc2013-epiphany-f9b785e9f0e388bcebcfefdaf440b4c8a7773fb0.zip
Don't destroy the session when all windows are closed.
2003-09-24 Christian Persch <chpe@cvs.gnome.org> * src/ephy-shell.c: (ephy_shell_finalize), (ephy_shell_get_session): * src/session.c: (session_new), (save_tab), (parse_embed), (session_remove_window): Don't destroy the session when all windows are closed.
-rw-r--r--ChangeLog9
-rw-r--r--src/ephy-shell.c9
-rw-r--r--src/session.c26
3 files changed, 13 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index dbc61191b..1853b5f52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-09-24 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-shell.c: (ephy_shell_finalize),
+ (ephy_shell_get_session):
+ * src/session.c: (session_new), (save_tab), (parse_embed),
+ (session_remove_window):
+
+ Don't destroy the session when all windows are closed.
+
2003-09-24 Xan Lopez <xan@masilla.org>
* configure.in:
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index b70435892..a1c72d89a 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001, 2002 Marco Pesenti Gritti
+ * Copyright (C) 2000, 2001, 2002, 2003 Marco Pesenti Gritti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -300,10 +300,6 @@ ephy_shell_finalize (GObject *object)
LOG ("Unref session")
if (gs->priv->session)
{
- g_return_if_fail (EPHY_IS_SESSION(gs->priv->session));
- g_object_remove_weak_pointer
- (G_OBJECT(gs->priv->session),
- (gpointer *)&gs->priv->session);
g_object_unref (G_OBJECT (gs->priv->session));
}
@@ -558,9 +554,6 @@ ephy_shell_get_session (EphyShell *gs)
if (!gs->priv->session)
{
gs->priv->session = session_new ();
- g_object_add_weak_pointer
- (G_OBJECT(gs->priv->session),
- (gpointer *)&gs->priv->session);
}
return G_OBJECT (gs->priv->session);
diff --git a/src/session.c b/src/session.c
index 40daf1b66..48cffe7c4 100644
--- a/src/session.c
+++ b/src/session.c
@@ -428,11 +428,7 @@ session_finalize (GObject *object)
Session *
session_new (void)
{
- Session *t;
-
- t = EPHY_SESSION (g_object_new (EPHY_TYPE_SESSION, NULL));
-
- return t;
+ return EPHY_SESSION (g_object_new (EPHY_TYPE_SESSION, NULL));
}
static void
@@ -443,7 +439,6 @@ save_tab (EphyWindow *window,
{
EmbedChromeMask chrome;
char *location;
- const char *title;
xmlNodePtr embed_node;
EphyEmbed *embed;
@@ -453,12 +448,7 @@ save_tab (EphyWindow *window,
if (chrome & EMBED_CHROME_OPENASCHROME) return;
/* make a new XML node */
- embed_node = xmlNewDocNode (doc, NULL,
- "embed", NULL);
-
- /* store title in the node */
- title = ephy_tab_get_title (tab);
- xmlSetProp (embed_node, "title", title);
+ embed_node = xmlNewDocNode (doc, NULL, "embed", NULL);
/* otherwise, use the actual location. */
embed = ephy_tab_get_embed (tab);
@@ -553,13 +543,11 @@ parse_embed (xmlNodePtr child, EphyWindow *window)
{
if (strcmp (child->name, "embed") == 0)
{
- char *url;
- char *title;
+ xmlChar *url;
g_return_if_fail (window != NULL);
url = xmlGetProp (child, "url");
- title = xmlGetProp (child, "title");
ephy_shell_new_tab (ephy_shell, window, NULL, url,
EPHY_NEW_TAB_IN_EXISTING_WINDOW |
@@ -567,7 +555,6 @@ parse_embed (xmlNodePtr child, EphyWindow *window)
EPHY_NEW_TAB_APPEND_LAST);
xmlFree (url);
- xmlFree (title);
}
child = child->next;
@@ -689,12 +676,5 @@ session_remove_window (Session *session,
g_object_unref (window);
session_save (session, SESSION_CRASHED);
-
- /* autodestroy of the session, necessay to avoid
- * conflicts with the nautilus view */
- if (session->priv->windows == NULL)
- {
- g_object_unref (session);
- }
}