Fix #8000 - left tree and file open
[roobuilder] / src / Builder4 / MainWindow.bjs
1 {
2  "build_module" : "builder",
3  "gen_extended" : false,
4  "items" : [
5   {
6    "# Project.Project project" : "null",
7    "# WindowState windowstate" : "",
8    "# bool winloading" : false,
9    "$ type" : "Gtk.WindowType.TOPLEVEL",
10    "$ xns" : "Gtk",
11    "* ctor" : "new Gtk.ApplicationWindow(BuilderApplication.singleton({}))",
12    "* init" : [
13     "",
14     "this.el.set_icon_name(\"roobuilder\");",
15     ""
16    ],
17    "border_width" : 0,
18    "default_height" : 850,
19    "default_width" : 1200,
20    "id" : "MainWindow",
21    "items" : [
22     {
23      "$ xns" : "Gtk",
24      "* pack" : "set_titlebar",
25      "bool show_close_button" : true,
26      "id" : "headerbar",
27      "items" : [
28       {
29        "$ xns" : "Gtk",
30        "* pack" : "pack_start",
31        "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
32        "items" : [
33         {
34          "$ xns" : "Gtk",
35          "* pack" : "append",
36          "bool has_frame" : false,
37          "bool has_tooltip" : true,
38          "items" : [
39           {
40            "$ xns" : "Adw",
41            "* prop" : "child",
42            "string icon_name" : "preferences-system-windows",
43            "string label" : " Files",
44            "xtype" : "ButtonContent"
45           }
46          ],
47          "listeners" : {
48           "clicked" : [
49            "  ( ) => {",
50            "  \t_this.splitview.el.show_sidebar = !_this.splitview.el.show_sidebar;",
51            "  \tif (_this.splitview.el.show_sidebar) {",
52            "  \t\t_this.sidebar.show(); ",
53            " \t}",
54            "}"
55           ]
56          },
57          "string tooltip_text" : "Manage Windows (Ctrl-O)",
58          "xtype" : "Button"
59         }
60        ],
61        "xtype" : "Box"
62       }
63      ],
64      "xtype" : "HeaderBar"
65     },
66     {
67      "$ xns" : "Adw",
68      "* prop" : "child",
69      "bool collapsed" : true,
70      "bool show_sidebar" : false,
71      "double sidebar_width_fraction" : 0.40000000000000002,
72      "id" : "splitview",
73      "items" : [
74       {
75        "$ xns" : "Gtk",
76        "* prop" : "content",
77        "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
78        "bool hexpand" : true,
79        "bool homogeneous" : false,
80        "bool vexpand" : false,
81        "id" : "vbox",
82        "int spacing" : 0,
83        "items" : [
84         {
85          "# int lastWidth" : 0,
86          "$ xns" : "Gtk",
87          "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
88          "bool hexpand" : true,
89          "bool vexpand" : true,
90          "id" : "mainpane",
91          "items" : [
92           {
93            "$ xns" : "Gtk",
94            "* prop" : "start_child",
95            "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
96            "bool hexpand" : true,
97            "bool vexpand" : true,
98            "id" : "leftpane",
99            "items" : [
100             {
101              "$ xns" : "Gtk",
102              "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
103              "id" : "editpane",
104              "items" : [
105               {
106                "$ xns" : "Gtk",
107                "* prop" : "start_child",
108                "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
109                "bool hexpand" : true,
110                "bool vexpand" : true,
111                "id" : "tree",
112                "xtype" : "Box"
113               },
114               {
115                "$ xns" : "Gtk",
116                "* prop" : "end_child",
117                "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
118                "bool hexpand" : true,
119                "bool vexpand" : true,
120                "id" : "props",
121                "xtype" : "Box"
122               }
123              ],
124              "listeners" : {
125               "accept_position" : [
126                "( ) => {",
127                "\t_this.windowstate.left_tree.onresize();",
128                "\treturn true;",
129                "}",
130                ""
131               ],
132               "move_handle" : [
133                "(scroll) => {",
134                "\tGLib.debug(\"Move handle\");",
135                "\treturn true;",
136                "}"
137               ]
138              },
139              "xtype" : "Paned"
140             }
141            ],
142            "xtype" : "Box"
143           },
144           {
145            "$ xns" : "Gtk",
146            "* prop" : "end_child",
147            "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
148            "bool hexpand" : true,
149            "bool vexpand" : true,
150            "items" : [
151             {
152              "$ xns" : "Gtk",
153              "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
154              "bool hexpand" : true,
155              "bool vexpand" : true,
156              "id" : "rooviewbox",
157              "xtype" : "Box"
158             },
159             {
160              "$ xns" : "Gtk",
161              "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
162              "bool hexpand" : true,
163              "bool vexpand" : true,
164              "id" : "codeeditviewbox",
165              "xtype" : "Box"
166             }
167            ],
168            "xtype" : "Box"
169           }
170          ],
171          "listeners" : {
172           "accept_position" : [
173            "( ) => {",
174            "\t_this.windowstate.left_tree.onresize();",
175            "\treturn true;",
176            "}",
177            ""
178           ]
179          },
180          "position" : 400,
181          "xtype" : "Paned"
182         },
183         {
184          "$ xns" : "Gtk",
185          "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
186          "bool homogeneous" : false,
187          "bool vexpand" : false,
188          "items" : [
189           {
190            "$ tooltip_text" : "\"Project Details\"",
191            "$ xns" : "Gtk",
192            "bool always_show_image" : true,
193            "listeners" : {
194             "clicked" : [
195              "  ( ) => {",
196              "     ",
197              "     _this.windowstate.projectPopoverShow(_this.el, null, null);",
198              "   ",
199              "  ",
200              "}"
201             ]
202            },
203            "string icon_name" : "emblem-system",
204            "string label" : "Edit Project Settings",
205            "xtype" : "Button"
206           },
207           {
208            "$ tooltip_text" : "\"File Details\"",
209            "$ xns" : "Gtk",
210            "bool always_show_image" : true,
211            "listeners" : {
212             "clicked" : [
213              "  ( ) => {",
214              "  ",
215              "    // create a new file in project..",
216              "    if (_this.project == null || _this.windowstate.file == null) {",
217              "        return  ;",
218              "    }",
219              "     _this.windowstate.file_details.show(",
220              "        _this.windowstate.file, _this.el, false",
221              "    );",
222              "     ",
223              "    return  ;    ",
224              "",
225              "",
226              "}"
227             ]
228            },
229            "string icon_name" : "document-properties",
230            "string label" : "Edit File Properties",
231            "xtype" : "Button"
232           },
233           {
234            "$ xns" : "Gtk",
235            "bool always_show_image" : true,
236            "items" : [
237             {
238              "$ xns" : "Gtk",
239              "* ctor" : "new Gtk.PopoverMenu.from_model(null)",
240              "* init" : [
241               "{",
242               "   // this.el.show();",
243               "}",
244               ""
245              ],
246              "* prop" : "popover",
247              "id" : "topbarmenu",
248              "items" : [
249               {
250                "$ xns" : "Gtk",
251                "* pack" : "set_child",
252                "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
253                "int spacing" : 0,
254                "items" : [
255                 {
256                  "$ xns" : "Gtk",
257                  "listeners" : {
258                   "activate" : [
259                    " ( ) => {",
260                    "         Resources.singleton().fetchStart();",
261                    "}"
262                   ]
263                  },
264                  "string label" : "Download updated Resources",
265                  "xtype" : "Button"
266                 },
267                 {
268                  "$ xns" : "Gtk",
269                  "listeners" : {
270                   "clicked" : [
271                    "() => {",
272                    "    About.singleton().el.show();",
273                    "    }"
274                   ]
275                  },
276                  "string label" : "About the Builder",
277                  "xtype" : "Button"
278                 }
279                ],
280                "xtype" : "Box"
281               }
282              ],
283              "xtype" : "PopoverMenu"
284             }
285            ],
286            "string icon_name" : "dialog-information",
287            "string label" : "About",
288            "xtype" : "MenuButton"
289           },
290           {
291            "$ xns" : "Gtk",
292            "bool hexpand" : true,
293            "string label" : "   ",
294            "xtype" : "Label"
295           },
296           {
297            "$ xns" : "Gtk",
298            "* init" : [
299             "{",
300             "     this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {",
301             "        if (pos < 1) {",
302             "            this.el.hide();",
303             "            _this.mainpane.el.set_sensitive(true);",
304             "            ",
305             "            return;",
306             "        }",
307             "         _this.mainpane.el.set_sensitive(false);",
308             "         this.el.show();",
309             "         this.el.set_fraction ((1.0f * pos) / (1.0f * total));",
310             "         this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));",
311             "       ",
312             "     });",
313             "}",
314             ""
315            ],
316            "bool show_text" : true,
317            "id" : "statusbar",
318            "ulong handler_id" : "-1",
319            "xtype" : "ProgressBar"
320           },
321           {
322            "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
323            "$ xns" : "Gtk",
324            "items" : [
325             {
326              "$ xns" : "Gtk",
327              "id" : "statusbar_compilestatus_label",
328              "int margin_end" : 4,
329              "int margin_start" : 4,
330              "string label" : "Compile Status:",
331              "xtype" : "Label"
332             },
333             {
334              "$ xns" : "Gtk",
335              "Xcls_ValaCompileErrors popup" : "",
336              "id" : "statusbar_errors",
337              "listeners" : {
338               "clicked" : [
339                "() => {",
340                " ",
341                "\tif (this.popup == null) {",
342                "\t\treturn;",
343                "\t}",
344                "   ",
345                "    this.popup.show();",
346                "  ",
347                "}"
348               ]
349              },
350              "string icon_name" : "dialog-error",
351              "string label" : "0 Errors",
352              "xtype" : "Button",
353              "| void setNotices" : [
354               "(GLib.ListStore nots, int ferrors ) {",
355               "    BuilderApplication.showSpinner(\"\");",
356               "     if (nots.get_n_items() < 1 ) {",
357               "    \tthis.el.hide();",
358               "    \tif (this.popup != null) {",
359               "    \t\tthis.popup.el.hide();",
360               "\t\t}",
361               "    \treturn;",
362               "    }",
363               "    ",
364               "    this.el.show();",
365               "    this.el.label = \"%d/%d Errors\".printf(ferrors,(int)nots.get_n_items());",
366               "",
367               "    ",
368               " ",
369               "\tif (this.popup == null) {",
370               "        this.popup = new Xcls_ValaCompileErrors();",
371               "        this.popup.window = _this;",
372               "      //    this.popup.el.set_transient_for( _this.el );",
373               "        this.popup.el.set_parent(this.el);",
374               "    }",
375               " ",
376               "\tthis.popup.updateNotices(nots);",
377               "\t ",
378               "}",
379               ""
380              ]
381             },
382             {
383              "$ xns" : "Gtk",
384              "Xcls_ValaCompileErrors popup" : "",
385              "id" : "statusbar_warnings",
386              "listeners" : {
387               "clicked" : [
388                "() => {",
389                " ",
390                "\tif (this.popup == null) {",
391                "\t\treturn;",
392                "\t}",
393                "   ",
394                "    this.popup.show();",
395                "    return;",
396                "}"
397               ]
398              },
399              "string icon_name" : "dialog-warning",
400              "string label" : "0 Warnings",
401              "xtype" : "Button",
402              "| void setNotices" : [
403               "(GLib.ListStore nots, int ferrs ) {",
404               "    ",
405               "     if (nots.get_n_items() < 1 ) {",
406               "    \tthis.el.hide();",
407               "    \tif (this.popup != null) {",
408               "    \t\tthis.popup.el.hide();",
409               "\t\t}",
410               "    \treturn;",
411               "    }",
412               "    ",
413               "    this.el.show();",
414               "    this.el.label = \"%d/%d Warnings\".printf(ferrs,(int)nots.get_n_items());",
415               "",
416               "    ",
417               " ",
418               "\tif (this.popup == null) {",
419               "        this.popup = new Xcls_ValaCompileErrors();",
420               "        this.popup.window = _this;",
421               "      //    this.popup.el.set_transient_for( _this.el );",
422               "        this.popup.el.set_parent(this.el);",
423               "    }",
424               "\tthis.popup.updateNotices(nots);",
425               "\t ",
426               "}",
427               ""
428              ]
429             },
430             {
431              "# GLib.ListStore notices" : "null",
432              "$ xns" : "Gtk",
433              "Xcls_ValaCompileErrors popup" : "",
434              "id" : "statusbar_depricated",
435              "listeners" : {
436               "clicked" : [
437                "() => {",
438                " ",
439                "\tif (this.popup == null) {",
440                "\t\treturn;",
441                "\t}",
442                "   ",
443                "    this.popup.show();",
444                "  ",
445                "}"
446               ]
447              },
448              "string icon_name" : "dialog-information",
449              "string label" : "0 Depricated",
450              "xtype" : "Button",
451              "| void setNotices" : [
452               "",
453               "(GLib.ListStore nots, int ferrs ) {",
454               "    ",
455               "     if (nots.get_n_items() < 1 ) {",
456               "    \tthis.el.hide();",
457               "    \tif (this.popup != null) {",
458               "    \t\tthis.popup.el.hide();",
459               "\t\t}",
460               "    \treturn;",
461               "    }",
462               "    ",
463               "    this.el.show();",
464               "    this.el.label = \"%d/%d Depricated\".printf(ferrs,(int)nots.get_n_items());",
465               "",
466               "    ",
467               " ",
468               "\tif (this.popup == null) {",
469               "        this.popup = new Xcls_ValaCompileErrors();",
470               "        this.popup.window = _this;",
471               "      //    this.popup.el.set_transient_for( _this.el );",
472               "        this.popup.el.set_parent(this.el);",
473               "    }",
474               "\tthis.popup.updateNotices(nots);",
475               "\t ",
476               "}",
477               ""
478              ]
479             },
480             {
481              "$ xns" : "Gtk",
482              "Palete.ValaCompileRequest? last_request" : "null",
483              "Xcls_ValaCompileErrors popup" : "",
484              "bool visible" : false,
485              "id" : "statusbar_run",
486              "listeners" : {
487               "clicked" : [
488                "() => {",
489                "   ",
490                "   if (_this.windowstate.file == null) {",
491                "\t\treturn;",
492                "\t}",
493                "   if (_this.statusbar_compile_spinner.el.spinning) {",
494                "    \t_this.windowstate.compile_results.el.set_parent(this.el);",
495                "\t    _this.windowstate.compile_results.el.show(); // show currently running.",
496                "    \treturn;",
497                "\t}",
498                "\t",
499                "\tif (this.last_request != null) {",
500                "\t\tthis.last_request.cancel();",
501                "\t\tif (this.last_request.terminal_pid > 0) {",
502                "\t\t\tthis.last_request.killChildren(this.last_request.terminal_pid);",
503                "\t\t}",
504                "\t}",
505                "\tvar pr = _this.windowstate.project as Project.Gtk;",
506                "\tif (pr == null) {",
507                "\t\treturn;",
508                "\t}",
509                "\t",
510                "\t",
511                "\tthis.last_request= new Palete.ValaCompileRequest(",
512                "\t\tpr,",
513                "\t\tpr.firstBuildModuleWith(_this.windowstate.file)",
514                "\t);",
515                "\tthis.last_request.onOutput.connect( ( str) => {",
516                "\t\t_this.windowstate.compile_results.addLine(str);",
517                "\t});",
518                "\tthis.last_request.run.begin( ( a, r) => {",
519                "\t\tthis.last_request.run.end(r);",
520                "\t});",
521                "\t if (_this.windowstate.compile_results.el.parent == null) {",
522                "\t\t_this.windowstate.compile_results.el.set_parent(this.el);",
523                "\t}",
524                "\t_this.windowstate.compile_results.show(this.el,true);",
525                "\t         ",
526                "}"
527               ]
528              },
529              "string icon_name" : "media-playback-start",
530              "string label" : "Run",
531              "xtype" : "Button"
532             }
533            ],
534            "xtype" : "Box"
535           },
536           {
537            "$ xns" : "Gtk",
538            "id" : "statusbar_compile_spinner",
539            "int margin_end" : 4,
540            "int margin_start" : 4,
541            "string tooltip_text" : "Compiling",
542            "xtype" : "Spinner",
543            "| void start" : [
544             "(string icon, string tooltip) {",
545             "",
546             "\tif (icon == \"spinner\") {",
547             "\t  this.el.show();",
548             "\t  this.el.start();  ",
549             "\t  this.el.tooltip_text = tooltip;",
550             "\t  _this.statusbar_compile_icon.el.hide();",
551             "  } else {",
552             "\t  this.el.hide();",
553             "\t//  GLib.debug(\"set status icon %s, %s\", icon, tooltip);",
554             "\t  _this.statusbar_compile_icon.el.tooltip_text = tooltip;",
555             "\t  _this.statusbar_compile_icon.el.icon_name = icon;",
556             "\t  _this.statusbar_compile_icon.el.show();\t  ",
557             "  }",
558             "  ",
559             "\t ",
560             "}",
561             ""
562            ],
563            "| void stop" : [
564             "() {",
565             " this.el.stop();",
566             "  this.el.hide();",
567             " _this.statusbar_compile_icon.el.hide();  ",
568             "}",
569             ""
570            ]
571           },
572           {
573            "$ xns" : "Gtk",
574            "Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
575            "id" : "statusbar_compile_icon",
576            "int margin_end" : 4,
577            "int margin_start" : 4,
578            "xtype" : "Image"
579           }
580          ],
581          "xtype" : "Box"
582         }
583        ],
584        "xtype" : "Box"
585       },
586       {
587        "$ xns" : "Gtk",
588        "* prop" : "sidebar",
589        "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
590        "id" : "sidebar",
591        "int spacing" : 0,
592        "items" : [
593         {
594          "$ xns" : "Gtk",
595          "* prop" : "child",
596          "bool has_tooltip" : true,
597          "bool hexpand" : true,
598          "id" : "filesearch",
599          "items" : [
600           {
601            "$ xns" : "Gtk",
602            "listeners" : {
603             "key_released" : [
604              "(keyval, keycode, state) => {",
605              "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
606              "\t\treturn;",
607              "\t}",
608              "\tGLib.debug(",
609              "\t",
610              "\t\t\"searcj key release %d, %d, %d  ?= %d\" , ",
611              "\t\t\t(int) keyval, (int)  keycode, state,",
612              "\t\t\t(int)Gdk.Key.Return",
613              "\t\t);",
614              "\tif (!_this.treescroll.el.visible || _this.treeselmodel.el.get_n_items() < 0) {",
615              "\t\treturn;",
616              "\t}",
617              "\t\t",
618              "\tvar dir = 0;",
619              "\t",
620              "\tif (keyval == Gdk.Key.Return) {",
621              "\t\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
622              "\t\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
623              "\t\tvar f = (JsRender.JsRender) tr.item;",
624              "\t\tGLib.debug(\"Click %s\", f.name);",
625              "\t\tif (f.xtype == \"Dir\") {",
626              "\t\t\treturn;",
627              "\t\t}",
628              "\t\t",
629              "\t\t",
630              "\t \t_this.windowstate.fileViewOpen(f,",
631              "\t \t\t_this.keystate.is_shift != 1 ",
632              "\t\t);",
633              "\t\t",
634              "\t\t_this.splitview.el.show_sidebar = false;",
635              "\t\treturn;",
636              "\t\t",
637              "\t",
638              "\t}",
639              "\tif (keyval == Gdk.Key.Up) {",
640              "\t\tdir = -1;",
641              "\t}if (keyval == Gdk.Key.Down) {",
642              "\t\tdir = 1;",
643              "\t}",
644              "\tif (dir == 0) {",
645              "\t\treturn;",
646              "\t}",
647              "\tvar ns = _this.treeselmodel.el.selected + dir;",
648              "\tif (ns < 0) {",
649              "\t\tns = 0;",
650              "\t}",
651              "\tif (ns >= _this.treeselmodel.el.get_n_items()) {",
652              "\t\tns  = _this.treeselmodel.el.get_n_items()-1;",
653              "\t}",
654              "\t_this.treeselmodel.el.selected = ns;",
655              "}",
656              ""
657             ]
658            },
659            "xtype" : "EventControllerKey"
660           }
661          ],
662          "listeners" : {
663           "search_changed" : [
664            "( ) => {",
665            "",
666            "\t_this.windowsearch.el.set_search(this.el.get_text());",
667            "\tif (this.el.text == \"\") {",
668            "\t\t_this.treescroll.el.visible = false;",
669            "\t\treturn;",
670            "\t}",
671            "\t_this.treescroll.el.visible = true;",
672            "\t_this.treefilter.el.changed(Gtk.FilterChange.DIFFERENT);",
673            "}",
674            ""
675           ]
676          },
677          "string placeholder_text" : "Search for file",
678          "string tooltip_text" : [
679           "up/down arrow to select file from lower file list",
680           "enter opens selected in new window",
681           "shift+enter opens it in this window "
682          ],
683          "xtype" : "SearchEntry"
684         },
685         {
686          "$ xns" : "Gtk",
687          "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
688          "bool hexpand" : true,
689          "int spacing" : 0,
690          "items" : [
691           {
692            "$ xns" : "Gtk",
693            "bool hexpand" : true,
694            "id" : "open_projects_btn",
695            "items" : [
696             {
697              "$ xns" : "Gtk",
698              "* prop" : "child",
699              "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
700              "int spacing" : 0,
701              "items" : [
702               {
703                "$ xns" : "Gtk",
704                "int margin_end" : 4,
705                "string icon_name" : "document-open",
706                "xtype" : "Image"
707               },
708               {
709                "$ xns" : "Gtk",
710                "string label" : "Open File",
711                "xtype" : "Label"
712               }
713              ],
714              "xtype" : "Box"
715             }
716            ],
717            "listeners" : {
718             "clicked" : [
719              "  ( ) => {",
720              "  \t_this.windowstate.showPopoverFiles(this.el, _this.project, false);",
721              "}"
722             ]
723            },
724            "tooltop_text" : "\"Open File\"",
725            "xtype" : "Button"
726           },
727           {
728            "$ xns" : "Gtk",
729            "bool hexpand" : true,
730            "items" : [
731             {
732              "$ xns" : "Gtk",
733              "* prop" : "child",
734              "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
735              "int spacing" : 0,
736              "items" : [
737               {
738                "$ xns" : "Gtk",
739                "int margin_end" : 4,
740                "string icon_name" : "window-new",
741                "xtype" : "Image"
742               },
743               {
744                "$ xns" : "Gtk",
745                "string label" : "New Window",
746                "xtype" : "Label"
747               }
748              ],
749              "xtype" : "Box"
750             }
751            ],
752            "listeners" : {
753             "clicked" : [
754              "( ) => {",
755              "\t_this.splitview.el.show_sidebar = false;",
756              "\t_this.windowstate.showPopoverFiles(_this.el, _this.project, true);",
757              "}"
758             ]
759            },
760            "xtype" : "Button"
761           }
762          ],
763          "xtype" : "Box"
764         },
765         {
766          "$ xns" : "Gtk",
767          "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
768          "bool vexpand" : true,
769          "items" : [
770           {
771            "$ xns" : "Gtk",
772            "* prop" : "start_child",
773            "bool has_frame" : true,
774            "items" : [
775             {
776              "$ xns" : "Gtk",
777              "* prop" : "child",
778              "items" : [
779               {
780                "$ xns" : "Gtk",
781                "* prop" : "model",
782                "bool autoselect" : false,
783                "bool can_unselect" : false,
784                "bool selecting" : false,
785                "id" : "winsel",
786                "items" : [
787                 {
788                  "$ xns" : "Gtk",
789                  "* prop" : "model",
790                  "items" : [
791                   {
792                    "$ xns" : "Gtk",
793                    "* prop" : "model",
794                    "id" : "winfilter",
795                    "items" : [
796                     {
797                      "$ xns" : "Gtk",
798                      "* prop" : "filter",
799                      "id" : "windowsearch",
800                      "items" : [
801                       {
802                        "$ xns" : "Gtk",
803                        "* prop" : "expression",
804                        "GLib.Type this_type" : "typeof(WindowState)",
805                        "string property_name" : "file_name",
806                        "xtype" : "PropertyExpression"
807                       }
808                      ],
809                      "xtype" : "StringFilter"
810                     },
811                     {
812                      "$ xns" : "GLib",
813                      "* prop" : "model",
814                      "GLib.Type item_type" : "typeof(WindowState)",
815                      "id" : "winmodel",
816                      "xtype" : "ListStore"
817                     }
818                    ],
819                    "xtype" : "FilterListModel"
820                   },
821                   {
822                    "$ xns" : "Gtk",
823                    "* prop" : "sorter",
824                    "bool ignore_case" : true,
825                    "items" : [
826                     {
827                      "$ xns" : "Gtk",
828                      "* prop" : "expression",
829                      "GLib.Type this_type" : "typeof(WindowState)",
830                      "string property_name" : "file_name",
831                      "xtype" : "PropertyExpression"
832                     }
833                    ],
834                    "xtype" : "StringSorter"
835                   }
836                  ],
837                  "xtype" : "SortListModel"
838                 }
839                ],
840                "listeners" : {
841                 "notify[\"selected\"]" : [
842                  "() => {",
843                  "\tif (_this.winloading || this.selecting || this.el.selected == Gtk.INVALID_LIST_POSITION) {",
844                  "\t\treturn;",
845                  "\t}",
846                  "\tvar ws = this.el.selected_item as WindowState;",
847                  "\tif (ws == null) {",
848                  "\t\treturn;",
849                  "\t}",
850                  "\tif (ws.file.path != _this.windowstate.file.path) {",
851                  "\t\t_this.windowstate.fileViewOpen(ws.file, ws.file_details.new_window,  -1);",
852                  "\t\t_this.splitview.el.show_sidebar = false;",
853                  "\t}",
854                  "\t",
855                  "\tthis.selectCurrent();",
856                  " }"
857                 ]
858                },
859                "xtype" : "SingleSelection",
860                "| void selectCurrent" : [
861                 "() {",
862                 "\tthis.selecting = true;",
863                 "\t ",
864                 "\tfor(var i = 0;i < this.el.get_n_items(); i++) {",
865                 "\t\tvar ws = this.el.get_item(i) as WindowState;",
866                 "\t\tif (ws.file.path == _this.windowstate.file.path) {",
867                 "\t\t  \tthis.el.selected = i;",
868                 "\t\t  \tbreak;",
869                 "\t  \t}",
870                 "\t}",
871                 "\tthis.selecting = false;",
872                 " ",
873                 "",
874                 "}"
875                ]
876               },
877               {
878                "$ xns" : "Gtk",
879                "bool expand" : true,
880                "bool resizable" : true,
881                "id" : "projcol",
882                "items" : [
883                 {
884                  "$ xns" : "Gtk",
885                  "* prop" : "factory",
886                  "listeners" : {
887                   "bind" : [
888                    "(listitem) => {",
889                    "\t var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
890                    "\t var item =  (listitem as Gtk.ListItem).get_item() as WindowState;",
891                    "\t ",
892                    "\t lb.label = item.project.name;",
893                    "",
894                    "",
895                    "  ",
896                    "",
897                    "}",
898                    ""
899                   ],
900                   "setup" : [
901                    "(listitem) => {",
902                    "\tvar lbl = new Gtk.Label(\"\");",
903                    " \t(listitem as Gtk.ListItem).set_child(lbl);",
904                    " \tlbl.justify = Gtk.Justification.LEFT;",
905                    " \tlbl.xalign = 0;",
906                    " \tlbl.use_markup = true;",
907                    "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
908                    "  ",
909                    "\t(listitem as Gtk.ListItem).activatable = true;",
910                    "}",
911                    ""
912                   ]
913                  },
914                  "xtype" : "SignalListItemFactory"
915                 }
916                ],
917                "title" : "Project",
918                "xtype" : "ColumnViewColumn"
919               },
920               {
921                "$ xns" : "Gtk",
922                "* pack" : "append_column",
923                "bool expand" : true,
924                "bool resizable" : true,
925                "id" : "filecol",
926                "items" : [
927                 {
928                  "$ xns" : "Gtk",
929                  "* prop" : "factory",
930                  "listeners" : {
931                   "bind" : [
932                    "(listitem) => {",
933                    " var lb = (Gtk.Label) (listitem as Gtk.ListItem).get_child();",
934                    " var item =  (listitem as Gtk.ListItem).get_item() as WindowState;",
935                    " ",
936                    " lb.label = item.file.relpath;",
937                    "",
938                    "",
939                    "  ",
940                    "",
941                    "}",
942                    ""
943                   ],
944                   "setup" : [
945                    "(listitem) => {",
946                    "\tvar lbl = new Gtk.Label(\"\");",
947                    " \t(listitem as Gtk.ListItem).set_child(lbl);",
948                    " \tlbl.justify = Gtk.Justification.LEFT;",
949                    " \tlbl.xalign = 0;",
950                    " \tlbl.use_markup = true;",
951                    "\tlbl.ellipsize = Pango.EllipsizeMode.START;",
952                    "  ",
953                    "\t(listitem as Gtk.ListItem).activatable = true;",
954                    "}",
955                    ""
956                   ]
957                  },
958                  "xtype" : "SignalListItemFactory"
959                 }
960                ],
961                "title" : "File",
962                "xtype" : "ColumnViewColumn"
963               }
964              ],
965              "xtype" : "ColumnView"
966             }
967            ],
968            "xtype" : "ScrolledWindow"
969           },
970           {
971            "* prop" : "end_child",
972            "bool has_frame" : true,
973            "bool hexpand" : true,
974            "bool vexpand" : true,
975            "bool visible" : false,
976            "id" : "treescroll",
977            "items" : [
978             {
979              "$ xns" : "Gtk",
980              "* prop" : "child",
981              "bool hexpand" : true,
982              "bool vexpand" : true,
983              "id" : "treeview",
984              "items" : [
985               {
986                "$ xns" : "Gtk",
987                "listeners" : {
988                 "pressed" : [
989                  "(n_press, x, y) => {",
990                  "\tif (n_press == 2) {",
991                  "\t\tGLib.debug(\"double cliced\");",
992                  "\t} else {",
993                  "\t\treturn;",
994                  "\t}",
995                  "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
996                  "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
997                  "\tvar f = (JsRender.JsRender) tr.item;",
998                  "\tGLib.debug(\"Click %s\", f.name);",
999                  "\tif (f.xtype == \"Dir\") {",
1000                  "\t\treturn;",
1001                  "\t}",
1002                  "\t",
1003                  "\t",
1004                  " \t_this.windowstate.fileViewOpen(f,",
1005                  " \t\t_this.keystate.is_shift != 1 ",
1006                  "\t);",
1007                  "\t",
1008                  "\t_this.splitview.el.show_sidebar = false;",
1009                  "\t",
1010                  "\t",
1011                  "",
1012                  "}",
1013                  ""
1014                 ]
1015                },
1016                "xtype" : "GestureClick"
1017               },
1018               {
1019                "$ xns" : "Gtk",
1020                "* prop" : "model",
1021                "bool autoselect" : true,
1022                "bool can_unselect" : true,
1023                "id" : "treeselmodel",
1024                "items" : [
1025                 {
1026                  "$ xns" : "Gtk",
1027                  "* prop" : "model",
1028                  "items" : [
1029                   {
1030                    "$ xns" : "Gtk",
1031                    "* prop" : "model",
1032                    "bool incremental" : true,
1033                    "id" : "treelistsort",
1034                    "items" : [
1035                     {
1036                      "$ xns" : "Gtk",
1037                      "* prop" : "model",
1038                      "Gtk.TreeListModelCreateModelFunc create_func" : [
1039                       "(item) => {",
1040                       "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
1041                       "\treturn ((JsRender.JsRender)item).childfiles;",
1042                       "} "
1043                      ],
1044                      "bool autoexpand" : true,
1045                      "bool passthrough" : false,
1046                      "id" : "treelistmodel",
1047                      "items" : [
1048                       {
1049                        "$ xns" : "GLib",
1050                        "* prop" : "root",
1051                        "GLib.Type item_type" : "typeof(JsRender.JsRender)",
1052                        "id" : "treemodel",
1053                        "xtype" : "ListStore"
1054                       }
1055                      ],
1056                      "xtype" : "TreeListModel"
1057                     },
1058                     {
1059                      "$ xns" : "Gtk",
1060                      "* prop" : "sorter",
1061                      "items" : [
1062                       {
1063                        "$ xns" : "Gtk",
1064                        "* prop" : "sorter",
1065                        "bool ignore_case" : true,
1066                        "items" : [
1067                         {
1068                          "$ xns" : "Gtk",
1069                          "* prop" : "expression",
1070                          "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
1071                          "string property_name" : "name",
1072                          "xtype" : "PropertyExpression"
1073                         }
1074                        ],
1075                        "xtype" : "StringSorter"
1076                       }
1077                      ],
1078                      "xtype" : "TreeListRowSorter"
1079                     }
1080                    ],
1081                    "xtype" : "SortListModel"
1082                   },
1083                   {
1084                    "$ xns" : "Gtk",
1085                    "* prop" : "filter",
1086                    "Gtk.CustomFilterFunc match_func" : [
1087                     "(item) => { ",
1088                     "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
1089                     "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
1090                     "\tvar j =  (JsRender.JsRender) tr;",
1091                     "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
1092                     "\t\treturn false;",
1093                     "\t}",
1094                     "\tvar str = _this.filesearch.el.text.down();\t",
1095                     "\tif (j.xtype == \"Dir\") {",
1096                     "\t",
1097                     "\t\t",
1098                     "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
1099                     "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
1100                     "\t\t\t//if (f.xtype != \"PlainFile\") {",
1101                     "\t\t\t//\tcontinue;",
1102                     "\t\t\t//}",
1103                     "\t\t\tif (f.content_type.contains(\"image\")) {",
1104                     "\t\t\t\tcontinue;",
1105                     "\t\t\t}",
1106                     "\t\t\tif (str.length < 1) {",
1107                     "\t\t\t\treturn true;",
1108                     "\t\t\t}",
1109                     "\t\t\tif (f.name.down().contains(str)) {",
1110                     "\t\t\t\treturn true;",
1111                     "\t\t\t}",
1112                     "\t\t\t",
1113                     "\t\t}",
1114                     "\t\t ",
1115                     "\t\treturn false;",
1116                     "\t}",
1117                     "\t//if (j.xtype != \"PlainFile\") {",
1118                     "\t//\treturn false;",
1119                     "\t//}",
1120                     " \tif (j.content_type.contains(\"image\")) {",
1121                     "\t\treturn false;",
1122                     "\t}",
1123                     "\t\t\t ",
1124                     "\tif (str.length < 1) { // no search.",
1125                     "\t\treturn true;",
1126                     "\t}",
1127                     "\tif (j.name.down().contains(str)) {",
1128                     "\t\treturn true;",
1129                     "\t}",
1130                     "\treturn false; ",
1131                     "",
1132                     "}"
1133                    ],
1134                    "id" : "treefilter",
1135                    "xtype" : "CustomFilter"
1136                   }
1137                  ],
1138                  "xtype" : "FilterListModel"
1139                 }
1140                ],
1141                "xtype" : "SingleSelection"
1142               },
1143               {
1144                "$ xns" : "Gtk",
1145                "* init" : [
1146                 "{",
1147                 "\t// this.el.set_sorter(  new Gtk.StringSorter(",
1148                 "\t// \tnew Gtk.PropertyExpression(typeof(JsRender.NodeProp), null, \"name\")",
1149                 " //\t));",
1150                 "\t\t",
1151                 "}",
1152                 ""
1153                ],
1154                "* pack" : "append_column",
1155                "bool expand" : true,
1156                "bool resizable" : true,
1157                "id" : "name",
1158                "items" : [
1159                 {
1160                  "$ xns" : "Gtk",
1161                  "* prop" : "factory",
1162                  "listeners" : {
1163                   "bind" : [
1164                    "(listitem) => {",
1165                    "\t",
1166                    "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
1167                    "                \t",
1168                    "            \t",
1169                    "            \t",
1170                    "        \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
1171                    "    \tvar expand = (Gtk.TreeExpander)  ((Gtk.ListItem)listitem).get_child();",
1172                    "    \t  ",
1173                    "     \tvar hbox = (Gtk.Box) expand.child;",
1174                    " ",
1175                    "\t",
1176                    "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
1177                    "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
1178                    "",
1179                    " ",
1180                    "    \t",
1181                    "    \t if (lbl == null || lbl.label != \"\") { // do not update",
1182                    "    \t \treturn;",
1183                    "     \t}",
1184                    "    \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
1185                    "    \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
1186                    "    ",
1187                    "    \t",
1188                    "    \tvar jr =(JsRender.JsRender) lr.get_item();",
1189                    "    \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
1190                    "    \t",
1191                    "    \t if (jr == null) {",
1192                    "    \t\t GLib.debug(\"Problem getting item\"); ",
1193                    "    \t\t return;",
1194                    "    \t }",
1195                    "",
1196                    "\t\tjr.bind_property(\"icon\",",
1197                    "                img, \"gicon\",",
1198                    "               GLib.BindingFlags.SYNC_CREATE);",
1199                    "",
1200                    "    \t//GLib.debug(\"change  %s to %s\", lbl.label, np.name);",
1201                    "    \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
1202                    "    \tlbl.tooltip_markup = jr.path;",
1203                    "    \t ",
1204                    "        expand.set_hide_expander(  jr.xtype != \"Dir\" );",
1205                    "     \t expand.set_list_row(lr);",
1206                    "     ",
1207                    "         \t ",
1208                    "                 \t// bind image...",
1209                    "}",
1210                    ""
1211                   ],
1212                   "setup" : [
1213                    "(listitem) => {",
1214                    "\t",
1215                    "\tvar expand = new Gtk.TreeExpander();",
1216                    "\t ",
1217                    "\texpand.set_indent_for_depth(true);",
1218                    "\texpand.set_indent_for_icon(true);",
1219                    "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
1220                    "\tvar icon = new Gtk.Image();",
1221                    "\ticon.margin_end = 4;",
1222                    "\tvar lbl = new Gtk.Label(\"\");",
1223                    "\tlbl.use_markup = true;",
1224                    "\t",
1225                    "\t",
1226                    " \tlbl.justify = Gtk.Justification.LEFT;",
1227                    " \tlbl.xalign = 0;",
1228                    "",
1229                    " \thbox.append(icon);",
1230                    "\thbox.append(lbl);",
1231                    "\texpand.set_child(hbox);",
1232                    "\t((Gtk.ListItem)listitem).set_child(expand);",
1233                    "\t((Gtk.ListItem)listitem).activatable = false;",
1234                    "}",
1235                    ""
1236                   ]
1237                  },
1238                  "xtype" : "SignalListItemFactory"
1239                 }
1240                ],
1241                "string title" : "All Project Files",
1242                "xtype" : "ColumnViewColumn"
1243               }
1244              ],
1245              "xtype" : "ColumnView"
1246             }
1247            ],
1248            "string tooltip_text" : [
1249             "dbl-click - opens in NEW window                        ",
1250             "shift--dbl-click opens in this window"
1251            ],
1252            "string xns" : "Gtk",
1253            "string xtype" : "ScrolledWindow"
1254           }
1255          ],
1256          "xtype" : "Paned"
1257         }
1258        ],
1259        "xtype" : "Box",
1260        "| void show" : [
1261         "() {",
1262         "\t_this.splitview.el.show_sidebar = true;",
1263         "  \t ",
1264         "\t_this.filesearch.el.grab_focus();",
1265         "\t_this.winloading = true;",
1266         "\t_this.winmodel.el.remove_all();",
1267         "\t_this.filesearch.el.set_text(\"\");",
1268         "\tfor(var i = 0;i < BuilderApplication.windowlist.get_n_items(); i++) {",
1269         "\t\t_this.winmodel.el.append( BuilderApplication.windowlist.get_item(i));",
1270         "\t}",
1271         "\t_this.winsel.selectCurrent();",
1272         "\t_this.winloading = false;",
1273         "\t",
1274         "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1275         "\t",
1276         "\t_this.windowstate.project.loadDirsIntoStore(_this.treemodel.el);",
1277         "\t",
1278         "\t_this.treeview.el.set_model(_this.treeselmodel.el);",
1279         "\t",
1280         " \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1281         "\t",
1282         " ",
1283         "}"
1284        ]
1285       },
1286       {
1287        "$ xns" : "Gtk",
1288        "id" : "keystate",
1289        "int is_shift" : 0,
1290        "listeners" : {
1291         "key_pressed" : [
1292          "(keyval, keycode, state) => {",
1293          "",
1294          " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1295          " \t\tthis.is_shift = 1;",
1296          " \t\t",
1297          "\t}",
1298          "\t",
1299          "\t",
1300          "\treturn true;",
1301          "\t",
1302          "}",
1303          ""
1304         ],
1305         "key_released" : [
1306          "(keyval, keycode, state) => {",
1307          "\tGLib.debug(",
1308          "\t",
1309          "\t\t\"key release %d, %d, %d  ?= %d %d\" , ",
1310          "\t\t\t(int) keyval, (int)  keycode, state,",
1311          "\t\t\t(int)Gdk.Key.O, Gdk.ModifierType.CONTROL_MASK",
1312          "\t\t);",
1313          " \tif (keyval == Gdk.Key.Shift_L || keyval == Gdk.Key.Shift_R) {",
1314          " \t\tthis.is_shift = 0;",
1315          "\t}",
1316          "\t//GLib.debug(\"set state %d , shift = %d\", (int)this.el.get_current_event_state(), Gdk.ModifierType.SHIFT_MASK);",
1317          "\tif (keyval == Gdk.Key.o && (state & Gdk.ModifierType.CONTROL_MASK) != 0) {",
1318          "\t\t// ctrl O pressed",
1319          "\t\tif (!_this.splitview.el.show_sidebar) {",
1320          "\t  \t\t_this.sidebar.show(); ",
1321          "\t \t}",
1322          "\t}",
1323          "\t",
1324          "",
1325          " ",
1326          "}"
1327         ]
1328        },
1329        "xtype" : "EventControllerKey"
1330       }
1331      ],
1332      "xtype" : "OverlaySplitView"
1333     }
1334    ],
1335    "listeners" : {
1336     "close_request" : [
1337      "( ) => {",
1338      "\t Resources.singleton().disconnect(_this.statusbar.handler_id);",
1339      "\t ",
1340      "\t ",
1341      "\t this.windowstate.file.getLanguageServer().document_close(",
1342      "\t \tthis.windowstate.file",
1343      " \t);",
1344      "\t ",
1345      "\t BuilderApplication.removeWindow(this);",
1346      "\t ",
1347      "\t if (BuilderApplication.windows.size  < 1) {",
1348      "\t\tthis.windowstate.file.getLanguageServer().exit();",
1349      "\t\tBuilderApplication.singleton(  null ).quit();",
1350      "\t }",
1351      "\treturn true;",
1352      "\t",
1353      "}",
1354      ""
1355     ],
1356     "hide" : [
1357      "() =>  {",
1358      " ",
1359      " ",
1360      "",
1361      "}"
1362     ],
1363     "show" : [
1364      "  ( ) => {",
1365      "    // hide the file editing..",
1366      "   ",
1367      "    //this.hideViewEditing();",
1368      "    // this is updated by windowstate - we try and fill it in..",
1369      "     _this.statusbar.el.hide();",
1370      "     //_this.statusbar_errors.el.hide();",
1371      "    //_this.statusbar_warnings.el.hide();",
1372      "    //_this.statusbar_depricated.el.hide();",
1373      "    _this.statusbar_compile_spinner.el.hide();",
1374      "  ",
1375      "    Resources.singleton().checkResources();",
1376      "    ",
1377      "  ",
1378      "",
1379      "}"
1380     ]
1381    },
1382    "string title" : "Roo Application Builder",
1383    "xtype" : "ApplicationWindow",
1384    "| void initChildren" : [
1385     " () {",
1386     "    // this needs putting in a better place..",
1387     "    if (this.windowstate == null) {",
1388     "    \tthis.windowstate = new WindowState(this);",
1389     "    ",
1390     "    }",
1391     "     ",
1392     "",
1393     " ",
1394     "",
1395     "    ",
1396     "",
1397     "",
1398     "",
1399     "}",
1400     ""
1401    ],
1402    "| void openNewWindow" : [
1403     "() {",
1404     " ",
1405     "    var w = new Xcls_MainWindow();",
1406     "    w.ref();",
1407     "\tBuilderApplication.addWindow(w);",
1408     "    w.el.show();",
1409     "    w.initChildren();",
1410     "    w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);",
1411     "     ",
1412     "}",
1413     ""
1414    ],
1415    "| void setTitle" : [
1416     " () {",
1417     "    if (_this.windowstate.project == null || ",
1418     "\t    _this.windowstate.file == null",
1419     "    ) {",
1420     "    \tthis.el.set_title(\"Select File\");",
1421     "    \treturn;",
1422     "\t}",
1423     "    _this.el.set_title(",
1424     "    \t_this.windowstate.project.name + ",
1425     "    \t\" - \" +",
1426     "\t\t_this.windowstate.file.relpath);",
1427     "} "
1428    ],
1429    "| void show" : [
1430     "() {",
1431     "   ",
1432     "    this.el.show();",
1433     "    if (this.windowstate.file  == null) {",
1434     "    \tthis.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);",
1435     "    }",
1436     "}"
1437    ],
1438    "| void updateErrors" : [
1439     "() {",
1440     "",
1441     "",
1442     " \tGLib.debug(\"updateErrors\");",
1443     "\t",
1444     "\tvar pr = this.windowstate.project.getErrors(\"ERR\");",
1445     "\t",
1446     "\tthis.statusbar_errors.setNotices(",
1447     "\t\tpr,",
1448     "\t\tthis.windowstate.file.getErrorsTotal(\"ERR\")",
1449     "\t);",
1450     "\t",
1451     "\tthis.statusbar_warnings.setNotices(",
1452     "\t\tthis.windowstate.project.getErrors(\"WARN\"),",
1453     "\t\tthis.windowstate.file.getErrorsTotal(\"WARN\")",
1454     "\t);",
1455     "\tthis.statusbar_depricated.setNotices(",
1456     "\t\tthis.windowstate.project.getErrors(\"DEPR\"),",
1457     "\t\tthis.windowstate.file.getErrorsTotal(\"DEPR\")",
1458     "\t);",
1459     "",
1460     "\t_this.statusbar_run.el.hide();",
1461     "",
1462     "\tif (pr.get_n_items() < 1) {",
1463     "\t\t_this.statusbar_run.el.show();",
1464     "\t} ",
1465     "\t",
1466     "}"
1467    ]
1468   }
1469  ],
1470  "name" : "MainWindow"
1471 }