X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=tools%2Fbuild_gtk_tree.js;h=b20babef93e0370d9f9805d4be5ffbfefa476184;hb=c4719b267aad8622685d175b8352d810aa62e5a8;hp=a46b8fb3371388bfb118d270db4eedbb2ffc3f8b;hpb=02aad0a43b8f2f82c43a028ff14f7f22d475df0c;p=app.Builder.js diff --git a/tools/build_gtk_tree.js b/tools/build_gtk_tree.js index a46b8fb33..b20babef9 100644 --- a/tools/build_gtk_tree.js +++ b/tools/build_gtk_tree.js @@ -48,7 +48,7 @@ function BuildLists () { - var ns_list = [ 'Gtk' , 'Gdk', 'Pango', 'GtkSource', 'WebKit', 'Vte'] ; //NameSpace.namespaces(); + var ns_list = [ 'Gtk' , 'Gdk', 'Pango', 'GtkSource', 'WebKit', 'Vte', 'GtkClutter'] ; //NameSpace.namespaces(); ns_list = ns_list.sort(); // let's try and load them, so we find out early what will fail. @@ -332,21 +332,46 @@ right: } var nusage = {}; + var usage_left = {}; for(var par in usage) { // see if the parent can be added to something. if (!canTop(par)) { continue; } + var duped = false; + for(var dupe in usage) { + if (par != dupe && usage[par].join(',') == usage[dupe].join(',') ) { + duped = true; + if (typeof(usage_left[dupe]) == 'undefined') { + usage_left[dupe] = []; + } + usage_left[dupe].pushUnique(par); + break; + } + } + if (duped) { + continue; + } nusage[par] = usage[par]; } - + usage = nusage; print(JSON.stringify(nusage,null,4)); - - print(JSON.stringify(methods['Gtk.Switch'],null,4)); + Seed.exit(); + //print(JSON.stringify(methods['Gtk.Switch'],null,4)); - - + var str = []; + for(var par in usage) { + str.push('left'); + str.push(' ' + par); + if (typeof(usage_left[par]) != 'undefined') { + usage_left[par].forEach(function(d) { str.push(' ' + d);}); + } + str.push('right'); + usage[par].forEach(function(d) { str.push(' ' + d);}); + str.push(''); + } + print(str.join("\n")); //print(JSON.stringify(implementations ,null,4)); /* methods is