nautilus r14077 - in trunk: . src



Author: cneumair
Date: Mon Apr 21 20:57:47 2008
New Revision: 14077
URL: http://svn.gnome.org/viewvc/nautilus?rev=14077&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/nautilus.desktop.in.in
   trunk/src/nautilus-main.c

Modified: trunk/nautilus.desktop.in.in
==============================================================================
--- trunk/nautilus.desktop.in.in	(original)
+++ trunk/nautilus.desktop.in.in	Mon Apr 21 20:57:47 2008
@@ -14,3 +14,6 @@
 X-GNOME-Bugzilla-Product=nautilus
 X-GNOME-Bugzilla-Component=general
 X-GNOME-Bugzilla-Version= VERSION@
+X-GNOME-Autostart-Phase=Desktop
+X-GNOME-Provides=desktop
+X-GNOME-Autostart-Notify=true

Modified: trunk/src/nautilus-main.c
==============================================================================
--- trunk/src/nautilus-main.c	(original)
+++ trunk/src/nautilus-main.c	Mon Apr 21 20:57:47 2008
@@ -373,7 +373,8 @@
 	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 @@
 		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 @@
 		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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]