Builder4/DialogNewComponent.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 10 Jun 2014 10:30:51 +0000 (18:30 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 10 Jun 2014 10:30:51 +0000 (18:30 +0800)
Builder4/DialogNewComponent.js
Builder4/DialogNewComponent.vala

Builder4/DialogNewComponent.bjs
Builder4/DialogNewComponent.js
Builder4/DialogNewComponent.vala

index f9cdc9a..fe9e83e 100644 (file)
@@ -7,7 +7,7 @@
     "items": [
         {
             "listeners": {
-                "delete_event": "function (self, event) {\n    this.el.hide();\n    return true;\n}\n\n",
+                "delete_event": "(self, event) => {\n    this.el.hide();\n    return true;\n}\n\n",
                 "response": "function (self, response_id) {\n\tif (response_id < 1) { // cancel!\n            this.el.hide();\n            return;\n        }\n\n        if (DialogNewComponent.name.el.get_text().length  < 1) {\n            StandardErrorDialog.show(\n                \"You haDe to set Project name \"\n            );\n             \n            return;\n        }\n        var isNew = this.file.name.length  > 0 ? false : true;\n        \n        if (this.file.name.length > 0 && this.file.name != _this.name.el.get_text()) {\n            StandardErrorDialog.show(\n                \"Sorry changing names does not work yet. \"\n            );\n             \n            return;\n        }\n        // FIXME - this may be more complicated...\n        //for (var i in this.def) {\n        //    this.file[i] =  this.get(i).el.get_text();\n        //}\n       \n        if (!isNew) {\n            this.file.save();\n            this.el.hide();\n            return;\n        }\n       \n    \n\tvar dir ='';\n\t//FIXME...\n        //for (var i in this.project.paths) {\n \t//\tdir = i;\n\t//\tbreak;\n\t//}\n\n \n        \n        // what about .js ?\n        if (GLib.file_test (GLib.dir + \"/\" + this.file.name + \".bjs\", GLib.FileTest.EXISTS)) {\n            StandardErrorDialog.show(\n                \"That file already exists\"\n            ); \n            return;\n        }\n        this.el.hide();\n        \n        \n        //var tmpl = this.project.loadFileOnly(DialogNewComponent.get('template').getValue());\n         \n        var nf = _this.project.create(dir + \"/\" + this.file.name + \".bjs\");\n        //for (var i in this.file) {\n        //    nf[i] = this.file[i];\n        //}\n        \n        if (DialogNewComponent.success != null) {\n            DialogNewComponent.success(_this.project, nf);\n        }\n}",
                 "show": "function (self) {\n  this.el.show_all();\n}"
             },
index 9903949..5e3a07f 100644 (file)
@@ -12,7 +12,7 @@ XObject = imports.XObject.XObject;
 DialogNewComponent=new XObject({
     xtype: Gtk.Dialog,
     listeners : {
-        delete_event : function (self, event) {
+        delete_event : (self, event) => {
             this.el.hide();
             return true;
         },
index 44a4065..845a149 100644 (file)
@@ -54,7 +54,7 @@ public class Xcls_DialogNewComponent
         this.el.add_action_widget (  child_2.el , 1 );
 
         // listeners 
-        this.el.delete_event.connect(  (self, event) => {
+        this.el.delete_event.connect( (self, event) => {
             this.el.hide();
             return true;
         } );
@@ -145,9 +145,9 @@ public class Xcls_DialogNewComponent
 
     // skip |modal - already used 
 
-    // skip |show - could not find seperator
+    // skip |show - no return type
 
-    // skip |xns - could not find seperator
+    // skip |xns - no return type
 
     // skip items - not pipe 
 
@@ -176,7 +176,7 @@ public class Xcls_DialogNewComponent
 
         // userdefined functions 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xtype - not pipe 
 
@@ -245,7 +245,7 @@ public class Xcls_DialogNewComponent
 
         // skip |homogeneous - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip items - not pipe 
 
@@ -288,7 +288,7 @@ public class Xcls_DialogNewComponent
 
         // skip |justify - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -324,7 +324,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -368,7 +368,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -404,7 +404,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -451,7 +451,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -487,7 +487,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -531,7 +531,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -567,7 +567,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -611,7 +611,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -647,7 +647,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -691,7 +691,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -727,7 +727,7 @@ public class Xcls_DialogNewComponent
 
         // skip |visible - already used 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xvala_cls - not pipe 
 
@@ -754,7 +754,7 @@ public class Xcls_DialogNewComponent
 
         // userdefined functions 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xtype - not pipe 
 
@@ -787,7 +787,7 @@ public class Xcls_DialogNewComponent
 
         // userdefined functions 
 
-        // skip |xns - could not find seperator
+        // skip |xns - no return type
 
         // skip xtype - not pipe