Sample/Editor.bjs
authorAlan Knowles <alan@akbkhome.com>
Mon, 1 Nov 2010 06:10:37 +0000 (14:10 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 1 Nov 2010 06:10:37 +0000 (14:10 +0800)
Sample/Editor.bjs

index d76b61a..dc6eda2 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "id": "file-gtk-13",
+    "id": "file-gtk-10",
     "name": "Editor",
     "parent": "",
     "title": false,
@@ -45,7 +45,7 @@
                             "id": "RightEditor",
                             "pack": "add",
                             "xtype": "ScrolledWindow",
-                            "|save": "function() {\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",
+                            "|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",
                             "|xns": "Gtk",
                             "items": [
                                 {
@@ -84,5 +84,6 @@
             ]
         }
     ],
-    "permname": ""
+    "permname": "",
+    "modOrder": ""
 }
\ No newline at end of file