tools/build_gtk_tree.js
[app.Builder.js] / tools / build_gtk_tree.js
index d9760d4..dff1952 100644 (file)
@@ -9,6 +9,12 @@
 // b) what methods are available for each type, that include a reference to another type..
 
 // let's start with types.. 
+GIRepository = imports.gi.GIRepository;
+GLib        = imports.gi.GLib;
+
+// we add this in, as it appears to get lost sometimes if we set it using the ENV. variable in builder.sh
+GIRepository.IRepository.prepend_search_path(GLib.get_home_dir() + '/.Builder/girepository-1.1');
+
 
 imports.searchPath.push('../../gnome.introspection-doc-generator');
 
@@ -19,7 +25,7 @@ File        = imports.File.File;
 NameSpace   = imports.Introspect.NameSpace.NameSpace; 
 Link        = imports.Introspect.Link.Link; 
 
-var ns_list = NameSpace.namespaces();
+var ns_list = [ 'Gtk' ] ; //NameSpace.namespaces();
  
 ns_list = ns_list.sort();
 // let's try and load them, so we find out early what will fail.
@@ -38,9 +44,11 @@ ns_list.forEach(function(ns_name)
     
     var  core = imports.gi[ns_name];
     var idx = { name: ns_name}; 
-    console.log("START:" + ns_name);
+    print("START:" + ns_name);
    
-    var ns = NameSpace.ns(ns_name);
+    var ns = NameSpace.ns(ns_name); // fetch all the elements in namespace...
+    // as a type => list of them..
+    
     
     
     var actions = {
@@ -59,7 +67,8 @@ ns_list.forEach(function(ns_name)
             
             print('NameSpace.factory(' + actions[i] +','+ns_name+','+n);
             var odata =   NameSpace.factory(actions[i], ns_name, n);
-            print(odata);
+            print(JSON.stringify(odata,null,4));
+            seed.quit();
         }); 
     }