anjuta r4792 - in trunk: . plugins/build-basic-autotools



Author: sgranjoux
Date: Mon Feb 23 21:01:34 2009
New Revision: 4792
URL: http://svn.gnome.org/viewvc/anjuta?rev=4792&view=rev

Log:
	* plugins/build-basic-autotools/plugin.c:
	Fix #555895 â Save configure options for build configuration


Modified:
   trunk/ChangeLog
   trunk/plugins/build-basic-autotools/plugin.c

Modified: trunk/plugins/build-basic-autotools/plugin.c
==============================================================================
--- trunk/plugins/build-basic-autotools/plugin.c	(original)
+++ trunk/plugins/build-basic-autotools/plugin.c	Mon Feb 23 21:01:34 2009
@@ -2384,6 +2384,15 @@
 		name = build_configuration_get_name (cfg);
 		anjuta_session_set_string (session, "Build", "Selected Configuration", name);
 	}
+	for (cfg = build_configuration_list_get_first (plugin->configurations); cfg != NULL; cfg = build_configuration_next (cfg))
+	{
+		gchar *key = g_strconcat("BuildArgs/", build_configuration_get_name (cfg), NULL);
+
+		anjuta_session_set_string (session, "Build",
+			       key,
+			       build_configuration_get_args(cfg));
+		g_free (key);
+	}
 }
 
 static void
@@ -2392,7 +2401,8 @@
 {
 	GList *configurations;
 	gchar *selected;
-				
+	BuildConfiguration *cfg;
+
 	if (phase != ANJUTA_SESSION_PHASE_NORMAL)
 		return;
 	
@@ -2407,6 +2417,19 @@
 	build_configuration_list_select (plugin->configurations, selected);
 	g_free (selected);
 
+	for (cfg = build_configuration_list_get_first (plugin->configurations); cfg != NULL; cfg = build_configuration_next (cfg))
+	{
+		gchar *key = g_strconcat("BuildArgs/", build_configuration_get_name (cfg), NULL);
+		gchar *args = anjuta_session_get_string (session, "Build",
+				key);
+		g_free (key);
+		if (args != NULL)
+		{
+			build_configuration_set_args (cfg, args);
+			g_free (args);
+		}
+	}
+
 	build_project_configured (G_OBJECT (plugin), NULL, NULL, NULL);
 }
 



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