Builder/Window.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 08:08:38 +0000 (16:08 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 08:08:38 +0000 (16:08 +0800)
Builder/Window.js

index ef05c2a..dbd9473 100644 (file)
@@ -35,14 +35,17 @@ Window=new XObject({
     default_width : 800,
     default_height : 500,
     id : "Window",
+    setTitle : function(str) {
+        this.el.set_title(this.title + ' - ' + str);
+    },
     listeners : {
-        "delete_event":function (self, event) {
+        delete_event : function (self, event) {
             return false;
         },
-        "destroy":function (self) {
+        destroy : function (self) {
            Gtk.main_quit();
         },
-        "show":function (self) {
+        show : function (self) {
           print("WINDOW SHOWING - trying to hide");
         imports.Builder.Provider.ProjectManager.ProjectManager.loadConfig();
                this.get('/MidPropTree').hideWin();
@@ -74,7 +77,7 @@ Window=new XObject({
                                             use_underline : true,
                                             label : "New _Project",
                                             listeners : {
-                                                "activate":function (self) {
+                                                activate : function (self) {
                                                          var _this = this;
                                                        this.get('/EditProject').show({
                                                            success : function(pr) {
@@ -89,7 +92,7 @@ Window=new XObject({
                                             label : "_New File",
                                             use_underline : true,
                                             listeners : {
-                                                "activate":function (self) {
+                                                activate : function (self) {
                                                        var fn = this.get('/LeftProjectTree.combo').getValue();
                                                         if (!fn) {
                                                             this.get('/LeftProjectTree').showNoProjectSelected();
@@ -112,7 +115,7 @@ Window=new XObject({
                                             pack : "add",
                                             label : "D_elete Project",
                                             listeners : {
-                                                "activate":function (self) {
+                                                activate : function (self) {
                                                 
                                                        var fn =  this.get('/LeftProjectTree').get('combo').getValue();
                                                        if (!fn.length) {
@@ -141,7 +144,7 @@ Window=new XObject({
                                             label : "_Quit",
                                             use_underline : true,
                                             listeners : {
-                                                "activate":function (self) {
+                                                activate : function (self) {
                                                    Gtk.main_quit();
                                                 }
                                             }
@@ -160,8 +163,10 @@ Window=new XObject({
                             items : [
                                 {
                                     xtype: Gtk.Menu,
-                                    'pro' : "submenu",
                                     pack : "set_submenu",
+                                    listeners : {
+                                        
+                                    },
                                     items : [
                                         {
                                             xtype: Gtk.MenuItem,
@@ -169,7 +174,7 @@ Window=new XObject({
                                             label : "_About",
                                             use_underline : true,
                                             listeners : {
-                                                "activate":function (self) {
+                                                activate : function (self) {
                                                     this.get('/About').el.run();
                                                 }
                                             }
@@ -207,7 +212,7 @@ Window=new XObject({
                                                        this.el.add_events (Gdk.EventMask.BUTTON_MOTION_MASK );
                                                     },
                                                     listeners : {
-                                                        "activate":function (self) {
+                                                        activate : function (self) {
                                                                var nb = this.get('/LeftTopPanel.notebook');
                                                                if (this.el.expanded) {
                                                                    // now expanded..
@@ -230,7 +235,7 @@ Window=new XObject({
                                                                }
                                                                nb.el.set_current_page(0);
                                                         },
-                                                        "enter_notify_event":function (self, event) {
+                                                        enter_notify_event : function (self, event) {
                                                              this.el.expanded = !this.el.expanded;
                                                         //if (this.el.expanded ) {
                                                             this.listeners.activate.call(this);
@@ -379,7 +384,7 @@ Window=new XObject({
                                                                           this.el.scroll_to_cell(tp, null, false, 0,0);
                                                                     },
                                                                     listeners : {
-                                                                        "button_press_event":function (self, ev) {
+                                                                        button_press_event : function (self, ev) {
                                                                                console.log("button press?");
                                                                                 if (ev.type != Gdk.EventType.BUTTON_PRESS  || ev.button.button != 3) {
                                                                                     print("click" + ev.type);
@@ -398,7 +403,7 @@ Window=new XObject({
                                                                                 print("click:" + res.path.to_string());
                                                                                 return false;
                                                                         },
-                                                                        "drag_begin":function (self, drag_context) {
+                                                                        drag_begin : function (self, drag_context) {
                                                                                print('SOURCE: drag-begin');
                                                                                  this.targetData = false;
                                                                                 // find what is selected in our tree...
@@ -431,7 +436,7 @@ Window=new XObject({
                                                                                 
                                                                                 return true;
                                                                         },
-                                                                        "drag_end":function (self, drag_context) {
+                                                                        drag_end : function (self, drag_context) {
                                                                                Seed.print('LEFT-TREE: drag-end');
                                                                                 this.el.dragData = false;
                                                                                 this.el.dropList = false;
@@ -439,7 +444,7 @@ Window=new XObject({
                                                                                 this.get('/LeftTree.view').highlight(false);
                                                                                 return true;
                                                                         },
-                                                                        "drag_motion":function (self, ctx, x, y, time) {
+                                                                        drag_motion : function (self, ctx, x, y, time) {
                                                                             console.log("LEFT-TREE: drag-motion");
                                                                                         var src = Gtk.drag_get_source_widget(ctx);
                                                                         
@@ -512,7 +517,7 @@ Window=new XObject({
                                                                                          
                                                                                         return true;
                                                                         },
-                                                                        "drag_drop":function (w, ctx, x, y, time) {
+                                                                        drag_drop : function (w, ctx, x, y, time) {
                                                                               Seed.print("TARGET: drag-drop");
                                                                                                
                                                                                                 Gtk.drag_get_data
@@ -529,7 +534,7 @@ Window=new XObject({
                                                                         
                                                                                                 return  true;
                                                                         },
-                                                                        "drag_data_received":function (self, ctx, x, y, sel_data, info, time) {
+                                                                        drag_data_received : function (self, ctx, x, y, sel_data, info, time) {
                                                                                 print("Tree: drag-data-received");
                                                                         
                                                                                       var   delete_selection_data = false;
@@ -576,7 +581,7 @@ Window=new XObject({
                                                                                         Gtk.drag_finish (ctx, dnd_success, delete_selection_data, time);
                                                                                         return true;
                                                                         },
-                                                                        "cursor_changed":function (self) {
+                                                                        cursor_changed : function (self) {
                                                                              if (this.blockChanges) { // probably not needed.. 
                                                                                return true;
                                                                              }
@@ -701,6 +706,8 @@ Window=new XObject({
                                                                                             return;
                                                                                             
                                                                                         }
+                                                                                        this.get('/Window').setTitle(f.project.getName() + ' - ' + f.name);
+                                                                                        
                                                                                         if (f.items.length && typeof(f.items[0]) == 'string') {
                                                                                         
                                                                                             this.get('/RightEditor').el.show();
@@ -1067,39 +1074,39 @@ Window=new XObject({
                                                                                 return k;
                                                                             },
                                                                             toJS : function(iter, with_id)
-                                                                                    {
-                                                                                        //Seed.print("WITHID: "+ with_id);
-                                                                                        
-                                                                                        var first = false;
-                                                                                        if (!iter) {
-                                                                                            
-                                                                                            this.treemap = { }; 
-                                                                                            
-                                                                                            iter = new Gtk.TreeIter();
-                                                                                            if (!this.el.get_iter_first(iter)) {
-                                                                                                return [];
-                                                                                            }
-                                                                                            first = true;
-                                                                                        } 
-                                                                                        
-                                                                                        var ar = [];
-                                                                                           
-                                                                                        while (true) {
-                                                                                            
-                                                                                            var k = this.nodeToJS(iter, with_id); 
-                                                                                            ar.push(k);
-                                                                                            
-                                                                                            
-                                                                                            if (!this.el.iter_next(iter)) {
-                                                                                                break;
-                                                                                            }
-                                                                                        }
-                                                                                        
-                                                                                        return ar;
-                                                                                        // convert the list into a json string..
+                                                                            {
+                                                                                //Seed.print("WITHID: "+ with_id);
+                                                                                
+                                                                                var first = false;
+                                                                                if (!iter) {
                                                                                     
-                                                                                        
-                                                                                    },
+                                                                                    this.treemap = { }; 
+                                                                                    
+                                                                                    iter = new Gtk.TreeIter();
+                                                                                    if (!this.el.get_iter_first(iter)) {
+                                                                                        return [];
+                                                                                    }
+                                                                                    first = true;
+                                                                                } 
+                                                                                
+                                                                                var ar = [];
+                                                                                   
+                                                                                while (true) {
+                                                                                    
+                                                                                    var k = this.nodeToJS(iter, with_id); 
+                                                                                    ar.push(k);
+                                                                                    
+                                                                                    
+                                                                                    if (!this.el.iter_next(iter)) {
+                                                                                        break;
+                                                                                    }
+                                                                                }
+                                                                                
+                                                                                return ar;
+                                                                                // convert the list into a json string..
+                                                                            
+                                                                                
+                                                                                },
                                                                             getIterValue : function (iter, col) {
                                                                                 var gval = new GObject.Value('');
                                                                                 this.el.get_value(iter, col ,gval);
@@ -1227,7 +1234,7 @@ Window=new XObject({
                                                                             pack : "add",
                                                                             label : "Delete Element",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                      this.get('/LeftTree.model').deleteSelected();
                                                                                 }
@@ -1248,7 +1255,7 @@ Window=new XObject({
                                                                  return this.project;
                                                             },
                                                             listeners : {
-                                                                "leave_notify_event":function (self, event) {
+                                                                leave_notify_event : function (self, event) {
                                                                     return false;
                                                                 }
                                                             },
@@ -1288,7 +1295,7 @@ Window=new XObject({
                                                                                 });
                                                                             },
                                                                             listeners : {
-                                                                                "changed":function (self) {
+                                                                                changed : function (self) {
                                                                                        var fn = this.getValue();
                                                                                        var pm  = imports.Builder.Provider.ProjectManager.ProjectManager;
                                                                                        this.get('/LeftProjectTree.model').loadProject(pm.getByFn(fn))
@@ -1367,7 +1374,7 @@ Window=new XObject({
                                                                             },
                                                                             id : "view",
                                                                             listeners : {
-                                                                                "cursor_changed":function (self) {
+                                                                                cursor_changed : function (self) {
                                                                                        var iter = new Gtk.TreeIter();
                                                                                                                 
                                                                                         if (this.selection.count_selected_rows() < 1) {
@@ -1495,7 +1502,7 @@ Window=new XObject({
                                                             xtype: Gtk.Button,
                                                             pack : "add",
                                                             listeners : {
-                                                                "button_press_event":function (self, event) {
+                                                                button_press_event : function (self, event) {
                                                                     this.get('/MidPropTree.model').showData('props');
                                                                     return false;
                                                                 }
@@ -1524,7 +1531,7 @@ Window=new XObject({
                                                             xtype: Gtk.Button,
                                                             pack : "add",
                                                             listeners : {
-                                                                "button_press_event":function (self, event) {
+                                                                button_press_event : function (self, event) {
                                                                     this.get('/MidPropTree.model').showData('events');
                                                                     return false;
                                                                 }
@@ -1553,7 +1560,7 @@ Window=new XObject({
                                                             xtype: Gtk.Button,
                                                             pack : "add",
                                                             listeners : {
-                                                                "button_press_event":function (self, ev) {
+                                                                button_press_event : function (self, ev) {
                                                                        var p = this.get('/AddPropertyPopup');
                                                                        if (!p.el) {
                                                                                p.init();
@@ -1593,7 +1600,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Using this.get('*someid') will find any id in an application.",
                                                                             label : "ID",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                         key : 'id', 
@@ -1611,7 +1618,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Add what type of packing is to be used",
                                                                             label : "PACK",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                         key : 'pack', 
@@ -1628,7 +1635,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Override the init method",
                                                                             label : "INIT",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                        key : '|init', 
@@ -1649,7 +1656,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Add a user defined string property",
                                                                             label : "String",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                                  key : '', 
@@ -1666,7 +1673,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Add a user defined number property",
                                                                             label : "Number",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                                  key : '', 
@@ -1683,7 +1690,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Add a user defined boolean property",
                                                                             label : "Boolean",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                                  key : '', 
@@ -1704,7 +1711,7 @@ Window=new XObject({
                                                                             tooltip_markup : "Add a user function boolean property",
                                                                             label : "Function",
                                                                             listeners : {
-                                                                                "activate":function (self) {
+                                                                                activate : function (self) {
                                                                                 
                                                                                     this.get('/LeftPanel.model').add( {
                                                                                            key : '|', 
@@ -1735,7 +1742,7 @@ Window=new XObject({
                                                         {
                                                             xtype: Gtk.TreeView,
                                                             id : "view",
-                                                            tooltip_column : 1,
+                                                            tooltip_column : 5,
                                                             headers_visible : false,
                                                             enable_tree_lines : true,
                                                             init : function() {
@@ -1750,7 +1757,7 @@ Window=new XObject({
                                                                                 this.el.modify_font(description);
                                                             },
                                                             listeners : {
-                                                                "button_press_event":function (self, ev) {
+                                                                button_press_event : function (self, ev) {
                                                                     
                                                                                 
                                                                                 var res = { }; 
@@ -1818,12 +1825,13 @@ Window=new XObject({
                                                                     id : "model",
                                                                     init : function() {
                                                                         XObject.prototype.init.call(this);
-                                                                    this.el.set_column_types ( 5, [
+                                                                    this.el.set_column_types ( 6, [
                                                                                                     GObject.TYPE_STRING,  // 0 real key
                                                                                                     GObject.TYPE_STRING, // 1 real value 
                                                                                                      GObject.TYPE_STRING,  // 2 visable key
                                                                                                      GObject.TYPE_STRING, // 3 visable value
                                                                                                      GObject.TYPE_STRING, // 4 need to store type of!!!
+                                                                                                      GObject.TYPE_STRING // 5 tooltip
                                                                                                   
                                                                                                 ]);
                                                                     },
@@ -1832,53 +1840,62 @@ Window=new XObject({
                                                                             return a.length > 1 ? a[0] + '....' : '' + str;
                                                                     },
                                                                     load : function(ar) {
-                                                                         this.el.clear();
-                                                                                                
-                                                                                this.get('/RightEditor').el.hide();
-                                                                                if (ar === false) {
-                                                                                    return ;
-                                                                                }
-                                                                                var ret = {}; 
-                                                                                
+                                                                      this.el.clear();
+                                                                                            
+                                                                        this.get('/RightEditor').el.hide();
+                                                                        if (ar === false) {
+                                                                            return ;
+                                                                        }
+                                                                        var ret = {}; 
+                                                                        
                                                                     
-                                                                                var provider = this.get('/LeftTree').getPaleteProvider();
-                                                                                
-                                                                                // sort!!!?
-                                                                                var iter = new Gtk.TreeIter();
-                                                                                for (var i in ar) {
-                                                                                    if (typeof(ar[i]) == 'object') {
-                                                                                        continue;
-                                                                                    }
-                                                                                    
-                                                                                    var type = provider.findType(ar, i, ar[i]);
-                                                                                    
-                                                                                    this.el.append(iter);
-                                                                                    var p = this.el.get_path(iter).to_string();
-                                                                                    ret[i] = p;
-                                                                                    this.el.set_value(iter, 0, i);
-                                                                                    this.el.set_value(iter, 1, '' + ar[i]);
-                                                                                    this.el.set_value(iter, 2, i);
-                                                                                    this.el.set_value(iter, 3, this.toShort(ar[i]));
-                                                                                    this.el.set_value(iter, 4, type);
-                                                                                }
-                                                                                ar.listeners = ar.listeners || {};
-                                                                                for (var i in ar.listeners ) {
-                                                                                    this.el.append(iter);
-                                                                                    var p = this.el.get_path(iter).to_string();
-                                                                                    ret['!' + i] = p;
-                                                                                    
-                                                                                    this.el.set_value(iter, 0, '!'+  i  );
-                                                                                    this.el.set_value(iter, 1, '' + ar.listeners[i]);
-                                                                                    this.el.set_value(iter, 2, '<b>'+ i + '</b>');
-                                                                                    
-                                                                                    this.el.set_value(iter, 3, '' + this.toShort(ar.listeners[i]));
-                                                                                    this.el.set_value(iter, 4, 'function');
-                                                                                }
-                                                                                return ret;
+                                                                        var provider = this.get('/LeftTree').getPaleteProvider();
+                                                                         var iter = new Gtk.TreeIter();
+                                                                         
+                                                                        // sort!!!?
+                                                                        var keys  = XObject.keys(ar);
+                                                                        keys.sort();
+                                                                        ar.listeners = ar.listeners || {};
+                                                                        
+                                                                        for (var i in ar.listeners ) {
+                                                                            this.el.append(iter);
+                                                                            var p = this.el.get_path(iter).to_string();
+                                                                            ret['!' + i] = p;
+                                                                            
+                                                                            this.el.set_value(iter, 0, '!'+  i  );
+                                                                            this.el.set_value(iter, 1, '' + ar.listeners[i]);
+                                                                            this.el.set_value(iter, 2, '<b>'+ i + '</b>');
+                                                                            
+                                                                            this.el.set_value(iter, 3, '' + this.toShort(ar.listeners[i]));
+                                                                            this.el.set_value(iter, 4, 'function');
+                                                                            this.el.set_value(iter, 5, i + ' : ' + ar.listeners[i]);
+                                                                        }
+                                                                        
+                                                                        
+                                                                       
+                                                                        var _this = this;
+                                                                        keys.forEach(function(i) {
+                                                                            if (typeof(ar[i]) == 'object') {
+                                                                                return;
+                                                                            }
+                                                                            
+                                                                            var type = provider.findType(ar, i, ar[i]);
+                                                                            
+                                                                            _this.el.append(iter);
+                                                                            var p = _this.el.get_path(iter).to_string();
+                                                                            ret[i] = p;
+                                                                            _this.el.set_value(iter, 0, ''+i);
+                                                                            _this.el.set_value(iter, 1, '' + ar[i]);  
+                                                                            _this.el.set_value(iter, 2, ''+i);
+                                                                            _this.el.set_value(iter, 3, ''+ _this.toShort(ar[i]));
+                                                                            _this.el.set_value(iter, 4, ''+type);
+                                                                            _this.el.set_value(iter, 5, type + ' : ' + ar[i]);
+                                                                        })
+                                                                        return ret;
                                                                     },
                                                                     add : function(info) {
                                                                           // info includes key, val, skel, etype..
-                                                                                                 console.dump(info);
+                                                                                  console.dump(info);
                                                                                 type = info.type.toLowerCase();
                                                                                 var data = this.toJS();
                                                                                 
@@ -2080,7 +2097,7 @@ Window=new XObject({
                                                                             return val;
                                                                         }
                                                                         var type = this.getType(this.el.get_path(iter).to_string());
-                                                                        //print("TYPE: " +type + " -  val:" + val);
+                                                                        print("TYPE: " +type + " -  val:" + val);
                                                                         switch(type.toLowerCase()) {
                                                                             case 'number':
                                                                             case 'uint':
@@ -2166,12 +2183,12 @@ Window=new XObject({
                                                                             xtype: Gtk.CellRendererText,
                                                                             pack : "pack_start",
                                                                             listeners : {
-                                                                                "editing_started":function (self, editable, path) {
+                                                                                editing_started : function (self, editable, path) {
                                                                                 
                                                                                         this.get('/LeftPanel.model').activePath  = path;
                                                                                 
                                                                                 },
-                                                                                "edited":function (self, object, p0) {
+                                                                                edited : function (self, object, p0) {
                                                                                        var model = this.get('/LeftPanel.model');
                                                                                         var path = model.activePath;
                                                                                         var iter = new Gtk.TreeIter();
@@ -2226,13 +2243,13 @@ Window=new XObject({
                                                                                   ]);
                                                                             },
                                                                             listeners : {
-                                                                                "edited":function (self, object, p0) {
+                                                                                edited : function (self, object, p0) {
                                                                                        this.get('/LeftPanel').editing = false;
                                                                                        print("EDITED? p:" + p0 + " t:" + p0);
                                                                                         this.get('/LeftPanel.model').changed(p0, true);
                                                                                         this.get('/LeftPanel.model').activePath = false;
                                                                                 },
-                                                                                "editing_started":function (self, editable, path) {
+                                                                                editing_started : function (self, editable, path) {
                                                                                    this.get('/LeftPanel').editing  = true;
                                                                                        //  console.log('editing started');
                                                                                        // r.has_entry = false;
@@ -2254,7 +2271,7 @@ Window=new XObject({
                                                                     pack : "append",
                                                                     label : "Delete",
                                                                     listeners : {
-                                                                        "activate":function (self) {
+                                                                        activate : function (self) {
                                                                                this.get('/LeftPanel.model').deleteSelected();
                                                                         }
                                                                     }
@@ -2264,7 +2281,7 @@ Window=new XObject({
                                                                     pack : "append",
                                                                     label : "Edit",
                                                                     listeners : {
-                                                                        "activate":function (self) {
+                                                                        activate : function (self) {
                                                                                this.get('/LeftPanel.model').startEditing(false, 0);
                                                                         }
                                                                     }
@@ -2328,7 +2345,7 @@ Window=new XObject({
                                             },
                                             pack : "add",
                                             listeners : {
-                                                "cursor_changed":function (self) {
+                                                cursor_changed : function (self) {
                                                        var iter = new Gtk.TreeIter();
                                                                         
                                                                         //console.log('changed');
@@ -2533,7 +2550,7 @@ Window=new XObject({
                                                                                     pack : "pack_start,false,false,0",
                                                                                     label : "Redraw",
                                                                                     listeners : {
-                                                                                        "button_press_event":function (self, event) {
+                                                                                        button_press_event : function (self, event) {
                                                                                               var js = this.get('/LeftTree.model').toJS();
                                                                                             if (js && js[0]) {
                                                                                                 this.get('/RightBrowser.view').renderJS(js[0]);
@@ -2547,7 +2564,7 @@ Window=new XObject({
                                                                                     pack : "pack_start,false,false,0",
                                                                                     label : "Set extra HTML in render",
                                                                                     listeners : {
-                                                                                        "button_press_event":function (self, event) {
+                                                                                        button_press_event : function (self, event) {
                                                                                             this.get('/RooProjectProperties').show();
                                                                                             return false;
                                                                                         }
@@ -2558,7 +2575,7 @@ Window=new XObject({
                                                                                     pack : "pack_start,false,false,0",
                                                                                     label : "test in Firefox",
                                                                                     listeners : {
-                                                                                        "button_press_event":function (self, event) 
+                                                                                        button_press_event : function (self, event) 
                                                                                         {
                                                                                                 /* Firefox testing for debugging..
                                                                                                   - we can create a /tmp directory, and put.
@@ -2702,7 +2719,7 @@ Window=new XObject({
                                                                                         this.el.execute_script("Builder.render(" + JSON.stringify(data) + ");");
                                                                                     },
                                                                                     listeners : {
-                                                                                        "load_finished":function (self, object) {
+                                                                                        load_finished : function (self, object) {
                                                                                                // if (this.ready) { // dont do it twice!
                                                                                                 //   return; 
                                                                                                //}
@@ -2714,12 +2731,12 @@ Window=new XObject({
                                                                                                }
                                                                                         
                                                                                         },
-                                                                                        "script_alert":function (self, object, p0) {
+                                                                                        script_alert : function (self, object, p0) {
                                                                                                print(p0);
                                                                                                 return false;
                                                                                                 return true; // do not display anything...
                                                                                         },
-                                                                                        "console_message":function (self, object, p0, p1) {
+                                                                                        console_message : function (self, object, p0, p1) {
                                                                                            //  console.log(object);
                                                                                                 if (!object.match(/^\{/)) {
                                                                                                 
@@ -2759,7 +2776,7 @@ Window=new XObject({
                                                                                                 //Seed.print('c:'+c);
                                                                                                 return ret;
                                                                                         },
-                                                                                        "drag_motion":function (w, ctx,  x,   y,   time, ud) {
+                                                                                        drag_motion : function (w, ctx,  x,   y,   time, ud) {
                                                                                            // console.log('DRAG MOTION'); 
                                                                                                 // status:
                                                                                                 // if lastCurrentNode == this.currentNode.. -- don't change anything..
@@ -2799,7 +2816,7 @@ Window=new XObject({
                                                                                                 // for tree we should handle this...
                                                                                                 return true;
                                                                                         },
-                                                                                        "drag_drop":function (w, ctx, x, y,time, ud) {
+                                                                                        drag_drop : function (w, ctx, x, y,time, ud) {
                                                                                                print("TARGET: drag-drop");
                                                                                                 var is_valid_drop_site = true;
                                                                                                 
@@ -2818,7 +2835,7 @@ Window=new XObject({
                                                                                         
                                                                                                return  is_valid_drop_site;
                                                                                         },
-                                                                                        "drag_data_received":function (w, ctx,  x,  y, sel_data,  target_type,  time, ud) 
+                                                                                        drag_data_received : function (w, ctx,  x,  y, sel_data,  target_type,  time, ud) 
                                                                                             {
                                                                                                 print("Browser: drag-data-received");
                                                                                                 var delete_selection_data = false;
@@ -3193,7 +3210,7 @@ Window=new XObject({
                                                                                     pack : "pack_start,false,false,0",
                                                                                     label : "Run The Application",
                                                                                     listeners : {
-                                                                                        "button_press_event":function (self, event) {
+                                                                                        button_press_event : function (self, event) {
                                                                                             // call render on left tree - with special option!?!
                                                                                          
                                                                                             //print("GET PROEJCT");
@@ -3276,7 +3293,7 @@ Window=new XObject({
                                                                                                     },
                                                                                                     id : "view",
                                                                                                     listeners : {
-                                                                                                        "drag_motion":function (self, ctx, x, y, time) {
+                                                                                                        drag_motion : function (self, ctx, x, y, time) {
                                                                                                             
                                                                                                                         // A) find out from drag all the places that node could be dropped.
                                                                                                                         var src = Gtk.drag_get_source_widget(ctx);
@@ -3313,7 +3330,7 @@ Window=new XObject({
                                                                                                                         // for tree we should handle this...
                                                                                                                         return true;
                                                                                                         },
-                                                                                                        "drag_drop":function (self,ctx, x, y, time) {
+                                                                                                        drag_drop : function (self,ctx, x, y, time) {
                                                                                                                Seed.print("TARGET: drag-drop");
                                                                                                                 var is_valid_drop_site = true;
                                                                                                                 
@@ -3333,7 +3350,7 @@ Window=new XObject({
                                                                                                                 return  is_valid_drop_site;
                                                                                                           
                                                                                                         },
-                                                                                                        "drag_data_received":function (w, ctx,  x,  y, sel_data,  target_type,  time, ud) 
+                                                                                                        drag_data_received : function (w, ctx,  x,  y, sel_data,  target_type,  time, ud) 
                                                                                                             {
                                                                                                                 Seed.print("GtkView: drag-data-received");
                                                                                                                 var delete_selection_data = false;
@@ -3370,7 +3387,7 @@ Window=new XObject({
                                                                                                                 Gtk.drag_finish (ctx, dnd_success, delete_selection_data, time);
                                                                                                                 return true;
                                                                                                             },
-                                                                                                        "button_press_event":function (self, event) {
+                                                                                                        button_press_event : function (self, event) {
                                                                                                           this.pressed = false;
                                                                                                             return false;
                                                                                                         }
@@ -3492,7 +3509,7 @@ Window=new XObject({
                                                                     xtype: GtkSource.Buffer,
                                                                     pack : "set_buffer",
                                                                     listeners : {
-                                                                        "changed":function (self) {
+                                                                        changed : function (self) {
                                                                             var s = new Gtk.TextIter();
                                                                             var e = new Gtk.TextIter();
                                                                             this.el.get_start_iter(s);
@@ -3577,7 +3594,7 @@ Window=new XObject({
                                                     xtype: Gtk.Button,
                                                     pack : "pack_start,false,true",
                                                     listeners : {
-                                                        "clicked":function (self) {
+                                                        clicked : function (self) {
                                                                this.get('/RightPalete').show();
                                                         }
                                                     },
@@ -3600,7 +3617,7 @@ Window=new XObject({
                                                         this.el.add_events ( Gdk.EventMask.BUTTON_MOTION_MASK );
                                                     },
                                                     listeners : {
-                                                        "enter_notify_event":function (self, event) {
+                                                        enter_notify_event : function (self, event) {
                                                             this.get('/RightPalete').show();
                                                             return false;
                                                         }
@@ -3626,7 +3643,7 @@ Window=new XObject({
                                                             xtype: Gtk.Button,
                                                             pack : "pack_start,false,true",
                                                             listeners : {
-                                                                "clicked":function (self) {
+                                                                clicked : function (self) {
                                                                        this.get('/RightPalete').hide();
                                                                 }
                                                             },
@@ -3696,7 +3713,7 @@ Window=new XObject({
                                                             headers_visible : false,
                                                             enable_tree_lines : true,
                                                             listeners : {
-                                                                "drag_begin":function (self, ctx) {
+                                                                drag_begin : function (self, ctx) {
                                                                     // we could fill this in now...
                                                                         Seed.print('SOURCE: drag-begin');
                                                                         
@@ -3730,7 +3747,7 @@ Window=new XObject({
                                                                         
                                                                         return true;
                                                                 },
-                                                                "drag_data_get":function (self, drag_context, selection_data, info, time) {
+                                                                drag_data_get : function (self, drag_context, selection_data, info, time) {
                                                                        //Seed.print('Palete: drag-data-get: ' + target_type);
                                                                         if (this.el.dragData && this.el.dragData.length ) {
                                                                             selection_data.set_text(this.el.dragData ,this.el.dragData.length);
@@ -3741,7 +3758,7 @@ Window=new XObject({
                                                                         
                                                                         
                                                                 },
-                                                                "drag_end":function (self, drag_context) {
+                                                                drag_end : function (self, drag_context) {
                                                                        Seed.print('SOURCE: drag-end');
                                                                        this.el.dragData = false;
                                                                        this.el.dropList = false;