Test.GtkWriter.vala.c
[app.Builder.js] / Builder4 / EditProject.bjs
1 {
2     "id": "file-gtk-6",
3     "name": "EditProject",
4     "parent": "",
5     "title": false,
6     "path": "/home/alan/gitlive/app.Builder.js/Builder4/EditProject.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "destroy_event": " (self, event) => {\n     this.el.hide();\n                return false;\n}",
11                 "response": "  (self, id) => {\n     if (id < 1) {\n            this.el.hide();\n            return;\n    }\n    if (_this.xtype.getValue().length < 1) {\n        StandardErrorDialog.show(\"You have to set Project type\");             \n        return;\n    }\n    if (_this.dir.el.get_filename().length < 1) {\n        StandardErrorDialog.show(\"You have to select a folder\");             \n        return;\n    }\n\n    this.el.hide();\n    \n    \n    var fn = _this.dir.el.get_filename();\n    \n    var project = Project.Project.factory(_this.xtype.getValue(), fn);\n    \n    \n    //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n    \n    this.success(project);\n\n}"
12             },
13             ".signal:void:success(Project.Project project)": "",
14             "border_width": 3,
15             "default_height": 500,
16             "default_width": 600,
17             "title": "Project Properties",
18             "xtype": "Dialog",
19             "|deletable": "true",
20             "|modal": "true",
21             "|void: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    //this.success = c.success;\n}\n",
22             "|xns": "Gtk",
23             "items": [
24                 {
25                     "xtype": "VBox",
26                     "|pack": " get_content_area().add \n \n",
27                     "|xns": "Gtk",
28                     "items": [
29                         {
30                             "|xns": "Gtk",
31                             "xtype": "HBox",
32                             "pack": "pack_start,false,true,3",
33                             "items": [
34                                 {
35                                     "|xns": "Gtk",
36                                     "xtype": "Label",
37                                     "pack": "pack_start,false,true,3",
38                                     "label": "Project type :"
39                                 },
40                                 {
41                                     "id": "xtype",
42                                     "pack": "pack_end,true,true,3",
43                                     "xtype": "ComboBox",
44                                     "|init": " this.el.add_attribute(cellrender , \"markup\", 1 );  \n \n",
45                                     "|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    }",
46                                     "|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",
47                                     "|xns": "Gtk",
48                                     "items": [
49                                         {
50                                             "id": "cellrender",
51                                             "pack": "pack_start,true",
52                                             "xtype": "CellRendererText",
53                                             "|xns": "Gtk"
54                                         },
55                                         {
56                                             "columns": "typeof(string),typeof(string)",
57                                             "id": "model",
58                                             "n_columns": 3,
59                                             "pack": "set_model",
60                                             "xtype": "ListStore",
61                                             "|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",
62                                             "|xns": "Gtk"
63                                         }
64                                     ]
65                                 }
66                             ]
67                         },
68                         {
69                             "|xns": "Gtk",
70                             "xtype": "FileChooserWidget",
71                             "pack": "pack_end,true,true,5",
72                             "|action": "Gtk.FileChooserAction.SELECT_FOLDER",
73                             "id": "dir",
74                             "|select_multiple": false
75                         }
76                     ]
77                 },
78                 {
79                     "|xns": "Gtk",
80                     "xtype": "Button",
81                     "pack": "add_action_widget,1",
82                     "label": "OK"
83                 },
84                 {
85                     "|xns": "Gtk",
86                     "xtype": "Button",
87                     "pack": "add_action_widget,0",
88                     "label": "Cancel"
89                 }
90             ]
91         }
92     ],
93     "permname": "",
94     "modOrder": ""
95 }