resources/RooUsage.txt
[app.Builder.js] / src / Builder4 / EditProject.bjs
index d8c9ac5..b55233e 100644 (file)
 {
-    "id": "file-gtk-8",
-    "name": "EditProject",
-    "parent": "",
-    "title": false,
-    "path": "/home/alan/gitlive/app.Builder.js/Builder4/EditProject.bjs",
-    "items": [
+ "name" : "EditProject",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/EditProject.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "builder",
+ "items" : [
+  {
+   "listeners" : {
+    "destroy_event" : "(self, event) => {\n\tthis.el.response(0);\n//     this.el.hide();\n    return false;\n}"
+   },
+   "default_width" : 600,
+   "$ deletable" : true,
+   "title" : "Project Properties",
+   "xtype" : "Dialog",
+   "default_height" : 500,
+   "| Project.Project? show" : "() {\n      \n\n    //[ 'xtype'  ].forEach(function(k) {\n    //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n    //});\n\t// shouild set path..\n    _this.model.loadData();\n    this.el.show_all();\n    \n    var err_dialog = StandardErrorDialog.singleton();\n\n    var id = -1;\n    while (id < 0) {\n         id =  this.el.run();\n         if (id < 1) {\n                this.el.hide();\n                return null;\n        }\n \n         \n          if (_this.xtype.getValue().length < 1) {\n               \n                err_dialog.show(_this.el,\"You have to set Project type\");             \n                id = -1;\n                continue;\n            }\n            if (_this.dir.el.get_filename().length < 1) {\n \n                err_dialog.show(_this.el,\"You have to select a folder\");             \n                id = -1;\n                continue;\n            }\n           \n    }\n    \n    this.el.hide();\n    \n    \n    \n \n    var fn = _this.dir.el.get_filename();\n    print(\"add %s\\n\" , fn);\n    \n    var project = Project.Project.factory(_this.xtype.getValue(), fn);\n    project.save();\n    Project.projects.set(project.name,project);\n    \n    //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n    \n    return project;\n\n    \n    //this.success = c.success;\n}\n",
+   "$ modal" : true,
+   "$ xns" : "Gtk",
+   "border_width" : 3,
+   "name" : "EditProject",
+   "items" : [
+    {
+     "bool expand" : true,
+     "xtype" : "Box",
+     "$ pack" : " get_content_area().add \n \n",
+     "$ xns" : "Gtk",
+     "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+     "$ homogeneous" : false,
+     "items" : [
+      {
+       "xtype" : "Box",
+       "* pack" : "pack_start,false,true,3",
+       "$ xns" : "Gtk",
+       "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+       "$ homogeneous" : false,
+       "items" : [
         {
-            "listeners": {
-                "destroy_event": " (self, event) => {\n  this.el.response(0);\n//     this.el.hide();\n    return false;\n}"
-            },
-            "border_width": 3,
-            "default_height": 500,
-            "default_width": 600,
-            "name": "EditProject",
-            "title": "Project Properties",
-            "xtype": "Dialog",
-            "|Project.Project?:show": "() {\n      \n\n    //[ 'xtype'  ].forEach(function(k) {\n    //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n    //});\n\t// shouild set path..\n    _this.model.loadData();\n    this.el.show_all();\n    \n    var err_dialog = StandardErrorDialog.singleton();\n\n    var id = -1;\n    while (id < 0) {\n         id =  this.el.run();\n         if (id < 1) {\n                this.el.hide();\n                return null;\n        }\n\n         \n          if (_this.xtype.getValue().length < 1) {\n               \n                err_dialog.show(_this.el,\"You have to set Project type\");             \n                id = -1;\n                continue;\n            }\n            if (_this.dir.el.get_filename().length < 1) {\n \n                err_dialog.show(_this.el,\"You have to select a folder\");             \n                id = -1;\n                continue;\n            }\n           \n    }\n    \n    this.el.hide();\n    \n    \n    \n \n    var fn = _this.dir.el.get_filename();\n    print(\"add %s\\n\" , fn);\n    \n    var project = Project.Project.factory(_this.xtype.getValue(), fn);\n    project.save();\n    Project.projects.set(project.name,project);\n    \n    //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n    \n    return project;\n\n    \n    //this.success = c.success;\n}\n",
-            "|deletable": "true",
-            "|modal": "true",
-            "|xns": "Gtk",
-            "items": [
-                {
-                    "|homogeneous": "false",
-                    "xtype": "VBox",
-                    "|pack": " get_content_area().add \n \n",
-                    "|xns": "Gtk",
-                    "items": [
-                        {
-                            "|homogeneous": "false",
-                            "pack": "pack_start,false,true,3",
-                            "xtype": "HBox",
-                            "|xns": "Gtk",
-                            "items": [
-                                {
-                                    "|xns": "Gtk",
-                                    "xtype": "Label",
-                                    "pack": "pack_start,false,true,3",
-                                    "label": "Project type :"
-                                },
-                                {
-                                    "id": "xtype",
-                                    "pack": "pack_end,true,true,3",
-                                    "xtype": "ComboBox",
-                                    "|init": " this.el.add_attribute(_this.cellrender.el , \"markup\", 1 );  \n \n",
-                                    "|setValue": " (v)    {\n        var el = this.el;\n        el.set_active(-1);\n        \n        for (var i =0;i < this.data.length; i++ ) {\n            if (v == this.data.nth_datA(i)) {\n                el.set_active(ix);\n                return false;\n            }\n        }\n    }",
-                                    "|string:getValue": " () {\n     var ix = this.el.get_active();\n        if (ix < 0 ) {\n            return \"\";\n        }\n        switch(ix) {\n            case 0:\n                return \"Roo\";\n            case 1:\n                return \"Gtk\";\n        }\n        return \"\";\n}\n",
-                                    "|xns": "Gtk",
-                                    "items": [
-                                        {
-                                            "id": "cellrender",
-                                            "pack": "pack_start,true",
-                                            "xtype": "CellRendererText",
-                                            "|xns": "Gtk"
-                                        },
-                                        {
-                                            "|columns": "typeof(string),typeof(string)",
-                                            "id": "model",
-                                            "n_columns": 2,
-                                            "pack": "set_model",
-                                            "xtype": "ListStore",
-                                            "|void:loadData": "  ( ) {\n        this.el.clear();\n                      \n        Gtk.TreeIter iter;\n                \n        el.append(out iter);\n        \n        el.set_value(iter, 0, \"Roo\");\n        el.set_value(iter, 1, \"Roo Project\");\n         el.append(out iter);\n        \n        el.set_value(iter, 0, \"Gtk\");\n        el.set_value(iter, 1, \"Gtk Project\");\n         \n              \n                                     \n}\n",
-                                            "|xns": "Gtk"
-                                        }
-                                    ]
-                                }
-                            ]
-                        },
-                        {
-                            "|create_folders": "false",
-                            "id": "dir",
-                            "pack": "pack_end,true,true,5",
-                            "xtype": "FileChooserWidget",
-                            "|action": "Gtk.FileChooserAction.SELECT_FOLDER",
-                            "|select_multiple": "false",
-                            "|xns": "Gtk"
-                        }
-                    ]
-                },
-                {
-                    "label": "OK",
-                    "pack": "add_action_widget,1",
-                    "xtype": "Button",
-                    "|xns": "Gtk"
-                },
-                {
-                    "|xns": "Gtk",
-                    "xtype": "Button",
-                    "pack": "add_action_widget,0",
-                    "label": "Cancel"
-                }
-            ]
+         "label" : "Project type :",
+         "xtype" : "Label",
+         "* pack" : "pack_start,false,true,3",
+         "$ xns" : "Gtk"
+        },
+        {
+         "| string getValue" : " () {\n     var ix = this.el.get_active();\n        if (ix < 0 ) {\n            return \"\";\n        }\n        switch(ix) {\n            case 0:\n                return \"Roo\";\n            case 1:\n                return \"Gtk\";\n        }\n        return \"\";\n}\n",
+         "id" : "xtype",
+         "* init" : " this.el.add_attribute(_this.cellrender.el , \"markup\", 1 );  \n  ",
+         "xtype" : "ComboBox",
+         "* pack" : "pack_end,true,true,3",
+         "$ xns" : "Gtk",
+         "items" : [
+          {
+           "id" : "cellrender",
+           "* pack" : "pack_start,true",
+           "xtype" : "CellRendererText",
+           "$ xns" : "Gtk"
+          },
+          {
+           "id" : "model",
+           "xtype" : "ListStore",
+           "* pack" : "set_model",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk",
+           "| void loadData" : "  ( ) {\n        this.el.clear();\n                      \n        Gtk.TreeIter iter;\n                \n        el.append(out iter);\n        \n        el.set_value(iter, 0, \"Roo\");\n        el.set_value(iter, 1, \"Roo Project\");\n         el.append(out iter);\n        \n        el.set_value(iter, 0, \"Gtk\");\n        el.set_value(iter, 1, \"Gtk Project\");\n         \n              \n                                     \n}\n"
+          }
+         ]
         }
-    ],
-    "permname": "",
-    "modOrder": ""
+       ]
+      },
+      {
+       "$ create_folders" : false,
+       "id" : "dir",
+       "$ action" : "Gtk.FileChooserAction.SELECT_FOLDER",
+       "bool expand" : true,
+       "* pack" : "pack_end,true,true,5",
+       "xtype" : "FileChooserWidget",
+       "$ xns" : "Gtk",
+       "$ select_multiple" : false
+      }
+     ]
+    },
+    {
+     "label" : "OK",
+     "* pack" : "add_action_widget,1",
+     "xtype" : "Button",
+     "$ xns" : "Gtk"
+    },
+    {
+     "label" : "Cancel",
+     "xtype" : "Button",
+     "* pack" : "add_action_widget,0",
+     "$ xns" : "Gtk"
+    }
+   ]
+  }
+ ]
 }
\ No newline at end of file