5f2c0c5132ab7bc131233706e2a7500c4287b0e0
[roobuilder] / src / Builder4 / PopoverFiles.bjs
1 {
2  "build_module" : "",
3  "items" : [
4   {
5    "# Gdk.Pixbuf missing_thumb_pixbuf" : "",
6    "# Project.Project selectedProject" : "",
7    "# Xcls_MainWindow win" : "",
8    "# bool is_loaded" : false,
9    "# bool is_loading" : false,
10    "# bool new_window" : false,
11    "$ xns" : "Gtk",
12    "Gtk.PositionType position" : "Gtk.PositionType.TOP",
13    "bool active" : false,
14    "bool hexpand" : false,
15    "bool modal" : true,
16    "id" : "PopoverFiles",
17    "int height_request" : 800,
18    "int width_request" : 900,
19    "items" : [
20     {
21      "$ xns" : "Gtk",
22      "* pack" : "add",
23      "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
24      "items" : [
25       {
26        "$ xns" : "Gtk",
27        "* pack" : "add",
28        "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
29        "items" : [
30         {
31          "$ xns" : "Gtk",
32          "* pack" : "add",
33          "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH",
34          "items" : [
35           {
36            "$ xns" : "Gtk",
37            "* pack" : "add",
38            "listeners" : {
39             "clicked" : [
40              "  ( ) => {",
41              "  ",
42              "    // create a new file in project..",
43              "    //Xcls_DialogNewComponent.singleton().show(",
44              "   var  pe =      EditProject.singleton();",
45              "    //pe.el.set_transient_for(_this.el);",
46              "    pe.el.set_modal(true);   ",
47              "   ",
48              "    var p  = pe.show();",
49              "",
50              "    if (p == null) {",
51              "        return;",
52              "    }",
53              "    ",
54              "    /*",
55              "    _this.win.windowstate.left_projects.is_loaded = false;    ",
56              "    _this.win.windowstate.left_projects.load();",
57              "    _this.win.windowstate.left_projects.selectProject(p);",
58              "    */",
59              "    return  ;    ",
60              "",
61              "}"
62             ]
63            },
64            "string icon_name" : "folder-new",
65            "string label" : "New Project",
66            "xtype" : "ToolButton"
67           },
68           {
69            "$ xns" : "Gtk",
70            "* pack" : "add",
71            "listeners" : {
72             "clicked" : [
73              "  ( ) => {",
74              "  // should disable the button really.",
75              "   if (_this.selectedProject == null) {",
76              "\t   return;",
77              "   }",
78              "\t_this.win.windowstate.projectPopoverShow(this.el, _this.selectedProject);",
79              " }"
80             ]
81            },
82            "string icon_name" : "emblem-system",
83            "string label" : "Project Properties",
84            "xtype" : "ToolButton"
85           },
86           {
87            "$ xns" : "Gtk",
88            "* pack" : "add",
89            "listeners" : {
90             "clicked" : [
91              "  ( ) => {",
92              "  /*",
93              "   var cd = DialogConfirm.singleton();",
94              "     cd.el.set_transient_for(_this.el);",
95              "    cd.el.set_modal(true);",
96              "",
97              "     var project =   _this.windowstate.left_projects.getSelectedProject();",
98              "    if (project == null) {",
99              "        print(\"SKIP - no project\\n\");",
100              "        return;",
101              "    }",
102              "    ",
103              "        ",
104              "     if (Gtk.ResponseType.YES != cd.show(\"Confirm\", ",
105              "        \"Are you sure you want to delete project %s\".printf(project.name))) {",
106              "        return;",
107              "    }",
108              "     ",
109              "",
110              "    // confirm?",
111              "    Project.Project.remove(project);",
112              "    _this.project = null;",
113              "    ",
114              "    _this.windowstate.left_projects.is_loaded =  false;",
115              "    _this.windowstate.left_projects.load();",
116              "    _this.windowstate.clutterfiles.clearFiles();",
117              "*/",
118              "",
119              "}"
120             ]
121            },
122            "string icon_name" : "user-trash",
123            "string label" : "Delete Project",
124            "xtype" : "ToolButton"
125           },
126           {
127            "$ xns" : "Gtk",
128            "* pack" : "add",
129            "listeners" : {
130             "clicked" : [
131              " () => {",
132              "    // create a new file in project..",
133              "    print(\"add file selected\\n\");",
134              "    ",
135              "    if (_this.selectedProject == null) {",
136              "    \treturn;",
137              "    }",
138              "    ",
139              "    var f = JsRender.JsRender.factory(_this.selectedProject.xtype,  _this.selectedProject, \"\");",
140              "     _this.win.windowstate.file_details.show( f, this.el, _this.new_window );",
141              "     ",
142              "",
143              "}"
144             ]
145            },
146            "string icon_name" : "document-new",
147            "string label" : "New File",
148            "xtype" : "ToolButton"
149           }
150          ],
151          "xtype" : "Toolbar"
152         }
153        ],
154        "xtype" : "Box"
155       },
156       {
157        "$ xns" : "Gtk",
158        "* pack" : "add",
159        "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
160        "bool homogeneous" : false,
161        "items" : [
162         {
163          "$ shadow_type" : "Gtk.ShadowType.IN",
164          "$ xns" : "Gtk",
165          "* init" : [
166           "  this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
167           " "
168          ],
169          "* pack" : "add",
170          "bool expand" : true,
171          "int width_request" : 150,
172          "items" : [
173           {
174            "$ enable_tree_lines" : true,
175            "$ headers_visible" : true,
176            "$ xns" : "Gtk",
177            "* init" : [
178             "  var description = new Pango.FontDescription();",
179             "     description.set_size(9000);",
180             "    this.el.override_font(description);     ",
181             "                    ",
182             "    var selection = this.el.get_selection();",
183             "    selection.set_mode( Gtk.SelectionMode.SINGLE);",
184             " ",
185             "",
186             "    ",
187             "   ",
188             " "
189            ],
190            "* pack" : "add",
191            "id" : "view",
192            "items" : [
193             {
194              "$ columns" : "typeof(string), typeof(Object)",
195              "$ xns" : "Gtk",
196              "* init" : [
197               "{",
198               "   this.el.set_sort_func(0, (mod,a,b) => {",
199               "       GLib.Value ga, gb;",
200               "       mod.get_value(a,0, out ga);",
201               "       mod.get_value(b,0, out gb);",
202               "        ",
203               "        if ((string)ga == (string)gb) {",
204               "            return 0;",
205               "        }",
206               "        return (string)ga > (string)gb ? 1 : -1;",
207               "   }); ",
208               "",
209               "",
210               "}",
211               ""
212              ],
213              "* pack" : "set_model",
214              "id" : "model",
215              "n_columns" : 2,
216              "xtype" : "ListStore"
217             },
218             {
219              "$ xns" : "Gtk",
220              "* init" : [
221               "",
222               "    this.el.add_attribute(_this.namecol.el , \"markup\", 0  );",
223               " "
224              ],
225              "* pack" : "append_column",
226              "items" : [
227               {
228                "$ xns" : "Gtk",
229                "* pack" : "pack_start,true",
230                "id" : "namecol",
231                "xtype" : "CellRendererText"
232               }
233              ],
234              "utf8 title" : "Projects",
235              "xtype" : "TreeViewColumn"
236             }
237            ],
238            "listeners" : {
239             "cursor_changed" : [
240              " () => {",
241              "    if (_this.is_loading) {",
242              "        return;",
243              "    }",
244              "    ",
245              "    Gtk.TreeIter iter;",
246              "    Gtk.TreeModel mod;",
247              "            ",
248              "    var s = this.el.get_selection();",
249              "    if (!s.get_selected(out mod, out iter)) {",
250              "        return;",
251              "    }",
252              "    ",
253              "    GLib.Value gval;",
254              "",
255              "    mod.get_value(iter, 1 , out gval);",
256              "    var project = (Project.Project)gval.get_object();",
257              "    ",
258              "    _this.onProjectSelected(project);",
259              "    ",
260              "}  "
261             ]
262            },
263            "xtype" : "TreeView"
264           }
265          ],
266          "xtype" : "ScrolledWindow"
267         },
268         {
269          "$ xns" : "Gtk",
270          "* init" : "  this.el.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);",
271          "* pack" : "add",
272          "Gtk.ShadowType shadow_type" : "Gtk.ShadowType.IN",
273          "bool expand" : true,
274          "id" : "iconscroll",
275          "int width_request" : 600,
276          "items" : [
277           {
278            "$ xns" : "Gtk",
279            "* init" : [
280             "{",
281             "",
282             "}",
283             ""
284            ],
285            "* pack" : "add",
286            "bool has_tooltip" : true,
287            "id" : "iconview",
288            "int item_width" : 100,
289            "int markup_column" : 1,
290            "int pixbuf_column" : 3,
291            "items" : [
292             {
293              "$ columns" : "typeof(Object), typeof(string), typeof(string), typeof(Gdk.Pixbuf), typeof(Gdk.Pixbuf) ",
294              "$ xns" : "Gtk",
295              "* prop" : "model",
296              "id" : "iconmodel",
297              "int n_columns" : 4,
298              "xtype" : "ListStore"
299             }
300            ],
301            "listeners" : {
302             "item_activated" : [
303              "(path) => {",
304              "    ",
305              "    _this.win.windowstate.project = _this.selectedProject;",
306              "    _this.el.hide();",
307              "    ",
308              "    ",
309              " \tGtk.TreeIter iter;",
310              "   ",
311              "            ",
312              "\tthis.el.model.get_iter(out iter, path);",
313              "    ",
314              "    GLib.Value gval;",
315              "",
316              "    this.el.model.get_value(iter, 0 , out gval);",
317              "    var file = (JsRender.JsRender)gval;",
318              "    ",
319              "    ",
320              "    _this.win.windowstate.fileViewOpen(file, _this.new_window);",
321              "",
322              "    ",
323              "    ",
324              "}"
325             ],
326             "query_tooltip" : [
327              "(x, y, keyboard_tooltip, tooltip) => {",
328              "",
329              "\tGtk.TreePath path;",
330              "\tGtk.CellRenderer cell;",
331              "\tvar s = _this.iconview.el.get_item_at_pos(x,y + (int) _this.iconscroll.el.vadjustment.value, out path, out cell);",
332              "\t",
333              "\t",
334              "   // GLib.debug(\"Tooltip? %d,%d scroll: %d\",x,y, (int)_this.iconscroll.el.vadjustment.value);",
335              "\t ",
336              "\t",
337              "\tif (path == null) {",
338              "\t\t// GLib.debug(\"Tooltip? - no path\");",
339              "\t\treturn false;",
340              "\t}",
341              "\t",
342              "\tGtk.TreeIter iter;",
343              "\t_this.iconmodel.el.get_iter(out iter, path);",
344              "\tGLib.Value val;",
345              "\t_this.iconmodel.el.get_value(iter, 4, out val);",
346              "\t",
347              "\ttooltip.set_icon((Gdk.Pixbuf) val.get_object());",
348              "\t _this.iconview.el.set_tooltip_item(tooltip, path);",
349              "\treturn true;",
350              "}",
351              ""
352             ]
353            },
354            "xtype" : "IconView"
355           }
356          ],
357          "xtype" : "ScrolledWindow"
358         },
359         {
360          "$ xns" : "Gtk",
361          "* init" : "  this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
362          "* pack" : "add",
363          "Gtk.ShadowType shadow_type" : "Gtk.ShadowType.IN",
364          "bool expand" : true,
365          "bool visible" : false,
366          "id" : "file_container",
367          "int width_request" : 100,
368          "items" : [
369           {
370            "$ enable_tree_lines" : true,
371            "$ headers_visible" : true,
372            "$ xns" : "Gtk",
373            "* init" : [
374             "  var description = new Pango.FontDescription();",
375             "     description.set_size(9000);",
376             "    this.el.override_font(description);     ",
377             "                    ",
378             "    var selection = this.el.get_selection();",
379             "    selection.set_mode( Gtk.SelectionMode.SINGLE);",
380             " ",
381             "",
382             "    ",
383             "   ",
384             " "
385            ],
386            "* pack" : "add",
387            "bool activate_on_single_click" : false,
388            "bool expand" : true,
389            "id" : "fileview",
390            "items" : [
391             {
392              "$ columns" : "typeof(string), typeof(string)",
393              "$ xns" : "Gtk",
394              "* init" : [
395               "{",
396               "   this.el.set_sort_func(0, (mod,a,b) => {",
397               "       GLib.Value ga, gb;",
398               "       mod.get_value(a,0, out ga);",
399               "       mod.get_value(b,0, out gb);",
400               "        ",
401               "        if ((string)ga == (string)gb) {",
402               "            return 0;",
403               "        }",
404               "        return (string)ga > (string)gb ? 1 : -1;",
405               "   }); ",
406               " ",
407               "",
408               "}",
409               ""
410              ],
411              "* pack" : "set_model",
412              "id" : "filemodel",
413              "n_columns" : 2,
414              "xtype" : "TreeStore"
415             },
416             {
417              "$ xns" : "Gtk",
418              "* init" : [
419               "",
420               "    this.el.add_attribute(_this.filenamecol.el , \"markup\", 0  );",
421               " "
422              ],
423              "* pack" : "append_column",
424              "items" : [
425               {
426                "$ xns" : "Gtk",
427                "* pack" : "pack_start,true",
428                "id" : "filenamecol",
429                "xtype" : "CellRendererText"
430               }
431              ],
432              "utf8 title" : "File",
433              "xtype" : "TreeViewColumn"
434             }
435            ],
436            "listeners" : {
437             "cursor_changed" : [
438              " () => {",
439              " /*",
440              "    if (_this.is_loading) {",
441              "        return;",
442              "    }",
443              "    ",
444              "    Gtk.TreeIter iter;",
445              "    Gtk.TreeModel mod;",
446              "            ",
447              "    var s = this.el.get_selection();",
448              "    if (!s.get_selected(out mod, out iter)) {",
449              "        return;",
450              "    }",
451              "    ",
452              "    GLib.Value gval;",
453              "",
454              "    mod.get_value(iter, 1 , out gval);",
455              "    var project = (Project.Project)gval.get_object();",
456              "    ",
457              "    _this.project_selected(project);",
458              "    */",
459              "}  "
460             ],
461             "row_activated" : [
462              "(path, col) => {",
463              "",
464              "\tGtk.TreeIter iter;",
465              "   ",
466              "            ",
467              "\tthis.el.model.get_iter(out iter, path);",
468              "    ",
469              "    GLib.Value gval;",
470              "",
471              "    this.el.model.get_value(iter, 1 , out gval);",
472              "   var fn = (string)gval;",
473              "    if (fn.length < 1) {",
474              "    \treturn;",
475              "\t}",
476              "    _this.win.windowstate.project = _this.selectedProject;",
477              "     _this.el.hide();",
478              "    ",
479              "    var f = JsRender.JsRender.factory(\"PlainFile\", _this.selectedProject, fn);",
480              "   ",
481              "   ",
482              "    _this.win.windowstate.fileViewOpen(f, _this.new_window);",
483              "   ",
484              "    ",
485              "}"
486             ]
487            },
488            "xtype" : "TreeView"
489           }
490          ],
491          "xtype" : "ScrolledWindow"
492         }
493        ],
494        "xtype" : "Box"
495       }
496      ],
497      "xtype" : "Box"
498     }
499    ],
500    "listeners" : {
501     "hide" : [
502      "( ) => {",
503      "\t// save...",
504      "\t//this.load();",
505      "\t//if (project != null) {",
506      "//\t\tthis.selectProject(project);",
507      "//\t}",
508      " \tif (_this.win.windowstate.project == null) {",
509      " \t\tthis.el.show();",
510      "\t}",
511      "}"
512     ]
513    },
514    "xtype" : "Popover",
515    "| void load" : [
516     "() {",
517     "     // clear list...",
518     "    ",
519     "     if (_this.is_loaded) {",
520     "         return;",
521     "     }",
522     "     _this.is_loading = true;",
523     "        ",
524     "     _this.is_loaded = true;",
525     "     ",
526     "     Project.Project.loadAll();",
527     "     var projects = Project.Project.allProjectsByName();",
528     "     ",
529     "     Gtk.TreeIter iter;",
530     "     var m = this.model.el;",
531     "     m.clear();",
532     "          ",
533     "     for (var i = 0; i < projects.size; i++) {",
534     "        m.append(out iter);",
535     "        m.set(iter,   0,projects.get(i).name );",
536     "        ",
537     "        var o =  GLib.Value(typeof(Object));",
538     "        o.set_object((Object)projects.get(i));",
539     "                   ",
540     "        m.set_value(iter, 1, o);",
541     "     ",
542     "     }",
543     "     m.set_sort_column_id(0, Gtk.SortType.ASCENDING);",
544     "     _this.is_loading = false;      ",
545     "}",
546     ""
547    ],
548    "| void onProjectSelected" : [
549     "(Project.Project project) ",
550     "{",
551     "\tthis.selectedProject = project;",
552     "\tproject.scanDirs();",
553     "\t//this.clutterfiles.loadProject(proj);",
554     "\t",
555     "\t",
556     "\t ",
557     "",
558     "    ",
559     "    ",
560     "    //this.project_title_name.el.text = pr.name;",
561     "    //this.project_title_path.el.text = pr.firstPath();",
562     "    ",
563     "    // file items contains a reference until we reload ...",
564     "  \t Gdk.Pixbuf pixbuf = null;",
565     "  \tGdk.Pixbuf bigpixbuf = null;",
566     "\t Gtk.TreeIter iter;",
567     "     var m = this.iconmodel.el;",
568     "     m.clear();",
569     " ",
570     "    var fiter = project.sortedFiles().list_iterator();",
571     "    while (fiter.next()) {",
572     "        m.append(out iter);",
573     "        var file = fiter.get();",
574     "        m.set(iter,   0,file ); // zero contains the file reference",
575     "        m.set(iter,   1,file.nickType() + \"\\n\" + file.nickName()); // marked up title?",
576     "        m.set(iter,   2,file.nickType() ); // file type?",
577     "        ",
578     "        ",
579     "        var fname = file.getIconFileName(false);",
580     "        try {",
581     "\t\t    if (FileUtils.test(fname, FileTest.EXISTS)) {",
582     "\t\t        var npixbuf = new Gdk.Pixbuf.from_file(fname);",
583     "\t\t        pixbuf = npixbuf.scale_simple(92, (int) (npixbuf.height * 92.0 /npixbuf.width * 1.0 )",
584     "\t\t\t\t    , Gdk.InterpType.NEAREST) ;",
585     "\t\t\t\tbigpixbuf = npixbuf.scale_simple(368, (int) (npixbuf.height * 368.0 /npixbuf.width * 1.0 )",
586     "\t\t\t\t    , Gdk.InterpType.NEAREST) ;",
587     "\t\t\t\t",
588     "\t\t    } ",
589     "\t\t} catch (Error e) {",
590     "\t\t    // noop",
591     "\t\t",
592     "\t\t}",
593     "        if (pixbuf == null) {",
594     "        ",
595     "\t\t    try {",
596     "\t\t        if (_this.missing_thumb_pixbuf == null) {",
597     "\t\t            var icon_theme = Gtk.IconTheme.get_default ();",
598     "\t\t            _this.missing_thumb_pixbuf = icon_theme.load_icon (\"package-x-generic\", 92, 0);",
599     "\t\t            _this.missing_thumb_pixbuf.ref();",
600     "\t\t        }",
601     "\t\t        pixbuf = _this.missing_thumb_pixbuf;",
602     "\t\t        bigpixbuf = _this.missing_thumb_pixbuf;",
603     "",
604     "\t\t    } catch (Error e) {",
605     "\t\t        // noop?",
606     "\t\t    }",
607     "\t\t}",
608     "\t\t",
609     "\t\t",
610     "\t\t",
611     "        m.set(iter,   3,pixbuf);",
612     "        m.set(iter,   4,bigpixbuf);",
613     "      ",
614     "        // this needs to add to the iconview?",
615     "        ",
616     "        //var a = new Xcls_fileitem(this,fiter.get());",
617     "        //this.fileitems.add(a);",
618     "",
619     "        //this.filelayout.el.add_child(a.el);",
620     "    }",
621     "    ",
622     "    ",
623     "     this.filemodel.el.clear();",
624     "    ",
625     "    // folders...",
626     "    ",
627     "    if (!(project is Project.Gtk)) {",
628     "        print (\"not gtk... skipping files\");",
629     "        this.file_container.el.hide();",
630     "        return;",
631     "    }",
632     "    this.file_container.el.show();",
633     "    var gpr = (Project.Gtk)project;",
634     "     var def = gpr.compilegroups.get(\"_default_\");",
635     "     // not sure why the above is returng null!??",
636     "     if (def == null) {",
637     " \t\tdef = new Project.GtkValaSettings(\"_default_\"); ",
638     " \t\tgpr.compilegroups.set(\"_default_\", def);",
639     "     }",
640     "\t var items  = def.sources;",
641     "\t\t ",
642     "\t Gtk.TreeIter citer;  // folder iter",
643     "\t  Gtk.TreeIter fxiter;  // file iter",
644     "\tfor(var i =0 ; i < items.size; i++) {",
645     "\t     print (\"cheking folder %s\\n\", items.get(i));",
646     "\t     var files = gpr.filesForOpen(items.get(i));",
647     "\t     if (files.size < 1) {",
648     "\t        continue;",
649     "\t     }",
650     "\t\t this.filemodel.el.append(out citer,null);",
651     "\t\t this.filemodel.el.set(citer, 0, GLib.Path.get_basename(items.get(i)));",
652     "\t\t this.filemodel.el.set(citer, 1, null); // parent (empty as it's a folder)",
653     "\t\t",
654     "\t\t",
655     "\t    // add the directory... items.get(i);",
656     "\t    //var x = new Xcls_folderitem(this,items.get(i));",
657     "\t    //this.fileitems.add(x);",
658     "\t    //this.filelayout.el.add_child(x.el);",
659     "\t    ",
660     "\t    ",
661     "\t    for(var j =0 ; j < files.size; j++) {",
662     "\t    ",
663     "\t\t    this.filemodel.el.insert(out fxiter,citer, -1);",
664     "\t     \tthis.filemodel.el.set(fxiter, 0,  GLib.Path.get_basename(files.get(j))); // filename",
665     "\t\t \tthis.filemodel.el.set(fxiter, 1, files.get(j)); // Folder?",
666     "\t         ",
667     "\t        ",
668     "\t    }",
669     "\t    ",
670     "\t    ",
671     "\t    //this.el.set_value(citer, 1,   items.get(i) );",
672     "\t}",
673     "    _this.fileview.el.expand_all();",
674     "    ",
675     "\t",
676     "}",
677     ""
678    ],
679    "| void selectProject" : [
680     "(Project.Project project) {",
681     "    ",
682     "    var sel = _this.view.el.get_selection();",
683     "    ",
684     "    sel.unselect_all();",
685     "    ",
686     "    var found = false;",
687     "    _this.model.el.foreach((mod, path, iter) => {",
688     "        GLib.Value val;",
689     "    ",
690     "        mod.get_value(iter, 1, out val);",
691     "        if ( ( (Project.Project)val.get_object()).fn != project.fn) {",
692     "            print(\"SKIP %s != %s\\n\", ((Project.Project)val.get_object()).name , project.name);",
693     "            return false;//continue",
694     "        }",
695     "        sel.select_iter(iter);",
696     "\t\tthis.selectedProject = project;",
697     "        this.onProjectSelected(project);",
698     "        found = true;",
699     "        return true;",
700     "        ",
701     "    ",
702     "    });",
703     "     if (!found) {",
704     "\t    print(\"tried to select %s, could not find it\", project.name);",
705     "    }",
706     "}",
707     ""
708    ],
709    "| void setMainWindow" : [
710     "(Xcls_MainWindow win) {",
711     "\tthis.win = win;",
712     "\t ",
713     "}",
714     ""
715    ],
716    "| void show" : [
717     "(Gtk.Widget on_el, Project.Project? project, bool new_window) {",
718     "\t//this.editor.show( file, node, ptype, key);",
719     "\t",
720     "\tthis.new_window = new_window;",
721     "\t\t// save...",
722     "\tthis.load();",
723     "\tthis.el.show_all(); // show first - so we can hide stuff later.\t",
724     "\tif (project != null) {",
725     "\t",
726     "\t\tthis.selectProject(project);",
727     "\t}",
728     "\t",
729     "\t",
730     "    int w,h;",
731     "    this.win.el.get_size(out w, out h);",
732     "    ",
733     "    // left tree = 250, editor area = 500?",
734     "    ",
735     "    // min 450?",
736     "\t// max hieght ...",
737     "\t",
738     "\tvar  ww =  on_el.get_allocated_width();",
739     "\t",
740     "\t// width = should be max = w-ww , or 600 at best..?",
741     "\t ",
742     "    this.el.set_size_request( w, h); // same as parent...",
743     "",
744     "",
745     "\tthis.el.set_modal(true);",
746     "\tthis.el.set_relative_to(on_el);",
747     "",
748     "\t ",
749     "",
750     "}",
751     ""
752    ]
753   }
754  ],
755  "modOrder" : "",
756  "name" : "PopoverFiles",
757  "parent" : "",
758  "path" : "/home/alan/gitlive/roobuilder/src/Builder4/PopoverFiles.bjs",
759  "permname" : "",
760  "title" : ""
761 }