SF.net SVN: geany:[5545] branches/sm/src/main.c

statc at users.sourceforge.net statc at xxxxx
Sun Feb 27 08:44:39 UTC 2011


Revision: 5545
          http://geany.svn.sourceforge.net/geany/?rev=5545&view=rev
Author:   statc
Date:     2011-02-27 08:44:38 +0000 (Sun, 27 Feb 2011)

Log Message:
-----------
Another SM-related change in main.c:load_startup_files().

Modified Paths:
--------------
    branches/sm/src/main.c

Modified: branches/sm/src/main.c
===================================================================
--- branches/sm/src/main.c	2011-02-22 17:15:29 UTC (rev 5544)
+++ branches/sm/src/main.c	2011-02-27 08:44:38 UTC (rev 5545)
@@ -857,7 +857,7 @@
 }
 
 
-static void load_session_project_file(gboolean load_filenames)
+static void load_session_project_file()
 {
 	gchar *locale_filename;
 
@@ -866,7 +866,7 @@
 	locale_filename = utils_get_locale_from_utf8(project_prefs.session_file);
 
 	if (NZV(locale_filename))
-		project_load_file(locale_filename, load_filenames);
+		project_load_file(locale_filename, TRUE);
 
 	g_free(locale_filename);
 	g_free(project_prefs.session_file);	/* no longer needed */
@@ -927,15 +927,14 @@
 		load_default_session = FALSE;
 	}
 
-	if (load_default_session)
+	/* Do not load session files if we are being restored by session manager:
+	 * corresponding file names are passed via command-line and will-be handles by open_cl_files().
+	 * If default session contains a project, the project's name is also passed via command-line,
+	 * this case is handled in the condition above. */
+	if (!main_status.restoring && load_default_session)
 	{
-		/* Load project session file (if any) writing its filenames into global session_files variable.
-		 * Don't load filenames when being restored by session manager: in that case file names are
-		 * passed via command line and will be opened by open_cl_files() */
-		load_session_project_file(!main_status.restoring);
-		/* load files into tabs, as they are found in the session_files variable */
-		if (!main_status.restoring)
-			configuration_open_files();
+		load_session_project_file();
+		configuration_open_files();
 	}
 
 	open_cl_files(argc, argv);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list