add vapi dir
authorAlan Knowles <alan@roojs.com>
Wed, 25 May 2022 04:25:23 +0000 (12:25 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 25 May 2022 04:25:23 +0000 (12:25 +0800)
src/JsRender/NodeToVala.vala
src/Palete/Gir.vala
src/Palete/VapiParser.vala

index 7afa135..dade758 100644 (file)
@@ -292,6 +292,8 @@ public class JsRender.NodeToVala : Object {
        
        void addMyVars()
        {
+               GLib.debug("callinged addMhyVars");
+               
                this.addLine();
                this.addLine(this.ipad + "// my vars (def)");
                        
@@ -300,6 +302,8 @@ public class JsRender.NodeToVala : Object {
                var cls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
                   
                if (cls == null) {
+                       GLib.debug("Gir factory failed to find class %s", this.node.fqn());
+                       
                        return;
                }
          
@@ -327,6 +331,7 @@ public class JsRender.NodeToVala : Object {
                                this.ignore(k);
                                continue;
                        }
+                       GLib.debug("Got myvars: %s", k.strip());
                        var min = (vv[0] == "$" || vv[0] == "#") ? 3 : 2; 
                        if (vv.length < min) {
                                // skip 'old js style properties without a type'
index b1f13bb..3a9080a 100644 (file)
@@ -180,8 +180,12 @@ namespace Palete {
                
                
                
-               public static GirObject?  factoryFqn(Project.Project project, string fqn)  
+               public static GirObject?  factoryFqn(Project.Project project, string in_fqn)  
                {       
+                       var fqn = in_fqn;
+                       // swap Gtk.Source* to GtkSource.
+                       
+                       GLib.debug("Gir.facotryFqn  search %s", fqn);
                        var bits = fqn.split(".");
                        if (bits.length < 1) {
                                return null;
index 74a34a5..613cff4 100644 (file)
@@ -380,6 +380,7 @@ namespace Palete {
                        
                        vapidirs += (BuilderApplication.configDirectory() + "/resources/vapi");
                        vapidirs += "/usr/share/vala-0.%d/vapi".printf(ver);
+                       vapidirs += "/usr/share/vala/vapi";
                        context.vapi_directories = vapidirs;
                        
                        // or context.get_vapi_path("glib-2.0"); // should return path..