Revert "File.js"
[app.Builder.js] / Builder3 / Main.js
index ef699c2..c098538 100644 (file)
@@ -3,6 +3,17 @@ Gdk = imports.gi.Gdk;
 
 Window = imports.Builder3.Window.Window;
 
+JSON.xstringify = function (o) {
+         var seen = [];
+         return JSON.stringify(o, function(_, value) {
+                 if (typeof value === 'object' && value !== null) {
+                         if (seen.indexOf(value) !== -1) return null;
+                         else seen.push(value);
+                 }
+                 return value;
+         }, 4);
+}
+
 /*
 atoms = {
                "STRING" : Gdk.atom_intern("STRING")
@@ -26,7 +37,7 @@ Window.el.show_all();
 // it used to hapen in the init() code for the element, it should be moved to a 'global init for a whole module'
 var pm = imports.ProjectManager.ProjectManager;
 
-var combomodel =  this.get('/LeftProjectTree.combomodel');
+var combomodel =  Window.get('/LeftProjectTree.combomodel');
 pm.on('changed', function() {
       print("caught changed hook on project manager - reloading data");
      combomodel.loadData(pm.projects);