tools/build_gtk_tree.js
[app.Builder.js] / tools / build_gtk_tree.js
index 84b153b..91c5ddb 100644 (file)
@@ -286,7 +286,11 @@ right:
         tops[ch] = [ '*top' ];
     });
     for(var cls in methods) {
+        if (cls =='Gtk.Builder') {
+            continue;
+        }
         for (var par in methods[cls].can_be_added_to_as) {
+            
             if (typeof(usage[par]) == 'undefined') {
                 usage[par] = [];
             }
@@ -297,7 +301,13 @@ right:
             tops[cls].pushUnique(par);
         }
     }
-    function canTop(cls) {
+    function canTop(cls, rec) {
+        
+        rec = rec || 0;
+        //print('CANTOP: ' + cls + ' =' + rec);
+        if (rec > 5) {
+       //     print('SKIP : ' + cls);
+        }
         if (typeof(tops[cls]) == 'undefined') {
             return false;
         }
@@ -308,7 +318,7 @@ right:
             if (cls == tops[cls][i]) {
                 continue;
             }
-            if (canTop(cls)) {
+            if (canTop(tops[cls][i], rec+1)) {
                 return true;
             }
         }