summaryrefslogtreecommitdiff
path: root/src/nautilus-main.c
diff options
context:
space:
mode:
authorChristian Neumair <cneumair@gnome.org>2008-03-29 10:02:38 +0000
committerChristian Neumair <cneumair@src.gnome.org>2008-03-29 10:02:38 +0000
commitd818b409678c702e587fc2548442ddf16b662737 (patch)
tree08ff8515e100c1eaa928129fef68dd18c1f90530 /src/nautilus-main.c
parent28524412cc03dadc759eef387d76ac3da74448fb (diff)
downloadnautilus-d818b409678c702e587fc2548442ddf16b662737.tar.gz
When restarting with "nautilus --restart", use XML file session save /
2008-03-29 Christian Neumair <cneumair@gnome.org> * src/nautilus-application.c (nautilus_application_save_session_to_file), (save_session): * src/nautilus-application.h: * src/nautilus-main.c (main): * src/nautilus-shell.c (open_windows_at_idle), (restart_at_idle): When restarting with "nautilus --restart", use XML file session save / load mechanism, instead of writing to / reading from GConf. svn path=/trunk/; revision=13998
Diffstat (limited to 'src/nautilus-main.c')
-rw-r--r--src/nautilus-main.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index 1c074311a..136866b32 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -582,19 +582,17 @@ main (int argc, char *argv[])
* an update takes place.
*/
- if (g_getenv ("_NAUTILUS_RESTART") != NULL) {
- g_unsetenv ("_NAUTILUS_RESTART");
-
- /* Might eventually want to copy all the parameters
- * from argv into the new exec. For now, though, that
- * would just interfere with the re-creation of
- * windows based on the window info stored in gconf,
- * including whether the desktop was started.
- */
- argv_copy = g_new0 (char *, 2);
- argv_copy[0] = argv[0];
-
+ if (g_getenv ("_NAUTILUS_RESTART_SESSION_FILENAME") != NULL) {
+ argv_copy = g_new0 (char *, 4);
+ argv_copy[0] = g_strdup (argv[0]);
+ argv_copy[1] = g_strdup ("--load-session");
+ argv_copy[2] = g_strdup (g_getenv ("_NAUTILUS_RESTART_SESSION_FILENAME"));
+
+ g_unsetenv ("_NAUTILUS_RESTART_SESSION_FILENAME");
+
execvp (argv[0], argv_copy);
+
+ g_strfreev (argv_copy);
}
g_object_unref (G_OBJECT (program));