summaryrefslogtreecommitdiff
path: root/src/nautilus-main.c
diff options
context:
space:
mode:
authorChristian Neumair <cneumair@gnome.org>2008-04-21 20:57:47 +0000
committerChristian Neumair <cneumair@src.gnome.org>2008-04-21 20:57:47 +0000
commita11996b8b901848866428f5210cab40787b33321 (patch)
tree5b7803815195f14afa61a11207f9fe871fe4d40f /src/nautilus-main.c
parent715b12daefa1813ab3cf8a7f285246fac9e02aa0 (diff)
downloadnautilus-a11996b8b901848866428f5210cab40787b33321.tar.gz
Support new gnome-session autostart semantics (#525056). Thanks to Lucas
2008-04-21 Christian Neumair <cneumair@gnome.org> * nautilus.desktop.in.in: * src/nautilus-main.c (main): Support new gnome-session autostart semantics (#525056). Thanks to Lucas Rocha. svn path=/trunk/; revision=14077
Diffstat (limited to 'src/nautilus-main.c')
-rw-r--r--src/nautilus-main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index 11ed66feb..5c8e3e83d 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -373,7 +373,8 @@ main (int argc, char *argv[])
gboolean no_default_window;
gboolean browser_window;
gboolean no_desktop;
- const char *startup_id;
+ gboolean autostart_mode;
+ const char *startup_id, *autostart_id;
char *startup_id_copy;
char *session_to_load;
gchar *geometry;
@@ -433,6 +434,11 @@ main (int argc, char *argv[])
g_unsetenv ("DESKTOP_STARTUP_ID");
}
+ autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
+ if (autostart_id != NULL && *autostart_id != '\0') {
+ autostart_mode = TRUE;
+ }
+
/* we'll do it ourselves due to complicated factory setup */
gtk_window_set_auto_startup_notification (FALSE);
@@ -473,6 +479,14 @@ main (int argc, char *argv[])
no_default_window = TRUE;
}
+ /* If in autostart mode (aka started by gnome-session), we need to ensure
+ * nautilus starts with the correct options.
+ */
+ if (autostart_mode) {
+ no_default_window = TRUE;
+ no_desktop = FALSE;
+ }
+
/* Do this here so that gdk_display is initialized */
if (startup_id_copy == NULL) {
/* Create a fake one containing a timestamp that we can use */