2 * as state management is a bit too complicated inside the builder
3 * it's better to seperate this into this class
5 * This class has references to all the Class instances that make up the window..
8 public class WindowState : Object
10 public Xcls_MainWindow win;
21 PROJECT, // project settings..
22 FILEPROJECT // project when in file mode
25 public State state = State.NONE;
27 public bool children_loaded = false;
30 public Project.Project project;
31 public JsRender.JsRender file;
35 public Xcls_WindowLeftTree left_tree;
36 public Xcls_WindowAddProp add_props;
37 public Xcls_LeftProps left_props;
38 public Xcls_ProjectSettings projectsettings;
39 public ValaProjectSettings vala_projectsettings;
40 public Xcls_RightPalete rightpalete;
41 public Editor code_editor;
42 public Xcls_WindowRooView window_rooview;
43 public Xcls_GtkView window_gladeview;
45 public Xcls_ClutterFiles clutterfiles;
47 public Xcls_WindowLeftProjects left_projects; // can not see where this is initialized..
49 public DialogTemplateSelect template_select;
51 public Xcls_PopoverFileDetails file_details;
54 public Xcls_ValaCompileResults compile_results;
57 public Xcls_DialogPluginWebkit webkit_plugin;
60 public Palete.ValaSource valasource; // the spawner that runs the vala compiler.
61 public Json.Object last_compile_result;
64 public WindowState(Xcls_MainWindow win)
73 // on clutter space...
74 this.projectEditInit();
76 this.projectListInit();
86 this.webkitViewInit();
90 this.fileDetailsInit();
92 this.webkit_plugin = new Xcls_DialogPluginWebkit();
93 this.template_select = new DialogTemplateSelect();
94 this.children_loaded = true;
96 this.left_tree.node_selected.connect((sel) => {
97 if (this.file.xtype == "Roo") {
98 this.window_rooview.sourceview.nodeSelected(sel);
100 this.window_gladeview.sourceview.nodeSelected(sel);
103 this.valasource = new Palete.ValaSource();
104 this.valasource.compiled.connect(this.valaCompiled);
106 this.compile_results = new Xcls_ValaCompileResults();
107 this.compile_results.window = this.win;
108 this.valasource.compile_output.connect(this.compile_results.addLine);
110 this.win.statusbar_compilestatus_label.el.hide();
111 this.win.statusbar_run.el.hide();
112 this.win.search_results.el.hide();
118 public void leftTreeInit()
121 this.left_tree = new Xcls_WindowLeftTree();
122 this.left_tree.ref();
123 this.left_tree.main_window = this.win;
125 this.win.tree.el.pack_start(this.left_tree.el,true, true,0);
126 this.left_tree.el.show_all();
128 this.left_tree.before_node_change.connect(() => {
129 return this.leftTreeBeforeChange();
133 this.left_tree.node_selected.connect((sel) => {
134 this.leftTreeNodeSelected(sel);
137 this.left_tree.changed.connect(() => {
140 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
141 this.window_rooview.requestRedraw();
143 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
150 public bool leftTreeBeforeChange()
152 if (this.state != State.CODE) {
153 this.left_props.finish_editing();
156 if (!this.code_editor.saveContents()) {
162 public void leftTreeNodeSelected(JsRender.Node? sel)
165 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
168 this.left_props.el.hide();
170 this.left_props.el.show();
171 this.left_props.load(this.left_tree.getActiveFile(), sel);
172 switch (this.state) {
177 this.rightpalete.clear();
180 this.rightpalete.load(this.left_tree.getActiveFile().palete(), sel.fqn());
186 this.add_props.clear();
189 this.add_props.show(this.left_tree.getActiveFile().palete(), "props", sel.fqn());
195 this.add_props.clear();
198 this.add_props.show(this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
202 this.switchState(State.PREVIEW);
215 public void propsListInit()
218 this.left_props =new Xcls_LeftProps();
219 this.left_props.ref();
220 this.left_props.main_window = this.win;
221 this.win.props.el.pack_start(this.left_props.el,true, true,0);
222 this.left_props.el.show_all();
224 this.left_props.show_editor.connect( (file, node, type, key) => {
225 this.switchState(State.CODE);
226 this.code_editor.show(
237 this.left_props.stop_editor.connect( () => {
238 if (this.state != State.CODE) {
242 var ret = this.code_editor.saveContents();
246 this.switchState(State.PREVIEW);
250 this.left_props.changed.connect(() => {
251 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
252 this.window_rooview.requestRedraw();
254 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
256 this.left_tree.model.updateSelected();
258 if (this.file.xtype=="Gtk") {
259 this.valasource.checkFileSpawn(this.file);
267 //------------- projects edit
269 public void projectEditInit()
271 this.projectsettings =new Xcls_ProjectSettings();
272 this.projectsettings.ref(); /// really?
274 this.vala_projectsettings =new ValaProjectSettings();
275 this.vala_projectsettings.ref();
276 this.vala_projectsettings.window = this.win;
278 ((Gtk.Container)(this.win.projecteditview.el.get_widget())).add(this.projectsettings.el);
279 //this.projectsettings.el.show_all();
281 var stage = this.win.projecteditview.el.get_stage();
282 stage.set_background_color( Clutter.Color.from_string("#000"));
284 this.projectsettings.buttonPressed.connect((btn) => {
285 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
287 this.window_rooview.view.renderJS(true);
289 if (btn == "apply") {
290 this.window_rooview.view.renderJS(true);
294 // do nothing for gtk..
296 if (btn == "save" || btn == "apply") {
297 this.win.project.save();
300 this.switchState (State.PREVIEW);
305 // ----------- object adding
306 public void objectAddInit()
309 this.rightpalete = new Xcls_RightPalete();
310 this.rightpalete.ref(); /// really?
311 ((Gtk.Container)(this.win.objectview.el.get_widget())).add(this.rightpalete.el);
312 //this.projectsettings.el.show_all();
314 var stage = this.win.objectview.el.get_stage();
315 stage.set_background_color( Clutter.Color.from_string("#000"));
319 // ----------- properties adding list...
320 // listener uses the properties
321 public void propsAddInit()
324 this.add_props = new Xcls_WindowAddProp();
325 this.add_props.ref(); /// really?
326 ((Gtk.Container)(this.win.addpropsview.el.get_widget())).add(this.add_props.el);
327 //this.projectsettings.el.show_all();
329 var stage = this.win.addpropsview.el.get_stage();
330 stage.set_background_color( Clutter.Color.from_string("#000"));
333 this.add_props.select.connect( (key,type,skel, etype) => {
334 this.left_props.addProp(etype, key, skel, type);
338 public void propsAddShow()
342 public void propsAddHide()
350 // ----------- Add / Edit listener
351 // listener uses the properties
352 //public void listenerInit() { }
353 public void listenerShow()
357 public void listenerHide()
362 // -------------- codeEditor
364 public void codeEditInit()
366 this.code_editor = new Editor();
367 //this.code_editor.ref(); /// really?
368 ((Gtk.Container)(this.win.codeeditview.el.get_widget())).add(this.code_editor.el);
370 this.code_editor.window = this.win;
371 //this.projectsettings.el.show_all();
373 var stage = this.win.codeeditview.el.get_stage();
374 stage.set_background_color( Clutter.Color.from_string("#000"));
377 this.code_editor.save.connect( () => {
379 this.left_tree.model.updateSelected();
380 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
381 this.window_rooview.requestRedraw();
383 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
385 // we do not need to call spawn... - as it's already called by the editor?
391 // ----------- list of projects on left
392 public void projectListInit()
395 this.left_projects = new Xcls_WindowLeftProjects();
396 this.left_projects.ref();
397 this.win.leftpane.el.pack_start(this.left_projects.el,true, true,0);
398 this.left_projects.el.show_all();
399 this.left_projects.project_selected.connect((proj) => {
400 this.buttonsShowHide();
402 this.clutterfiles.loadProject(proj);
407 // ----------- file view
409 public void fileViewInit()
411 var stage = this.win.rooview.el.get_stage(); // seems odd...
412 this.clutterfiles = new Xcls_ClutterFiles();
413 this.clutterfiles.ref();
414 stage.add_child(this.clutterfiles.el);
415 this.clutterfiles.el.show();
418 this.clutterfiles.open.connect((file) => {
419 this.fileViewOpen(file);
421 this.clutterfiles.el.transitions_completed.connect(() => {
422 if (this.state == State.FILES) {
423 this.win.rooview.el.hide();
425 this.clutterfiles.el.hide();
433 public void fileDetailsInit()
435 this.file_details = new Xcls_PopoverFileDetails();
436 this.file_details.mainwindow = this.win;
437 // force it modal to the main window..
439 this.file_details.success.connect((project,file) =>
441 this.fileViewOpen(file);
446 public void fileViewOpen(JsRender.JsRender file, int line = -1)
448 this.win.project = file.project;
449 this.project = file.project;
453 if (file.xtype == "PlainFile") {
454 this.switchState (State.CODEONLY);
456 this.code_editor.show(file, null, "", "");
458 this.code_editor.scroll_to_line(line);
462 this.switchState (State.PREVIEW);
463 // this triggers loadItems..
464 this.left_tree.model.loadFile(file);
465 if (file.project.xtype == "Gtk" && line> -1 ) {
466 this.window_gladeview.scroll_to_line(line);
472 var ctr= ((Gtk.Container)(this.win.rooview.el.get_widget()));
473 var ctr_p= ((Gtk.Container)(this.win.projecteditview.el.get_widget()));
475 if (file.project.xtype == "Roo" ) {
476 ctr.foreach( (w) => { ctr.remove(w); });
477 ctr_p.foreach( (w) => { ctr_p.remove(w); });
478 ctr.add(this.window_rooview.el);
479 ctr_p.add(this.projectsettings.el);
480 if (file.xtype != "PlainFile") {
481 this.window_rooview.loadFile(file);
482 this.window_rooview.el.show_all();
484 this.projectsettings.el.show_all();
488 ctr.foreach( (w) => { ctr.remove(w); });
489 ctr_p.foreach( (w) => { ctr_p.remove(w); });
490 ctr.add(this.window_gladeview.el);
491 ctr_p.add(this.vala_projectsettings.el);
492 if (file.xtype != "PlainFile") {
493 this.window_gladeview.loadFile(file);
494 this.window_gladeview.el.show_all();
496 this.vala_projectsettings.el.show_all();
498 print("OPEN : " + file.name);
499 if (file.xtype != "PlainFile") {
500 this.win.editpane.el.set_position(this.win.editpane.el.max_position);
502 this.win.setTitle(file.project.name + " : " + file.name);
508 // --------- webkit view
509 public void webkitViewInit()
511 this.window_rooview =new Xcls_WindowRooView();
512 this.window_rooview.main_window = this.win;
513 this.window_rooview.ref();
514 ((Gtk.Container)(this.win.rooview.el.get_widget())).add(this.window_rooview.el);
515 this.window_rooview.el.show_all();
517 var stage = this.win.rooview.el.get_stage();
518 stage.set_background_color( Clutter.Color.from_string("#000"));
523 public void gtkViewInit()
525 this.window_gladeview =new Xcls_GtkView();
526 this.window_gladeview.ref();
527 this.window_gladeview.main_window = this.win;
530 public void easingSaveAll()
532 this.win.addpropsview.el.save_easing_state();
533 this.win.codeeditview.el.save_easing_state();
534 this.win.objectview.el.save_easing_state();
535 this.win.projecteditview.el.save_easing_state();
536 this.win.rooview.el.save_easing_state();
537 this.clutterfiles.el.save_easing_state();
540 public void easingRestoreAll()
542 this.win.addpropsview.el.restore_easing_state();
543 this.win.codeeditview.el.restore_easing_state();
544 this.win.objectview.el.restore_easing_state();
545 this.win.projecteditview.el.restore_easing_state();
546 this.win.rooview.el.restore_easing_state();
547 this.clutterfiles.el.restore_easing_state();
550 public void switchState(State new_state)
553 // if the new state and the old state are the same..
555 if (new_state == this.state) {
559 // save the easing state of everything..
560 this.easingSaveAll();
562 switch (this.state) {
565 if (this.left_tree.getActiveFile() != null) {
566 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
567 this.window_rooview.createThumb();
569 this.window_gladeview.createThumb();
572 // normally we are going from preview to another state.
573 // and different windows hide the preview in differnt ways..
581 this.win.addpropsview.el.set_scale(0.0f,0.0f);
585 this.code_editor.saveContents();
587 this.win.codeeditview.el.set_scale(0.0f,0.0f);
591 // going from codeonly..
592 this.win.leftpane.el.show();
593 // enable re-calc of canvas..
594 while (Gtk.events_pending()) {
595 Gtk.main_iteration();
597 //this.code_editor.saveContents(); << not yet...
599 this.win.rooview.el.show();
600 this.win.codeeditview.el.set_scale(0.0f,0.0f);
606 this.win.objectview.el.set_scale(0.0f,0.0f);
609 case State.FILEPROJECT:
611 if (this.win.project.xtype == "Gtk") {
612 this.vala_projectsettings.save();
615 this.win.projecteditview.el.set_scale(0.0f,0.0f);
618 case State.FILES: // goes to preview or codeonly...
621 if (new_state == State.CODEONLY) {
622 this.win.rooview.el.hide();
624 this.win.rooview.el.show();
627 this.win.rooview.el.set_easing_duration(1000);
628 this.win.rooview.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
629 this.win.rooview.el.set_scale(1.0f,1.0f);
630 this.win.rooview.el.set_pivot_point(0.5f,0.5f);
631 this.win.rooview.el.set_opacity(0xff);
635 this.clutterfiles.el.set_easing_duration(1000);
636 this.clutterfiles.el.set_pivot_point(0.5f,0.5f);
637 this.clutterfiles.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, -180.0f);
638 this.clutterfiles.el.set_opacity(0);
640 //this.clutterfiles.el.hide();
648 var oldstate =this.state;
649 this.state = new_state;
653 this.buttonsShowHide();
656 switch (this.state) {
658 case State.PREVIEW: // this is the default state when working...
659 this.win.editpane.el.show(); // holder for tree and properties..
662 this.left_projects.el.hide();
663 if (oldstate != State.FILES) {
664 // it's handled above..
665 print ("changing state to preview from NOT files..");
668 this.win.rooview.el.set_scale(1.0f,1.0f);
677 var ae = this.left_tree.getActiveElement();
679 this.state = oldstate;
680 this.buttonsShowHide();
681 this.resizeCanvasElements();
682 this.easingRestoreAll();
685 this.add_props.el.show_all();
687 Palete.factory(this.win.project.xtype),
688 this.state == State.LISTENER ? "signals" : "props",
695 // -- FIXME? this needs to be State aware?
697 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
699 this.win.addpropsview.el.set_scale(1.0f,1.0f);
703 var n = this.left_tree.getActiveElement();
705 if (this.file == null) {
706 this.state =oldstate;
707 this.buttonsShowHide();
708 this.resizeCanvasElements();
709 this.easingRestoreAll();
713 if (n == null && this.file.tree != null) {
714 this.state = oldstate;
715 this.buttonsShowHide();
716 this.resizeCanvasElements();
717 this.easingRestoreAll();
721 this.rightpalete.el.show_all();
722 this.rightpalete.load(this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
726 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
727 this.win.objectview.el.set_scale(1.0f,1.0f);
733 this.win.codeeditview.el.show();
734 this.code_editor.el.show_all();
735 // caller needs to call editor - show....
736 this.win.codeeditview.el.set_scale(1.0f,1.0f);
737 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
742 // going to codeonly..
743 this.win.codeeditview.el.show();
745 //while (Gtk.events_pending()) {
746 // Gtk.main_iteration();
749 this.win.leftpane.el.hide();
750 this.win.codeeditview.el.show();
751 //while (Gtk.events_pending()) {
752 // Gtk.main_iteration();
756 this.code_editor.el.show_all();
758 this.win.codeeditview.el.set_scale(1.0f,1.0f);
759 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
766 this.win.rooview.el.set_pivot_point(1.0f,1.0f); // bottom right..
768 if (this.win.project.xtype == "Roo") {
769 this.projectsettings.el.show_all();
770 this.projectsettings.show(this.win.project);
772 this.vala_projectsettings.el.show_all();
773 this.vala_projectsettings.show((Project.Gtk)this.win.project);
776 this.win.projecteditview.el.set_scale(1.0f,1.0f);
780 case State.FILEPROJECT:
781 var pr = this.left_projects.getSelectedProject();
782 if (pr.xtype == "Roo") {
783 this.projectsettings.el.show_all();
784 this.projectsettings.show(this.win.project);
786 this.vala_projectsettings.el.show_all();
787 this.vala_projectsettings.show((Project.Gtk)this.win.project);
790 this.win.projecteditview.el.set_scale(1.0f,1.0f);
794 case State.FILES: // can only get here from PREVIEW (or code-only) state.. in theory..
797 this.win.editpane.el.hide(); // holder for tree and properties..
799 this.left_projects.el.show();
801 // rotate the preview to hidden...
802 this.win.rooview.el.set_easing_duration(1000);
803 this.win.rooview.el.set_pivot_point(0.5f,0.5f);
804 this.win.rooview.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 180.0f);
805 this.win.rooview.el.set_opacity(0);
810 if (this.win.project != null) {
811 this.left_projects.selectProject(this.win.project);
815 this.clutterfiles.el.show();
817 this.clutterfiles.el.set_easing_duration(1000);
818 this.clutterfiles.el.set_pivot_point(0.5f,0.5f);
819 this.clutterfiles.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
820 this.clutterfiles.el.set_opacity(0xff);
828 this.resizeCanvasElements();
829 this.easingRestoreAll();
831 // run the animation.. - then load files...
832 GLib.Timeout.add(500, () =>{
833 this.resizeCanvasElements();
839 public int redraw_count = 0;
840 public void resizeCanvas() // called by window resize .. delays redraw
842 var rc = this.redraw_count;
843 this.redraw_count = 2;
845 GLib.Timeout.add(100, () =>{
846 return this.resizeCanvasQueue();
850 public bool resizeCanvasQueue()
852 //print("WindowState.resizeCanvasQueue %d\n", this.redraw_count);
854 if (this.redraw_count < 1) {
855 return false; // should not really happen...
861 if (this.redraw_count > 0) {
862 return true; // do it again in 1 second...
864 // got down to 0 or -1....
865 this.redraw_count = 0;
866 this.resizeCanvasElements();
870 public void resizeCanvasElements()
872 Gtk.Allocation alloc;
873 this.win.clutterembed.el.get_allocation(out alloc);
875 // print("WindowState.resizeCanvasElements\n");
876 if (!this.children_loaded || this.win.clutterembed == null) {
877 print("WindowState.resizeCanvasElements = ingnore not loaded or no clutterfiles\n");
881 var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
882 var palsize = avail < 300.0f ? avail : 300.0f;
885 // -------- code edit min 600
887 var codesize = avail < 800.0f ? avail : 800.0f;
890 //print("set code size %f\n", codesize);
894 switch ( this.state) {
897 this.win.rooview.el.set_size(alloc.width-50, alloc.height);
901 this.clutterfiles.set_size(alloc.width-50, alloc.height);
906 this.win.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
908 // this.win.rooview.el.save_easing_state();
909 //this.win.rooview.el.set_size(alloc.width / 2.0f, alloc.height / 2.0f);
911 this.win.rooview.el.set_scale(0.5f, 0.5f);
912 //this.win.rooview.el.restore_easing_state();
916 this.win.codeeditview.el.set_size(codesize, alloc.height);
917 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
918 //this.win.rooview.el.save_easing_state();
920 this.win.rooview.el.set_scale(scale,scale);
921 // this.win.rooview.el.restore_easing_state();
925 this.win.codeeditview.el.set_size(codesize, alloc.height);
926 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
927 //this.win.rooview.el.save_easing_state();
928 this.win.rooview.el.hide();
929 this.win.rooview.el.set_scale(scale,scale);
930 // this.win.rooview.el.restore_easing_state();
934 this.win.addpropsview.el.set_size(palsize, alloc.height);
935 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
936 this.win.rooview.el.set_scale(scale,scale);
940 this.win.objectview.el.set_size(palsize, alloc.height);
941 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
942 //this.win.rooview.el.save_easing_state();
943 this.win.rooview.el.set_scale(scale,scale);
944 // this.win.rooview.el.restore_easing_state();
949 // -- buttons show hide.....
951 public void buttonsShowHide()
953 // basically hide everything, then show the relivant..
956 this.win.openbtn.el.hide();
957 this.win.openbackbtn.el.hide();
959 this.win.backbutton.el.hide();
962 this.win.editfilebutton.el.hide();
963 this.win.projecteditbutton.el.hide();
966 this.win.objectshowbutton.el.hide(); // add objects
967 this.win.addpropbutton.el.hide();
968 this.win.addlistenerbutton.el.hide();
972 this.win.addprojectbutton.el.hide();
973 this.win.addfilebutton.el.hide();
974 this.win.delprojectbutton.el.hide();
976 this.win.search_entry.el.hide();
977 this.win.search_results.el.hide();
978 switch (this.state) {
980 case State.PREVIEW: // this is the default state when working...
983 this.win.editfilebutton.el.show();
984 this.win.projecteditbutton.el.show();
988 this.win.objectshowbutton.el.show(); // add objects
989 this.win.addpropbutton.el.show();
990 this.win.addlistenerbutton.el.show();
991 this.win.search_entry.el.show();
993 this.win.openbtn.el.show();
998 this.win.openbtn.el.show();
999 this.win.projecteditbutton.el.show();
1000 this.win.search_entry.el.show();
1004 this.win.search_entry.el.show();
1005 this.win.backbutton.el.show();
1006 this.win.objectshowbutton.el.show(); // add objects ?? can you do this from here?
1007 this.win.addpropbutton.el.show();
1008 this.win.addlistenerbutton.el.show();
1012 case State.LISTENER:
1015 this.win.backbutton.el.show();
1016 this.win.objectshowbutton.el.show(); // add objects
1017 this.win.addpropbutton.el.show();
1018 this.win.addlistenerbutton.el.show();
1023 this.win.backbutton.el.show();
1029 if (this.left_projects.getSelectedProject() != null ) {
1030 if (this.left_tree.getActiveFile() != null) {
1032 this.win.openbackbtn.el.show();
1034 this.win.addfilebutton.el.show();
1035 this.win.search_entry.el.show();
1036 this.win.projecteditbutton.el.show();
1040 this.win.addprojectbutton.el.show();
1041 this.win.delprojectbutton.el.show();
1054 public void valaCompiled(Json.Object obj)
1056 // vala has finished compiling...
1057 print("vala compiled");
1059 var buf = this.code_editor.buffer;
1060 buf.check_running = false;
1061 var has_errors = false;
1063 if (obj.has_member("ERR-TOTAL")) {
1064 if (obj.get_int_member("ERR-TOTAL")> 0) {
1067 this.win.statusbar_errors.setNotices( obj.get_object_member("ERR") , (int) obj.get_int_member("ERR-TOTAL"));
1069 this.win.statusbar_errors.setNotices( new Json.Object() , 0);
1072 if (obj.has_member("WARN-TOTAL")) {
1074 this.win.statusbar_warnings.setNotices(obj.get_object_member("WARN"), (int) obj.get_int_member("WARN-TOTAL"));
1076 this.win.statusbar_warnings.setNotices( new Json.Object() , 0);
1079 if (obj.has_member("DEPR-TOTAL")) {
1081 this.win.statusbar_depricated.setNotices( obj.get_object_member("DEPR"), (int) obj.get_int_member("DEPR-TOTAL"));
1084 this.win.statusbar_depricated.setNotices( new Json.Object(),0);
1087 buf.highlightErrorsJson("ERR", obj);
1088 buf.highlightErrorsJson("WARN", obj);
1089 buf.highlightErrorsJson("DEPR", obj);
1091 this.win.statusbar_compilestatus_label.el.hide();
1092 this.win.statusbar_run.el.hide();
1094 if (this.file.xtype == "Gtk") {
1095 this.win.statusbar_compilestatus_label.el.show();
1097 this.win.statusbar_run.el.show();
1099 var gbuf = this.window_gladeview.sourceview;
1100 gbuf.highlightErrorsJson("ERR", obj);
1101 gbuf.highlightErrorsJson("WARN", obj);
1102 gbuf.highlightErrorsJson("DEPR", obj);
1105 this.last_compile_result = obj;