Revert "File.js"
[app.Builder.js] / Builder3 / Window.js
index aa3222a..c72c8cf 100644 (file)
@@ -1,4 +1,4 @@
-Gtk = imports.gi.Gtk;
+       Gtk = imports.gi.Gtk;
 Gdk = imports.gi.Gdk;
 Pango = imports.gi.Pango;
 GLib = imports.gi.GLib;
@@ -354,7 +354,7 @@ Window=new XObject({
                                                             }
                                                             return true;
                                                                  
-                                                        },
+                                                        } /*,
                                                         enter_notify_event : function (self, event) {
                                                             return true;
                                                              this.el.expanded = !this.el.expanded;
@@ -364,6 +364,7 @@ Window=new XObject({
                                                         
                                                         return true;
                                                         }
+                                                        */
                                                     },
                                                     id : "expander",
                                                     label : "Select Project or File",
@@ -381,6 +382,7 @@ Window=new XObject({
                                                        
                                                         var model = this.get('/LeftProjectTree.combomodel');
                                                         //  print ("loading Projects?")
+                                                                                                               //print(JSON.stringify(pm.projects, null,4));Seed.quit();
                                                         //console.dump(pm.projects);
                                                         model.loadData(pm.projects);
                                                          
@@ -605,7 +607,7 @@ Window=new XObject({
                                                                                 Gdk.drag_status(ctx, 0, time);
                                                                                 return true;
                                                                             }
-                                                                              print(JSON.stringify(tg,null,4));
+                                                                            //  print(JSON.stringify(tg,null,4));
                                                                             //console.dump(tg);
                                                                             this.targetData = tg;    
                                                                             
@@ -764,7 +766,7 @@ Window=new XObject({
                                                                             },
                                                                             
                                                                     init : function() {
-                                                                               XObject.prototype.init.call(this);
+                                                                        XObject.prototype.init.call(this);
                                                                        var description = new Pango.FontDescription.c_new();
                                                                        description.set_size(8000);
                                                                        this.el.modify_font(description);
@@ -1060,11 +1062,11 @@ Window=new XObject({
                                                                                 
                                                                                 
                                                                             },
-                                                                                                                                                       columns : [
+                                                                           columns : [
                                                                                         GObject.TYPE_STRING, // title 
                                                                                         GObject.TYPE_STRING, // tip
                                                                                         GObject.TYPE_STRING // source..
-                                                                                        ] ,
+                                                                             ] ,
                                                                                                                                                        
                                                                                                                                                        
                                                                            
@@ -1242,7 +1244,7 @@ Window=new XObject({
                                                                                 s.get_selected( oret);
                                                                                 var node = this.nodeToJS(oret.iter,false);
                                                                                     //console.dump(node);
-                                                                                print(JSON.stringify(node, null,4)); 
+                                                                                //print(JSON.stringify(node, null,4)); 
                                                                                     
                                                                                     // needs to drop first, otherwise the target_data 
                                                                                         // treepath will be invalid.
@@ -1564,11 +1566,16 @@ Window=new XObject({
                                                                                                                                                                        
                                                                                     
                                                                                     loadData : function(data) {
-                                                                                         var ov = this.get('/LeftProjectTree.combo').getValue();
+                                                                                                                                                                               //print("load data called");Seed.quit();
+                                                                                                                                                                               //print(data);Seed.quit();
+                                                                                                                                                                               
+                                                                                        var ov = this.get('/LeftProjectTree.combo').getValue();
                                                                                         this.el.clear();
                                                                                         var el = this.el;
                                                                                         var na = {};
-                                                                                        data.forEach(function(p) {
+                                                                                        
+                                                                                                                                                                               
+                                                                                                                                                                               data.forEach(function(p) {
                                                                                             
                                                                                             el.append(na);
                                                                                             //print(JSON.stringify(XObject.keys(na)));
@@ -1590,10 +1597,7 @@ Window=new XObject({
                                                                     xtype: Gtk.ScrolledWindow,
                                                                     pack : "add",
                                                                     shadow_type : Gtk.ShadowType.IN,
-                                                                    init : function() {
-                                                                        XObject.prototype.init.call(this);
-                                                                        this.el.set_policy  (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC );
-                                                                    },
+                                                                  
                                                                     items : [
                                                                         {
                                                                             xtype: Gtk.TreeView,
@@ -1661,16 +1665,14 @@ Window=new XObject({
                                                                                     xtype: Gtk.TreeStore,
                                                                                     pack : "set_model",
                                                                                     id : "model",
-                                                                                     loading : false,
-                                                                                    init : function() {
-                                                                                        XObject.prototype.init.call(this);
-                                                                                      this.el.set_column_types ( 3, [
+                                                                                    loading : false,
+                                                                                                                                                                       columns :  [
                                                                                                         GObject.TYPE_STRING, // title 
                                                                                                         GObject.TYPE_STRING, // tip
                                                                                                         GObject.TYPE_STRING // id..
-                                                                                                        ] );
-                                                                                       
-                                                                                    },
+                                                                                                        ] ,
+                                                                                                                                                                        
+                                                                                    
                                                                                     loadProject : function(pr) {
                                                                                          print("LOAD PROJECT");
                                                                                           var model = this.get('/LeftProjectTree.model');
@@ -1998,10 +2000,7 @@ Window=new XObject({
                                                     editing : false,
                                                     id : "LeftPanel",
                                                     pack : "add",
-                                                    init : function() {
-                                                        XObject.prototype.init.call(this);
-                                                       this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
-                                                    },
+                                                    
                                                     shadow_type : Gtk.ShadowType.IN,
                                                     items : [
                                                         {
@@ -2186,7 +2185,7 @@ Window=new XObject({
                                                                     
                                                                         this.el.set_value(ret.iter, 5, type + ' : ' + str);
                                                                         // update the tree...  
-                                                                        print("new data: "  + JSON.stringify(this.toJS() , null,4));
+                                                                        //print("new data: "  + JSON.stringify(this.toJS() , null,4));
                                                                         this.get('/LeftTree.model').setFromNode(false,this.toJS());
                                                                         this.get('/LeftTree.model').changed(doRefresh); 
                                                                                  
@@ -2265,9 +2264,7 @@ Window=new XObject({
                                                                         }
                                                                                                 
                                                                     },
-                                                                    init : function() {
-                                                                        XObject.prototype.init.call(this);
-                                                                    this.el.set_column_types ( 6, [
+                                                                                                                                       columns :  [
                                                                                                     GObject.TYPE_STRING,  // 0 real key
                                                                                                     GObject.TYPE_STRING, // 1 real value 
                                                                                                      GObject.TYPE_STRING,  // 2 visable key
@@ -2275,9 +2272,9 @@ Window=new XObject({
                                                                                                      GObject.TYPE_STRING, // 4 need to store type of!!!
                                                                                                       GObject.TYPE_STRING // 5 tooltip
                                                                                                   
-                                                                                                ]);
-                                                                    },
-                                                                    load : function(ar) {
+                                                                                                ],
+                                                                                                                                       
+                                                                     load : function(ar) {
                                                                     // might casue problesm..
                                                                         // this.get('/Editor.RightEditor').save();
                                                                     
@@ -4025,7 +4022,7 @@ Window=new XObject({
                                         this.get('buttonbar').el.hide();
                                         this.get('viewbox').el.show();
                                         var ce = this.get('/Window.centereast').el;
-                                        print(JSON.stringify(XObject.keys(ce) ,null,4));
+                                        //print(JSON.stringify(XObject.keys(ce) ,null,4));
                                         ce.set_position(ce.get_allocated_width() - 150);
                                            
                                        // this.get('model').expanded();