[anjuta] build-basic-autotools: Keep compile item enabled even if no project is open



commit 9371d4773131ce65cfce6783a7d35e6421ae2d1e
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Wed Jun 22 20:40:22 2011 +0200

    build-basic-autotools: Keep compile item enabled even if no project is open

 plugins/build-basic-autotools/build.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/build-basic-autotools/build.c b/plugins/build-basic-autotools/build.c
index 345c5ad..176d6d0 100644
--- a/plugins/build-basic-autotools/build.c
+++ b/plugins/build-basic-autotools/build.c
@@ -608,7 +608,7 @@ build_compile_file (BasicAutotoolsPlugin *plugin, GFile *file)
 	projman = anjuta_shell_get_interface (ANJUTA_PLUGIN (plugin)->shell,
 				                            IAnjutaProjectManager,
 				                            NULL);
-	if (projman != NULL)
+	if ((projman != NULL) && ianjuta_project_manager_is_open (projman, NULL))
 	{
 		/* Use the project manager to find the object file */		
 		target = ianjuta_project_manager_get_parent (projman, file, NULL);
@@ -959,17 +959,17 @@ build_configure_and_build (BasicAutotoolsPlugin *plugin, BuildFunc func, GFile *
 	has_makefile_am = directory_has_makefile_am (plugin, build_dir);
 	g_object_unref (build_dir);
 	
-	if (has_makefile)
+	if (!has_makefile && has_makefile_am && (plugin->project_root_dir != NULL))
+	{
+		/* Run configure first */
+		build_configure_dialog (plugin, func, file);
+	}
+	else
 	{
 		/* Some build functions have less arguments but
 		 * it is not a problem in C */
 		func (plugin, file, NULL, NULL, NULL);
 	}
-	else if (has_makefile_am && (plugin->project_root_dir != NULL))
-	{
-		/* Run configure first */
-		build_configure_dialog (plugin, func, file);
-	}
 }
 
 /* Configuration commands



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