Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 20 May 2014 13:18:24 +0000 (21:18 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 20 May 2014 13:18:24 +0000 (21:18 +0800)
Builder4/Editor.js
Builder4/Editor.vala

Builder4/Editor.bjs
Builder4/Editor.js
Builder4/Editor.vala

index 416c2f4..42a3ac0 100644 (file)
@@ -51,7 +51,7 @@
                             "id": "RightEditor",
                             "pack": "add",
                             "xtype": "ScrolledWindow",
-                            "|save": "function() {\n    // make sure we have an active path..\n     if (!this.get('/Editor').activePath) {\n        return true;\n     }\n     \n     var str = this.get('/Editor.buffer').toString();\n     if (!this.get('/Editor.buffer').checkSyntax()) {\n         this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n         return false;\n     }\n     \n     this.get('/LeftPanel.model').changed(  str , false);\n     this.get('/Editor').dirty = false;\n     this.get('/Editor.save_button').el.sensitive = false;\n     return true;\n}\n/*--\nbool () {\n\n     if (_this.active_path.length  < 1 ) {\n        return true;\n     }\n     \n     var str = Editor.buffer.toString();\n     \n     if (!Editor.buffer.checkSyntax()) {\n         print(\"check syntax failed\");\n         //this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n         return false;\n     }\n     \n     // LeftPanel.model.changed(  str , false);\n     _this.dirty = false;\n     _this.save_button.sensitive = false;\n     return true;\n}\n\n*/",
+                            "|save": "function() {\n    // make sure we have an active path..\n     if (!this.get('/Editor').activePath) {\n        return true;\n     }\n     \n     var str = this.get('/Editor.buffer').toString();\n     if (!this.get('/Editor.buffer').checkSyntax()) {\n         this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n         return false;\n     }\n     \n     this.get('/LeftPanel.model').changed(  str , false);\n     this.get('/Editor').dirty = false;\n     this.get('/Editor.save_button').el.sensitive = false;\n     return true;\n}\n/*--\nbool () {\n\n     if (_this.active_path.length  < 1 ) {\n        return true;\n     }\n     \n     var str = Editor.buffer.toString();\n     \n     if (!Editor.buffer.checkSyntax()) {\n         print(\"check syntax failed\");\n         //this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n         return false;\n     }\n     \n     // LeftPanel.model.changed(  str , false);\n     _this.dirty = false;\n     _this.save_button.sensitive = false;\n     print(\"set save button grey\");\n     return true;\n}\n\n*/",
                             "|xns": "Gtk",
                             "items": [
                                 {
index 0ad231f..7cf3728 100644 (file)
@@ -160,6 +160,7 @@ Editor=new XObject({
                          // LeftPanel.model.changed(  str , false);
                          _this.dirty = false;
                          _this.save_button.sensitive = false;
+                         print("set save button grey");
                          return true;
                     }
                     
index 72c5869..506043e 100644 (file)
@@ -178,6 +178,7 @@ public class Xcls_Editor : Gtk.Window
                  // LeftPanel.model.changed(  str , false);
                  _this.dirty = false;
                  _this.save_button.sensitive = false;
+                 print("set save button grey");
                  return true;
             }
     }