SF.net SVN: geany:[5037] branches/sm/src

statc at users.sourceforge.net statc at xxxxx
Thu Jun 17 14:53:39 UTC 2010


Revision: 5037
          http://geany.svn.sourceforge.net/geany/?rev=5037&view=rev
Author:   statc
Date:     2010-06-17 14:53:39 +0000 (Thu, 17 Jun 2010)

Log Message:
-----------
Slight code improvement: do not open geany.conf in configuration_save_default_session() if nothing is to be written

Modified Paths:
--------------
    branches/sm/src/keyfile.c
    branches/sm/src/project.c

Modified: branches/sm/src/keyfile.c
===================================================================
--- branches/sm/src/keyfile.c	2010-06-17 14:53:18 UTC (rev 5036)
+++ branches/sm/src/keyfile.c	2010-06-17 14:53:39 UTC (rev 5037)
@@ -924,15 +924,17 @@
  */
 void configuration_save_default_session(void)
 {
-	GKeyFile *config;
-	gchar *configfile;
-	open_config(&config, &configfile);
+	if (cl_options.load_session)
+	{
+		GKeyFile *config;
+		gchar *configfile;
+		open_config(&config, &configfile);
 
-	if (cl_options.load_session)
 		configuration_save_session_files(config);
 
-	write_config(config, configfile);
-	close_config(config, configfile);
+		write_config(config, configfile);
+		close_config(config, configfile);
+	}
 }
 
 

Modified: branches/sm/src/project.c
===================================================================
--- branches/sm/src/project.c	2010-06-17 14:53:18 UTC (rev 5036)
+++ branches/sm/src/project.c	2010-06-17 14:53:39 UTC (rev 5037)
@@ -1011,8 +1011,7 @@
 	if (project_prefs.project_session)
 	{
 		/* save current (non-project) session (it could has been changed since program startup) */
-		if (!cl_options.new_instance)
-			configuration_save_default_session();
+		configuration_save_default_session();
 		/* now close all open files */
 		document_close_all(FALSE);
 		/* read session files so they can be opened with configuration_open_files() */


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