Attribute changed old-javascript
[app.Builder.js] / old-javascript / Builder4 / ProjectSettings.bjs
1 {
2     "name" : "ProjectSettings",
3     "parent" : "",
4     "title" : "",
5     "path" : "/home/alan/gitlive/app.Builder.js/Builder4/ProjectSettings.bjs",
6     "permname" : "",
7     "modOrder" : "",
8     "items" : [
9         {
10             "@ void buttonPressed" : "(string btn)",
11             "id" : "ProjectSettings",
12             "| void show" : " (Project.Project project) {\n    _this.project = project;\n    _this.path.el.label = project.firstPath();\n    // get the active project.\n     var lm = Gtk.SourceLanguageManager.get_default();\n                \n    ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(\n    \n        lm.get_language(\"html\"));\n  \n    //print (project.fn);\n    //project.runhtml = project.runhtml || '';\n    _this.view.el.get_buffer().set_text(project.runhtml);\n    \n       \n    _this.rootURL.el.set_text( _this.project.rootURL );\n    _this.base_template.el.set_text(_this.project.base_template);    \n   \n    \n    //this.el.show_all();\n}\n",
13             "# Project.Project project" : "",
14             "xtype" : "VBox",
15             "| void save" : "()\n{\n   var buf =    _this.view.el.get_buffer();\n   Gtk.TextIter s;\n     Gtk.TextIter e;\n    buf.get_start_iter(out s);\n    buf.get_end_iter(out e);\n      _this.project.runhtml = buf.get_text(s,e,true);\n      \n    _this.project.rootURL = _this.rootURL.el.get_text();\n    _this.project.base_template = _this.base_template.el.get_text();    \n    \n    \n}",
16             "$ xns" : "Gtk",
17             "border_width" : 5,
18             "$ homogeneous" : false,
19             "items" : [
20                 {
21                     "* pack" : "pack_start,false,false,0",
22                     "xtype" : "HBox",
23                     "gboolean expand" : false,
24                     "$ xns" : "Gtk",
25                     "$ homogeneous" : true,
26                     "gboolean vexpand" : false,
27                     "items" : [
28                         {
29                             "listeners" : {
30                                 "button_press_event" : "() => {\n    _this.save();\n          \n    _this.buttonPressed(\"apply\");\n        return false;\n}"
31                             },
32                             "label" : "Apply",
33                             "* pack" : "add",
34                             "xtype" : "Button",
35                             "$ xns" : "Gtk"
36                         },
37                         {
38                             "listeners" : {
39                                 "button_press_event" : "() => {\n       _this.save();\n          \n    _this.buttonPressed(\"save\");\n        return false;\n}"
40                             },
41                             "label" : "Save",
42                             "* pack" : "add",
43                             "xtype" : "Button",
44                             "$ xns" : "Gtk"
45                         }
46                     ]
47                 },
48                 {
49                     "label" : "filename",
50                     "id" : "path",
51                     "xalign" : 0,
52                     "* pack" : "pack_start,false,false,0",
53                     "xtype" : "Label",
54                     "$ xns" : "Gtk"
55                 },
56                 {
57                     "label" : "HTML To insert at end of <HEAD>",
58                     "xtype" : "Label",
59                     "* pack" : "pack_start,false,false,0",
60                     "$ xns" : "Gtk"
61                 },
62                 {
63                     "* pack" : "pack_start,false,false,0",
64                     "xtype" : "HBox",
65                     "gboolean expand" : false,
66                     "$ xns" : "Gtk",
67                     "$ homogeneous" : false,
68                     "items" : [
69                         {
70                             "label" : "HTML template file",
71                             "* pack" : "pack_start,false,false,0",
72                             "xtype" : "Label",
73                             "$ xns" : "Gtk"
74                         },
75                         {
76                             "id" : "base_template",
77                             "* pack" : "add",
78                             "xtype" : "Entry",
79                             "$ xns" : "Gtk"
80                         }
81                     ]
82                 },
83                 {
84                     "* pack" : "pack_start,false,false,0",
85                     "xtype" : "HBox",
86                     "gboolean expand" : false,
87                     "$ xns" : "Gtk",
88                     "$ homogeneous" : false,
89                     "items" : [
90                         {
91                             "label" : "root URL",
92                             "* pack" : "pack_start,false,false,0",
93                             "xtype" : "Label",
94                             "$ xns" : "Gtk"
95                         },
96                         {
97                             "id" : "rootURL",
98                             "* pack" : "add",
99                             "xtype" : "Entry",
100                             "$ xns" : "Gtk"
101                         }
102                     ]
103                 },
104                 {
105                     "* pack" : "pack_start,true,true,0",
106                     "xtype" : "ScrolledWindow",
107                     "$ xns" : "Gtk",
108                     "items" : [
109                         {
110                             "listeners" : {
111                                 "key_release_event" : " ( event) =>{\n    if (event.keyval != 115) {\n        return false;\n         \n    }\n    if   ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {\n        return false;\n    }\n     var buf =    this.el.get_buffer();\n    Gtk.TextIter s;\n    Gtk.TextIter e;\n    buf.get_start_iter(out s);\n    buf.get_end_iter(out e);\n    _this.project.runhtml = buf.get_text(s,e,true);\n    \n          \n    _this.buttonPressed(\"save\");\n     \n    return false;\n         \n}"
112                             },
113                             "id" : "view",
114                             "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(9000);\n    this.el.override_font(description);",
115                             "xtype" : "View",
116                             "* pack" : "add",
117                             "$ xns" : "GtkSource"
118                         }
119                     ]
120                 }
121             ]
122         }
123     ]
124 }