[anjuta] language-support-vala: fix misuse of CodeContext.add_package



commit 1d8494141e80dbcef99ef5e2c951f59ced9ae2c4
Author: Abderrahim Kitouni <a kitouni gmail com>
Date:   Sat Jan 1 19:39:33 2011 +0100

    language-support-vala: fix misuse of CodeContext.add_package
    
    (this was supposed to be in 46aeb2136566, but somehow it isn't)

 plugins/language-support-vala/plugin.vala |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/plugins/language-support-vala/plugin.vala b/plugins/language-support-vala/plugin.vala
index 4903355..f90cdfe 100644
--- a/plugins/language-support-vala/plugin.vala
+++ b/plugins/language-support-vala/plugin.vala
@@ -57,11 +57,14 @@ public class ValaPlugin : Plugin {
 		var packages = project.get_packages();
 
 		Vala.CodeContext.push (context);
-		context.add_package("glib-2.0");
-		context.add_package("gobject-2.0");
+		context.add_external_package("glib-2.0");
+		context.add_external_package("gobject-2.0");
 
-		foreach (var pkg in packages)
-			context.add_package(pkg);
+		foreach (var pkg in packages) {
+			if (!context.add_external_package(pkg))
+				/* TODO: try to look at VALAFLAGS */
+				debug ("package %s not found", pkg);
+		}
 
 		Vala.CodeContext.pop ();
 



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