add full path to file properties dialog
[roobuilder] / src / Builder4 / PopoverFileDetails.bjs
1 {
2  "build_module" : "builder",
3  "items" : [
4   {
5    "# JsRender.JsRender file" : "null",
6    "# Project.Project project" : "",
7    "# bool new_window" : true,
8    "$ xns" : "Gtk",
9    "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
10    "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
11    "Xcls_MainWindow mainwindow" : "null",
12    "bool done" : false,
13    "bool modal" : true,
14    "id" : "PopoverFileDetails",
15    "items" : [
16     {
17      "$ pack" : "add",
18      "$ xns" : "Gtk",
19      "* pack" : "add",
20      "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
21      "bool homogeneous" : false,
22      "items" : [
23       {
24        "$ xns" : "Gtk",
25        "* pack" : "pack_start,false,true,0",
26        "string title" : "Add / Edit File",
27        "xtype" : "HeaderBar"
28       },
29       {
30        "$ homogeneous" : true,
31        "$ xns" : "Gtk",
32        "* pack" : "pack_start,false,false,4",
33        "id" : "grid",
34        "int margin_left" : 4,
35        "int margin_right" : 4,
36        "items" : [
37         {
38          "$ justify" : "Gtk.Justification.RIGHT",
39          "$ xns" : "Gtk",
40          "* pack" : "attach,0,0,1,1",
41          "id" : "filetypelbl",
42          "label" : "File type",
43          "x_options" : 4,
44          "xalign" : 0.90000000000000002,
45          "xtype" : "Label"
46         },
47         {
48          "$ xns" : "Gtk",
49          "* init" : "this.el.add_attribute(_this.ftdbcellrenderer.el , \"markup\", 1 );",
50          "* pack" : "attach,1,0,1,1",
51          "id" : "filetype",
52          "items" : [
53           {
54            "$ xns" : "Gtk",
55            "* pack" : "pack_start,true",
56            "id" : "ftdbcellrenderer",
57            "xtype" : "CellRendererText"
58           },
59           {
60            "$ columns" : "typeof(string),typeof(string)",
61            "$ xns" : "Gtk",
62            "* pack" : "set_model",
63            "id" : "ftdbmodel",
64            "n_columns" : 2,
65            "xtype" : "ListStore",
66            "| void loadData" : [
67             "  (string cur) {",
68             "    this.el.clear();                                    ",
69             "    Gtk.TreeIter iter;",
70             "    var el = this.el;",
71             "    ",
72             "   /// el.append(out iter);",
73             "    ",
74             "     ",
75             "   // el.set_value(iter, 0, \"\");",
76             "   // el.set_value(iter, 1, \"aaa  - Just add Element - aaa\");",
77             "",
78             "    el.append(out iter);",
79             "",
80             "    ",
81             "    el.set_value(iter, 0, \"bjs\");",
82             "    el.set_value(iter, 1, \"User Interface File (bjs)\");",
83             "    _this.filetype.el.set_active_iter(iter);",
84             "",
85             "    el.append(out iter);",
86             "    ",
87             "    el.set_value(iter, 0, \"vala\");",
88             "    el.set_value(iter, 1, \"Vala\");",
89             "\tif (cur == \"vala\") {",
90             "\t    _this.filetype.el.set_active_iter(iter);",
91             "    }",
92             "",
93             "",
94             "",
95             "    el.append(out iter);",
96             "    ",
97             "    el.set_value(iter, 0, \"js\");",
98             "    el.set_value(iter, 1, \"Javascript\");",
99             "",
100             "\tif (cur == \"js\") {",
101             "\t    _this.filetype.el.set_active_iter(iter);",
102             "    }",
103             "",
104             "    el.append(out iter);",
105             "    ",
106             "    el.set_value(iter, 0, \"css\");",
107             "    el.set_value(iter, 1, \"CSS\");",
108             "",
109             "\tif (cur == \"css\") {",
110             "\t    _this.filetype.el.set_active_iter(iter);",
111             "    }",
112             "                                     ",
113             "}",
114             ""
115            ]
116           }
117          ],
118          "listeners" : {
119           "changed" : [
120            "() => {",
121            "\tGtk.TreeIter iter;",
122            "\tbool is_bjs = true;",
123            "\tif (this.el.get_active_iter(out iter)) {",
124            "\t\tValue vfname;",
125            "\t\t_this.ftdbmodel.el.get_value (iter, 0, out vfname);",
126            "\t\t is_bjs = ((string)vfname) == \"bjs\";",
127            "\t}",
128            "    ",
129            "  ",
130            "    // directory is only available for non-bjs ",
131            "    this.showhide(is_bjs);",
132            "",
133            "",
134            "}",
135            ""
136           ]
137          },
138          "xtype" : "ComboBox",
139          "| void showhide" : [
140           "(bool is_bjs) {",
141           "",
142           "",
143           "\tif (_this.project.xtype != \"Roo\") {",
144           "\t \tis_bjs = false;",
145           " \t}",
146           "",
147           "\tfor (var i = 2; i < 9;i++) {",
148           "\t\tvar el = _this.grid.el.get_child_at(0,i);",
149           "\t\t",
150           "\t\tvar showhide= is_bjs;",
151           "\t\tif (i> 7) {",
152           "\t\t\tshowhide = !showhide;",
153           "\t\t}",
154           "\t\t",
155           "\t\tif (showhide) {",
156           "\t\t   el.show();",
157           "\t\t} else {",
158           "\t\t\tel.hide();",
159           "\t\t}",
160           "\t\t el = _this.grid.el.get_child_at(1,i);",
161           "\t\tif (showhide) {",
162           "\t\t   el.show();",
163           "\t\t} else {",
164           "\t\t\tel.hide();",
165           "\t\t}     ",
166           "    }",
167           "    // load up the directories",
168           "    //??? why can we not create bjs files in other directories??",
169           "\t//if (!is_bjs && _this.file.path.length < 1) {",
170           "\t",
171           "\t\t_this.dirmodel.loadData();",
172           "\t\t",
173           "\t\t",
174           "\t//}",
175           "   ",
176           "    ",
177           "}",
178           ""
179          ]
180         },
181         {
182          "$ justify" : "Gtk.Justification.RIGHT",
183          "$ xns" : "Gtk",
184          "* pack" : "attach,0,1,1,1",
185          "label" : "Component Name",
186          "x_options" : 4,
187          "xalign" : 0.90000000000000002,
188          "xtype" : "Label"
189         },
190         {
191          "$ visible" : true,
192          "$ xns" : "Gtk",
193          "* pack" : "attach,1,1,1,1",
194          "id" : "name",
195          "xtype" : "Entry"
196         },
197         {
198          "$ justify" : "Gtk.Justification.RIGHT",
199          "$ visible" : true,
200          "$ xns" : "Gtk",
201          "* pack" : "attach,0,2,1,1",
202          "label" : "Title",
203          "x_options" : 4,
204          "xalign" : 0.90000000000000002,
205          "xtype" : "Label"
206         },
207         {
208          "$ visible" : true,
209          "$ xns" : "Gtk",
210          "* pack" : "attach,1,2,1,1",
211          "id" : "title",
212          "xtype" : "Entry"
213         },
214         {
215          "$ justify" : "Gtk.Justification.RIGHT",
216          "$ visible" : true,
217          "$ xns" : "Gtk",
218          "* pack" : "attach,0,3,1,1",
219          "label" : "Region",
220          "tooltip_text" : "center, north, south, east, west",
221          "x_options" : 4,
222          "xalign" : 0.90000000000000002,
223          "xtype" : "Label"
224         },
225         {
226          "$ visible" : true,
227          "$ xns" : "Gtk",
228          "* pack" : "attach,1,3,1,1",
229          "id" : "region",
230          "xtype" : "Entry"
231         },
232         {
233          "$ justify" : "Gtk.Justification.RIGHT",
234          "$ visible" : true,
235          "$ xns" : "Gtk",
236          "* pack" : "attach,0,4,1,1",
237          "label" : "Parent Name",
238          "x_options" : 4,
239          "xalign" : 0.90000000000000002,
240          "xtype" : "Label"
241         },
242         {
243          "$ visible" : true,
244          "$ xns" : "Gtk",
245          "* pack" : "attach,1,4,1,1",
246          "id" : "parent",
247          "xtype" : "Entry"
248         },
249         {
250          "$ justify" : "Gtk.Justification.RIGHT",
251          "$ visible" : true,
252          "$ xns" : "Gtk",
253          "* pack" : "attach,0,5,1,1",
254          "label" : "Permission Name",
255          "x_options" : 4,
256          "xalign" : 0.90000000000000002,
257          "xtype" : "Label"
258         },
259         {
260          "$ visible" : true,
261          "$ xns" : "Gtk",
262          "* pack" : "attach,1,5,1,1",
263          "id" : "permname",
264          "xtype" : "Entry"
265         },
266         {
267          "$ justify" : "Gtk.Justification.RIGHT",
268          "$ visible" : true,
269          "$ xns" : "Gtk",
270          "* pack" : "attach,0,6,1,1",
271          "label" : "Order (for tabs)",
272          "x_options" : 4,
273          "xalign" : 0.90000000000000002,
274          "xtype" : "Label"
275         },
276         {
277          "$ visible" : true,
278          "$ xns" : "Gtk",
279          "* pack" : "attach,1,6,1,1",
280          "id" : "modOrder",
281          "xtype" : "Entry"
282         },
283         {
284          "$ justify" : "Gtk.Justification.RIGHT",
285          "$ visible" : true,
286          "$ xns" : "Gtk",
287          "* pack" : "attach,0,7,1,1",
288          "label" : "Module to build (Vala only)",
289          "x_options" : 4,
290          "xalign" : 0.90000000000000002,
291          "xtype" : "Label"
292         },
293         {
294          "$ xns" : "Gtk",
295          "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
296          "* pack" : "attach,1,7,1,1",
297          "id" : "build_module",
298          "items" : [
299           {
300            "$ xns" : "Gtk",
301            "* pack" : "pack_start,true",
302            "id" : "dbcellrenderer",
303            "xtype" : "CellRendererText"
304           },
305           {
306            "$ columns" : "typeof(string),typeof(string)",
307            "$ xns" : "Gtk",
308            "* pack" : "set_model",
309            "id" : "dbmodel",
310            "n_columns" : 2,
311            "xtype" : "ListStore",
312            "| void loadData" : [
313             "  (Gee.ArrayList<string> data, string cur) {",
314             "    this.el.clear();                                    ",
315             "    Gtk.TreeIter iter;",
316             "    var el = this.el;",
317             "    ",
318             "   /// el.append(out iter);",
319             "    ",
320             "     ",
321             "   // el.set_value(iter, 0, \"\");",
322             "   // el.set_value(iter, 1, \"aaa  - Just add Element - aaa\");",
323             "",
324             "    el.append(out iter);",
325             "",
326             "    ",
327             "    el.set_value(iter, 0, \"\");",
328             "    el.set_value(iter, 1, \"-- select a module --\");",
329             "    _this.build_module.el.set_active_iter(iter);",
330             "    ",
331             "    for (var i = 0; i < data.size;i++) {",
332             "    ",
333             "",
334             "        el.append(out iter);",
335             "        ",
336             "        el.set_value(iter, 0, data.get(i));",
337             "        el.set_value(iter, 1, data.get(i));",
338             "        ",
339             "        if (data.get(i) == cur) {",
340             "            _this.build_module.el.set_active_iter(iter);",
341             "        }",
342             "        ",
343             "    }",
344             "     this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          ",
345             "                                     ",
346             "}",
347             ""
348            ]
349           }
350          ],
351          "xtype" : "ComboBox"
352         },
353         {
354          "$ justify" : "Gtk.Justification.RIGHT",
355          "$ visible" : true,
356          "$ xns" : "Gtk",
357          "* pack" : "attach,0,8,1,1",
358          "label" : "Directory",
359          "x_options" : 4,
360          "xalign" : 0.90000000000000002,
361          "xtype" : "Label"
362         },
363         {
364          "$ xns" : "Gtk",
365          "* init" : "this.el.add_attribute(_this.dircellrenderer.el , \"markup\", 1 );",
366          "* pack" : "attach,1,8,1,1",
367          "id" : "dir",
368          "items" : [
369           {
370            "$ xns" : "Gtk",
371            "* pack" : "pack_start,true",
372            "id" : "dircellrenderer",
373            "xtype" : "CellRendererText"
374           },
375           {
376            "$ columns" : "typeof(string),typeof(string)",
377            "$ xns" : "Gtk",
378            "* pack" : "set_model",
379            "id" : "dirmodel",
380            "n_columns" : 2,
381            "xtype" : "ListStore",
382            "| void loadData" : [
383             "  () {",
384             "\t",
385             "\t",
386             "  ",
387             "    this.el.clear();                                    ",
388             "    ",
389             "    if (!(_this.project is Project.Gtk)) {",
390             "\t\treturn;",
391             "\t}",
392             "    var sd = ((Project.Gtk)_this.project).sourcedirs();",
393             "    ",
394             "    Gtk.TreeIter iter;",
395             "    var el = this.el;",
396             "    ",
397             "   /// el.append(out iter);",
398             "    ",
399             "     ",
400             "   // el.set_value(iter, 0, \"\");",
401             "   // el.set_value(iter, 1, \"aaa  - Just add Element - aaa\");",
402             "",
403             "//    el.append(out iter);",
404             "",
405             "    ",
406             "//    el.set_value(iter, 0, \"\");",
407             "  //  el.set_value(iter, 1, \"-- select a directoyr --\");",
408             "    //_this.build_module.el.set_active_iter(iter);",
409             "    ",
410             "    for (var i = 0; i < sd.length;i++) {",
411             "    ",
412             "",
413             "        el.append(out iter);",
414             "        ",
415             "        el.set_value(iter, 0, sd[i]);",
416             "        el.set_value(iter, 1, sd[i]);",
417             "        ",
418             "        //if (data.get(i) == cur) {",
419             "        //    _this.build_module.el.set_active_iter(iter);",
420             "       // }",
421             "        ",
422             "    }",
423             "  //  this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          ",
424             "                                     ",
425             "}",
426             ""
427            ]
428           }
429          ],
430          "xtype" : "ComboBox"
431         },
432         {
433          "$ justify" : "Gtk.Justification.RIGHT",
434          "$ visible" : true,
435          "$ xns" : "Gtk",
436          "* pack" : "attach,0,9,1,1",
437          "int colspan" : 1,
438          "label" : "Full path",
439          "x_options" : 4,
440          "xalign" : 0.90000000000000002,
441          "xtype" : "Label"
442         },
443         {
444          "$ visible" : true,
445          "$ xns" : "Gtk",
446          "* pack" : "attach,1,9,1,1",
447          "bool editable" : false,
448          "id" : "path",
449          "int colspan" : 1,
450          "xtype" : "Entry"
451         }
452        ],
453        "n_columns" : 2,
454        "n_rows" : 8,
455        "uint row_spacing" : 2,
456        "xtype" : "Grid"
457       },
458       {
459        "$ xns" : "Gtk",
460        "* pack" : "add",
461        "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
462        "int margin_bottom" : 4,
463        "int margin_left" : 4,
464        "int margin_right" : 4,
465        "int margin_top" : 4,
466        "items" : [
467         {
468          "$ xns" : "Gtk",
469          "* pack" : "add",
470          "listeners" : {
471           "clicked" : [
472            "() => { ",
473            "",
474            "  _this.done = true;",
475            "    _this.el.hide(); ",
476            "}"
477           ]
478          },
479          "string label" : "Cancel",
480          "xtype" : "Button"
481         },
482         {
483          "$ xns" : "Gtk",
484          "* pack" : "add",
485          "id" : "save_btn",
486          "listeners" : {
487           "clicked" : [
488            "( ) =>  { ",
489            "",
490            " ",
491            "",
492            "",
493            "\tif (_this.name.el.get_text().length  < 1) {",
494            "\t    Xcls_StandardErrorDialog.singleton().show(",
495            "\t        _this.mainwindow.el,",
496            "\t        \"You have to set Component name \"",
497            "\t    );",
498            "\t     ",
499            "\t    return;",
500            "\t}",
501            "\t// what does this do?",
502            "\t",
503            "\tvar isNew = _this.file.name.length  > 0 ? false : true;",
504            "\t/*",
505            "\tif (!isNew && this.file.name != _this.name.el.get_text()) {",
506            "\t    Xcls_StandardErrorDialog.singleton().show(",
507            "\t        this.el,",
508            "\t        \"Sorry changing names does not work yet. \"",
509            "\t    );",
510            "\t     ",
511            "\t    return;",
512            "\t}",
513            "\t*/",
514            "\t ",
515            "\t",
516            "  ",
517            "\t// FIXME - this may be more complicated...",
518            "\t//for (var i in this.def) {",
519            "\t//    this.file[i] =  this.get(i).el.get_text();",
520            "\t//}",
521            "",
522            "\tif (!isNew) {",
523            "\t    try {",
524            "\t         _this.updateFileFromEntry();",
525            "\t     } catch( JsRender.Error.RENAME_FILE_EXISTS er) {",
526            "\t          Xcls_StandardErrorDialog.singleton().show(",
527            "\t            _this.mainwindow.el,",
528            "\t            \"The name you used already exists \"",
529            "\t        );",
530            "\t        return;",
531            "\t         ",
532            "\t     }",
533            "",
534            "\t      _this.done = true;",
535            "\t    _this.file.save();",
536            "\t    _this.el.hide();",
537            "\t    return;",
538            "\t}",
539            "\t",
540            "\t// ---------------- NEW FILES...",
541            "\tGtk.TreeIter iter;",
542            "",
543            "\tif (!_this.filetype.el.get_active_iter(out iter)) {",
544            "\t\t// should not happen...",
545            "\t\t// so we are jut going to return without ",
546            "\t\tXcls_StandardErrorDialog.singleton().show(",
547            "\t        _this.mainwindow.el,",
548            "\t        \"You must select a file type. \"",
549            "\t    );",
550            "\t    return;",
551            "\t\t ",
552            "\t}",
553            "\t",
554            "\t",
555            "\tvar fn = _this.name.el.get_text();",
556            "\t",
557            "\tValue ftypename;",
558            "\t_this.ftdbmodel.el.get_value (iter, 0, out ftypename);",
559            "\tvar ext = ((string)ftypename);",
560            "\tvar dir = _this.project.firstPath(); ",
561            "\tif (ext != \"bjs\") {",
562            "\t ",
563            "\t\tif (!_this.dir.el.get_active_iter(out iter)) {",
564            "\t\t\t// should not happen...",
565            "\t\t\t// so we are jut going to return without ",
566            "\t\t\tXcls_StandardErrorDialog.singleton().show(",
567            "\t\t\t    _this.mainwindow.el,",
568            "\t\t\t    \"You must select a directory \"",
569            "\t\t\t);",
570            "\t\t\treturn;",
571            "\t\t}",
572            "\t\tValue vdir;",
573            "\t\t_this.dirmodel.el.get_value (iter, 0, out vdir);",
574            "\t\tdir = (string)vdir;",
575            "\t}",
576            "\t",
577            "\tvar targetfile = dir + \"/\" + fn;",
578            "\t",
579            "\t// strip the file type off the end..",
580            "\t",
581            "\t",
582            "    var rx = new GLib.Regex(\"\\\\.\" + ext + \"$\",GLib.RegexCompileFlags.CASELESS);",
583            "    targetfile = rx.replace(targetfile, targetfile.length, 0, \"\"); ",
584            "   ",
585            "\tif (GLib.FileUtils.test(targetfile + \".\" + ext, GLib.FileTest.EXISTS)) {",
586            "\t    Xcls_StandardErrorDialog.singleton().show(",
587            "\t        _this.mainwindow.el,",
588            "\t        \"That file already exists\"",
589            "\t    ); ",
590            "\t    return;",
591            "\t}",
592            "   ",
593            "   var f =  JsRender.JsRender.factory(",
594            "\t\text == \"bjs\" ? _this.file.project.xtype : \"PlainFile\",  ",
595            "\t\t_this.file.project, ",
596            "\t\ttargetfile + \".\" + ext);",
597            "",
598            "\t_this.file = f;",
599            "\t",
600            "",
601            "\t",
602            "\t_this.updateFileFromEntry();",
603            "\t_this.file.loaded = true;",
604            "\t_this.file.save();",
605            "\tif (ext == \"bjs\") {",
606            "\t\t_this.file.project.addFile(_this.file);",
607            "\t}",
608            "\t",
609            " ",
610            "\t// what about .js ?",
611            "   _this.done = true;",
612            "\t_this.el.hide();",
613            "",
614            "// hopefull this will work with bjs files..",
615            "\t",
616            "\t_this.success(_this.project, _this.file);",
617            "   ",
618            "}"
619           ]
620          },
621          "string label" : "Save",
622          "xtype" : "Button"
623         }
624        ],
625        "xtype" : "ButtonBox"
626       }
627      ],
628      "xtype" : "Box"
629     }
630    ],
631    "listeners" : {
632     "closed" : [
633      "() => {",
634      "  if (!this.done) {",
635      "    _this.el.show();",
636      "  ",
637      "  }",
638      "} "
639     ],
640     "hide" : [
641      "( ) => {",
642      "",
643      " if (!this.done) {",
644      "    _this.el.show();",
645      "  ",
646      "  }",
647      "}",
648      ""
649     ]
650    },
651    "uint border_width" : 0,
652    "xtype" : "Popover",
653    "| void show" : [
654     "(JsRender.JsRender c, Gtk.Widget btn, bool new_window) ",
655     "{",
656     "    this.project = c.project;",
657     "    this.done = false;",
658     "    this.new_window = new_window;",
659     "    ",
660     "    //if (!this.el) {",
661     "        //this.init();",
662     "     //}",
663     "    _this.path.el.set_text(c.path);",
664     "    _this.name.el.set_text(c.name);",
665     "    _this.title.el.set_text(c.title);",
666     "    _this.parent.el.set_text(c.parent);    ",
667     "    _this.region.el.set_text(c.region);",
668     "    _this.modOrder.el.set_text(c.modOrder);",
669     "    _this.permname.el.set_text(c.permname);",
670     "    ",
671     "    ",
672     "    ",
673     "    ",
674     "    ",
675     "    ",
676     "    ",
677     "    ",
678     "     var ar = new Gee.ArrayList<string>();",
679     "     _this.dbmodel.loadData(ar,\"\");",
680     "    // load the modules... if relivant..",
681     "    if (this.project.xtype == \"Gtk\") {",
682     "        var p = (Project.Gtk)c.project;",
683     "          var cg = p.compilegroups;",
684     "",
685     "        var iter = cg.map_iterator();",
686     "       while(iter.next()) {",
687     "            var key = iter.get_key();",
688     "            if (key == \"_default_\") {",
689     "                continue;",
690     "            }",
691     "            ar.add(key);",
692     "        };",
693     "        _this.dbmodel.loadData(ar, c.build_module);",
694     "",
695     "    }",
696     "    ",
697     "     ",
698     "    _this.file = c;",
699     "    //console.log('show all');",
700     "   this.el.set_modal(true);",
701     "    this.el.set_relative_to(btn);",
702     "",
703     "    this.el.set_position(Gtk.PositionType.TOP);",
704     "",
705     "     int w,h;",
706     "    this.mainwindow.el.get_size(out w, out h);",
707     "    this.el.set_size_request( 550, h);",
708     "",
709     "   ",
710     "    ",
711     "    // window + header?",
712     "     print(\"SHOWALL - POPIP\\n\");",
713     "    this.el.show_all();",
714     "    this.name.el.grab_focus();",
715     "    ",
716     "    ",
717     "    ",
718     "    if (c.path.length > 0) {",
719     "\t    this.save_btn.el.set_label(\"Save\");",
720     "\t\t_this.filetype.el.hide();",
721     "\t\t_this.filetypelbl.el.hide();",
722     "\t\t_this.filetype.showhide(true); // as we only work on bjs files currently",
723     "    } else {",
724     "        this.save_btn.el.set_label(\"Create\");",
725     "        _this.ftdbmodel.loadData(\"bjs\"); // fixme - need to determine type..",
726     "\t    _this.filetype.el.show();",
727     "\t    _this.filetypelbl.el.show();",
728     "    }",
729     "    ",
730     "    ",
731     "    //this.success = c.success;",
732     "    ",
733     "    ",
734     "}"
735    ],
736    "| void updateFileFromEntry" : [
737     "() {",
738     "",
739     "        _this.file.title = _this.title.el.get_text();",
740     "        _this.file.region = _this.region.el.get_text();            ",
741     "        _this.file.parent = _this.parent.el.get_text();                        ",
742     "        _this.file.permname = _this.permname.el.get_text();                                    ",
743     "        _this.file.modOrder = _this.modOrder.el.get_text();",
744     "        ",
745     "        if (_this.file.name.length  > 0 && _this.file.name != _this.name.el.get_text()) {",
746     "            _this.file.renameTo(_this.name.el.get_text());",
747     "        }",
748     "        // store the module...",
749     "        _this.file.build_module = \"\";        ",
750     "         Gtk.TreeIter iter; ",
751     "        if (_this.build_module.el.get_active_iter (out iter)) {",
752     "             Value vfname;",
753     "             this.dbmodel.el.get_value (iter, 0, out vfname);",
754     "             if (((string)vfname).length > 0) {",
755     "                 _this.file.build_module = (string)vfname;",
756     "             }",
757     "    ",
758     "        }",
759     "        ",
760     "        ",
761     "",
762     "                                                    ",
763     "}    "
764    ]
765   }
766  ],
767  "modOrder" : "",
768  "name" : "PopoverFileDetails",
769  "parent" : "",
770  "path" : "/home/alan/gitlive/roobuilder/src/Builder4/PopoverFileDetails.bjs",
771  "permname" : "",
772  "title" : ""
773 }