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
23 PROJECTCODEONLY // when editing code...
26 public State state = State.NONE;
28 public bool children_loaded = false;
31 public Project.Project project;
32 public JsRender.JsRender file;
36 public Xcls_WindowLeftTree left_tree;
37 public Xcls_WindowAddProp add_props;
38 public Xcls_LeftProps left_props;
39 public Xcls_ProjectSettings projectsettings;
40 public ValaProjectSettings vala_projectsettings;
41 public Xcls_RightPalete rightpalete;
42 public Editor code_editor;
43 public Xcls_WindowRooView window_rooview;
44 public Xcls_GtkView window_gladeview;
46 public Xcls_ClutterFiles clutterfiles;
48 public Xcls_WindowLeftProjects left_projects; // can not see where this is initialized..
50 public DialogTemplateSelect template_select;
52 public Xcls_PopoverFileDetails file_details;
55 public Xcls_ValaCompileResults compile_results;
58 public Xcls_DialogPluginWebkit webkit_plugin;
61 public Palete.ValaSource valasource; // the spawner that runs the vala compiler.
62 public Json.Object last_compile_result;
65 public WindowState(Xcls_MainWindow win)
74 // on clutter space...
75 this.projectEditInit();
77 this.projectListInit();
87 this.webkitViewInit();
91 this.fileDetailsInit();
93 this.webkit_plugin = new Xcls_DialogPluginWebkit();
94 this.template_select = new DialogTemplateSelect();
95 this.children_loaded = true;
97 this.left_tree.node_selected.connect((sel) => {
98 if (this.file.xtype == "Roo") {
99 this.window_rooview.sourceview.nodeSelected(sel);
101 this.window_gladeview.sourceview.nodeSelected(sel);
104 this.valasource = new Palete.ValaSource();
105 this.valasource.compiled.connect(this.valaCompiled);
107 this.compile_results = new Xcls_ValaCompileResults();
108 this.compile_results.window = this.win;
109 this.valasource.compile_output.connect(this.compile_results.addLine);
111 this.win.statusbar_compilestatus_label.el.hide();
112 this.win.statusbar_run.el.hide();
113 this.win.search_results.el.hide();
119 public void leftTreeInit()
122 this.left_tree = new Xcls_WindowLeftTree();
123 this.left_tree.ref();
124 this.left_tree.main_window = this.win;
126 this.win.tree.el.pack_start(this.left_tree.el,true, true,0);
127 this.left_tree.el.show_all();
129 this.left_tree.before_node_change.connect(() => {
130 return this.leftTreeBeforeChange();
134 this.left_tree.node_selected.connect((sel) => {
135 this.leftTreeNodeSelected(sel);
138 this.left_tree.changed.connect(() => {
141 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
142 this.window_rooview.requestRedraw();
144 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
151 public bool leftTreeBeforeChange()
153 if (this.state != State.CODE) {
154 this.left_props.finish_editing();
157 if (!this.code_editor.saveContents()) {
163 public void leftTreeNodeSelected(JsRender.Node? sel)
166 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
169 this.left_props.el.hide();
171 this.left_props.el.show();
172 this.left_props.load(this.left_tree.getActiveFile(), sel);
173 switch (this.state) {
178 this.rightpalete.clear();
181 this.rightpalete.load(this.left_tree.getActiveFile().palete(), sel.fqn());
187 this.add_props.clear();
190 this.add_props.show(this.left_tree.getActiveFile().palete(), "props", sel.fqn());
196 this.add_props.clear();
199 this.add_props.show(this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
203 this.switchState(State.PREVIEW);
216 public void propsListInit()
219 this.left_props =new Xcls_LeftProps();
220 this.left_props.ref();
221 this.left_props.main_window = this.win;
222 this.win.props.el.pack_start(this.left_props.el,true, true,0);
223 this.left_props.el.show_all();
225 this.left_props.show_editor.connect( (file, node, type, key) => {
226 this.switchState(State.CODE);
227 this.code_editor.show(
238 this.left_props.stop_editor.connect( () => {
239 if (this.state != State.CODE) {
243 var ret = this.code_editor.saveContents();
247 this.switchState(State.PREVIEW);
251 this.left_props.changed.connect(() => {
252 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
253 this.window_rooview.requestRedraw();
255 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
257 this.left_tree.model.updateSelected();
259 if (this.file.xtype=="Gtk") {
260 this.valasource.checkFileSpawn(this.file);
268 //------------- projects edit
270 public void projectEditInit()
272 this.projectsettings =new Xcls_ProjectSettings();
273 this.projectsettings.ref(); /// really?
275 this.vala_projectsettings =new ValaProjectSettings();
276 this.vala_projectsettings.ref();
277 this.vala_projectsettings.window = this.win;
279 ((Gtk.Container)(this.win.projecteditview.el.get_widget())).add(this.projectsettings.el);
280 //this.projectsettings.el.show_all();
282 var stage = this.win.projecteditview.el.get_stage();
283 stage.set_background_color( Clutter.Color.from_string("#000"));
285 this.projectsettings.buttonPressed.connect((btn) => {
286 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
288 this.window_rooview.view.renderJS(true);
290 if (btn == "apply") {
291 this.window_rooview.view.renderJS(true);
295 // do nothing for gtk..
297 if (btn == "save" || btn == "apply") {
298 this.win.project.save();
301 this.switchState (State.PREVIEW);
306 // ----------- object adding
307 public void objectAddInit()
310 this.rightpalete = new Xcls_RightPalete();
311 this.rightpalete.ref(); /// really?
312 ((Gtk.Container)(this.win.objectview.el.get_widget())).add(this.rightpalete.el);
313 //this.projectsettings.el.show_all();
315 var stage = this.win.objectview.el.get_stage();
316 stage.set_background_color( Clutter.Color.from_string("#000"));
320 // ----------- properties adding list...
321 // listener uses the properties
322 public void propsAddInit()
325 this.add_props = new Xcls_WindowAddProp();
326 this.add_props.ref(); /// really?
327 ((Gtk.Container)(this.win.addpropsview.el.get_widget())).add(this.add_props.el);
328 //this.projectsettings.el.show_all();
330 var stage = this.win.addpropsview.el.get_stage();
331 stage.set_background_color( Clutter.Color.from_string("#000"));
334 this.add_props.select.connect( (key,type,skel, etype) => {
335 this.left_props.addProp(etype, key, skel, type);
339 public void propsAddShow()
343 public void propsAddHide()
351 // ----------- Add / Edit listener
352 // listener uses the properties
353 //public void listenerInit() { }
354 public void listenerShow()
358 public void listenerHide()
363 // -------------- codeEditor
365 public void codeEditInit()
367 this.code_editor = new Editor();
368 //this.code_editor.ref(); /// really?
369 ((Gtk.Container)(this.win.codeeditview.el.get_widget())).add(this.code_editor.el);
371 this.code_editor.window = this.win;
372 //this.projectsettings.el.show_all();
374 var stage = this.win.codeeditview.el.get_stage();
375 stage.set_background_color( Clutter.Color.from_string("#000"));
378 this.code_editor.save.connect( () => {
380 this.left_tree.model.updateSelected();
381 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
382 this.window_rooview.requestRedraw();
384 this.window_gladeview.loadFile(this.left_tree.getActiveFile());
386 // we do not need to call spawn... - as it's already called by the editor?
392 // ----------- list of projects on left
393 public void projectListInit()
396 this.left_projects = new Xcls_WindowLeftProjects();
397 this.left_projects.ref();
398 this.win.leftpane.el.pack_start(this.left_projects.el,true, true,0);
399 this.left_projects.el.show_all();
400 this.left_projects.project_selected.connect((proj) => {
401 this.buttonsShowHide();
403 this.clutterfiles.loadProject(proj);
408 // ----------- file view
410 public void fileViewInit()
412 var stage = this.win.rooview.el.get_stage(); // seems odd...
413 this.clutterfiles = new Xcls_ClutterFiles();
414 this.clutterfiles.ref();
415 stage.add_child(this.clutterfiles.el);
416 this.clutterfiles.el.show();
419 this.clutterfiles.open.connect((file) => {
420 this.fileViewOpen(file);
422 this.clutterfiles.el.transitions_completed.connect(() => {
423 if (this.state == State.FILES) {
424 this.win.rooview.el.hide();
426 this.clutterfiles.el.hide();
434 public void fileDetailsInit()
436 this.file_details = new Xcls_PopoverFileDetails();
437 this.file_details.mainwindow = this.win;
438 // force it modal to the main window..
440 this.file_details.success.connect((project,file) =>
442 this.fileViewOpen(file);
447 public void fileViewOpen(JsRender.JsRender file, int line = -1)
449 this.win.project = file.project;
450 this.project = file.project;
454 if (file.xtype == "PlainFile") {
455 this.switchState (State.CODEONLY);
457 this.code_editor.show(file, null, "", "");
459 this.code_editor.scroll_to_line(line);
463 this.switchState (State.PREVIEW);
464 // this triggers loadItems..
465 this.left_tree.model.loadFile(file);
466 if (file.project.xtype == "Gtk" && line> -1 ) {
467 this.window_gladeview.scroll_to_line(line);
473 var ctr= ((Gtk.Container)(this.win.rooview.el.get_widget()));
474 var ctr_p= ((Gtk.Container)(this.win.projecteditview.el.get_widget()));
476 if (file.project.xtype == "Roo" ) {
477 ctr.foreach( (w) => { ctr.remove(w); });
478 ctr_p.foreach( (w) => { ctr_p.remove(w); });
479 ctr.add(this.window_rooview.el);
480 ctr_p.add(this.projectsettings.el);
481 if (file.xtype != "PlainFile") {
482 this.window_rooview.loadFile(file);
483 this.window_rooview.el.show_all();
485 this.projectsettings.el.show_all();
489 ctr.foreach( (w) => { ctr.remove(w); });
490 ctr_p.foreach( (w) => { ctr_p.remove(w); });
491 ctr.add(this.window_gladeview.el);
492 ctr_p.add(this.vala_projectsettings.el);
493 if (file.xtype != "PlainFile") {
494 this.window_gladeview.loadFile(file);
495 this.window_gladeview.el.show_all();
497 this.vala_projectsettings.el.show_all();
499 print("OPEN : " + file.name);
500 if (file.xtype != "PlainFile") {
501 this.win.editpane.el.set_position(this.win.editpane.el.max_position);
503 this.win.setTitle(file.project.name + " : " + file.name);
509 // --------- webkit view
510 public void webkitViewInit()
512 this.window_rooview =new Xcls_WindowRooView();
513 this.window_rooview.main_window = this.win;
514 this.window_rooview.ref();
515 ((Gtk.Container)(this.win.rooview.el.get_widget())).add(this.window_rooview.el);
516 this.window_rooview.el.show_all();
518 var stage = this.win.rooview.el.get_stage();
519 stage.set_background_color( Clutter.Color.from_string("#000"));
524 public void gtkViewInit()
526 this.window_gladeview =new Xcls_GtkView();
527 this.window_gladeview.ref();
528 this.window_gladeview.main_window = this.win;
531 public void easingSaveAll()
533 this.win.addpropsview.el.save_easing_state();
534 this.win.codeeditview.el.save_easing_state();
535 this.win.objectview.el.save_easing_state();
536 this.win.projecteditview.el.save_easing_state();
537 this.win.rooview.el.save_easing_state();
538 this.clutterfiles.el.save_easing_state();
541 public void easingRestoreAll()
543 this.win.addpropsview.el.restore_easing_state();
544 this.win.codeeditview.el.restore_easing_state();
545 this.win.objectview.el.restore_easing_state();
546 this.win.projecteditview.el.restore_easing_state();
547 this.win.rooview.el.restore_easing_state();
548 this.clutterfiles.el.restore_easing_state();
551 public void switchState(State new_state)
554 // if the new state and the old state are the same..
556 if (new_state == this.state) {
560 // save the easing state of everything..
561 this.easingSaveAll();
563 switch (this.state) {
566 if (this.left_tree.getActiveFile() != null) {
567 if (this.left_tree.getActiveFile().xtype == "Roo" ) {
568 this.window_rooview.createThumb();
570 this.window_gladeview.createThumb();
573 // normally we are going from preview to another state.
574 // and different windows hide the preview in differnt ways..
582 this.win.addpropsview.el.set_scale(0.0f,0.0f);
586 this.code_editor.saveContents();
588 this.win.codeeditview.el.set_scale(0.0f,0.0f);
592 // going from codeonly..
593 this.win.leftpane.el.show();
594 // enable re-calc of canvas..
595 while (Gtk.events_pending()) {
596 Gtk.main_iteration();
598 //this.code_editor.saveContents(); << not yet...
600 this.win.rooview.el.show();
601 this.win.codeeditview.el.set_scale(0.0f,0.0f); // hides it completely...
607 this.win.objectview.el.set_scale(0.0f,0.0f);
610 case State.FILEPROJECT:
612 if (this.win.project.xtype == "Gtk") {
613 this.vala_projectsettings.save();
616 this.win.projecteditview.el.set_scale(0.0f,0.0f);
619 case State.FILES: // goes to preview or codeonly...
622 if (new_state == State.CODEONLY) {
623 this.win.rooview.el.hide();
625 this.win.rooview.el.show();
628 this.win.rooview.el.set_easing_duration(1000);
629 this.win.rooview.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
630 this.win.rooview.el.set_scale(1.0f,1.0f);
631 this.win.rooview.el.set_pivot_point(0.5f,0.5f);
632 this.win.rooview.el.set_opacity(0xff);
636 this.clutterfiles.el.set_easing_duration(1000);
637 this.clutterfiles.el.set_pivot_point(0.5f,0.5f);
638 this.clutterfiles.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, -180.0f);
639 this.clutterfiles.el.set_opacity(0);
641 //this.clutterfiles.el.hide();
649 var oldstate =this.state;
650 this.state = new_state;
654 this.buttonsShowHide();
657 switch (this.state) {
659 case State.PREVIEW: // this is the default state when working...
660 this.win.editpane.el.show(); // holder for tree and properties..
663 this.left_projects.el.hide();
664 if (oldstate != State.FILES) {
665 // it's handled above..
666 print ("changing state to preview from NOT files..");
669 this.win.rooview.el.set_scale(1.0f,1.0f);
678 var ae = this.left_tree.getActiveElement();
680 this.state = oldstate;
681 this.buttonsShowHide();
682 this.resizeCanvasElements();
683 this.easingRestoreAll();
686 this.add_props.el.show_all();
688 Palete.factory(this.win.project.xtype),
689 this.state == State.LISTENER ? "signals" : "props",
696 // -- FIXME? this needs to be State aware?
698 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
700 this.win.addpropsview.el.set_scale(1.0f,1.0f);
704 var n = this.left_tree.getActiveElement();
706 if (this.file == null) {
707 this.state =oldstate;
708 this.buttonsShowHide();
709 this.resizeCanvasElements();
710 this.easingRestoreAll();
714 if (n == null && this.file.tree != null) {
715 this.state = oldstate;
716 this.buttonsShowHide();
717 this.resizeCanvasElements();
718 this.easingRestoreAll();
722 this.rightpalete.el.show_all();
723 this.rightpalete.load(this.left_tree.getActiveFile().palete(), n == null ? "*top" : n.fqn());
727 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
728 this.win.objectview.el.set_scale(1.0f,1.0f);
734 this.win.codeeditview.el.show();
735 this.code_editor.el.show_all();
736 // caller needs to call editor - show....
737 this.win.codeeditview.el.set_scale(1.0f,1.0f);
738 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
743 // going to codeonly..
744 this.win.codeeditview.el.show();
746 //while (Gtk.events_pending()) {
747 // Gtk.main_iteration();
750 this.win.leftpane.el.hide();
751 this.win.codeeditview.el.show();
752 //while (Gtk.events_pending()) {
753 // Gtk.main_iteration();
757 this.code_editor.el.show_all();
759 this.win.codeeditview.el.set_scale(1.0f,1.0f);
760 this.win.rooview.el.set_pivot_point(1.0f,0.5f);
767 this.win.rooview.el.set_pivot_point(1.0f,1.0f); // bottom right..
769 if (this.win.project.xtype == "Roo") {
770 this.projectsettings.el.show_all();
771 this.projectsettings.show(this.win.project);
773 this.vala_projectsettings.el.show_all();
774 this.vala_projectsettings.show((Project.Gtk)this.win.project);
777 this.win.projecteditview.el.set_scale(1.0f,1.0f);
781 case State.FILEPROJECT:
782 var pr = this.left_projects.getSelectedProject();
783 if (pr.xtype == "Roo") {
784 this.projectsettings.el.show_all();
785 this.projectsettings.show(this.win.project);
787 this.vala_projectsettings.el.show_all();
788 this.vala_projectsettings.show((Project.Gtk)this.win.project);
791 this.win.projecteditview.el.set_scale(1.0f,1.0f);
795 case State.FILES: // can only get here from PREVIEW (or code-only) state.. in theory..
798 this.win.editpane.el.hide(); // holder for tree and properties..
800 this.left_projects.el.show();
802 // rotate the preview to hidden...
803 this.win.rooview.el.set_easing_duration(1000);
804 this.win.rooview.el.set_pivot_point(0.5f,0.5f);
805 this.win.rooview.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 180.0f);
806 this.win.rooview.el.set_opacity(0);
811 if (this.win.project != null) {
812 this.left_projects.selectProject(this.win.project);
816 this.clutterfiles.el.show();
818 this.clutterfiles.el.set_easing_duration(1000);
819 this.clutterfiles.el.set_pivot_point(0.5f,0.5f);
820 this.clutterfiles.el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 0.0f);
821 this.clutterfiles.el.set_opacity(0xff);
829 this.resizeCanvasElements();
830 this.easingRestoreAll();
832 // run the animation.. - then load files...
833 GLib.Timeout.add(500, () =>{
834 this.resizeCanvasElements();
840 public int redraw_count = 0;
841 public void resizeCanvas() // called by window resize .. delays redraw
843 var rc = this.redraw_count;
844 this.redraw_count = 2;
846 GLib.Timeout.add(100, () =>{
847 return this.resizeCanvasQueue();
851 public bool resizeCanvasQueue()
853 //print("WindowState.resizeCanvasQueue %d\n", this.redraw_count);
855 if (this.redraw_count < 1) {
856 return false; // should not really happen...
862 if (this.redraw_count > 0) {
863 return true; // do it again in 1 second...
865 // got down to 0 or -1....
866 this.redraw_count = 0;
867 this.resizeCanvasElements();
871 public void resizeCanvasElements()
873 Gtk.Allocation alloc;
874 this.win.clutterembed.el.get_allocation(out alloc);
876 // print("WindowState.resizeCanvasElements\n");
877 if (!this.children_loaded || this.win.clutterembed == null) {
878 print("WindowState.resizeCanvasElements = ingnore not loaded or no clutterfiles\n");
882 var avail = alloc.width < 50.0f ? 0 : alloc.width - 50.0f;
883 var palsize = avail < 300.0f ? avail : 300.0f;
886 // -------- code edit min 600
888 var codesize = avail < 800.0f ? avail : 800.0f;
891 //print("set code size %f\n", codesize);
895 switch ( this.state) {
898 this.win.rooview.el.set_size(alloc.width-50, alloc.height);
902 this.clutterfiles.set_size(alloc.width-50, alloc.height);
907 this.win.projecteditview.el.set_size(alloc.width-50, alloc.height / 2.0f);
909 // this.win.rooview.el.save_easing_state();
910 //this.win.rooview.el.set_size(alloc.width / 2.0f, alloc.height / 2.0f);
912 this.win.rooview.el.set_scale(0.5f, 0.5f);
913 //this.win.rooview.el.restore_easing_state();
917 this.win.codeeditview.el.set_size(codesize, alloc.height);
918 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
919 //this.win.rooview.el.save_easing_state();
921 this.win.rooview.el.set_scale(scale,scale);
922 // this.win.rooview.el.restore_easing_state();
926 this.win.codeeditview.el.set_size(codesize, alloc.height);
927 var scale = avail > 0.0f ? (avail - codesize -10 ) / avail : 0.0f;
928 //this.win.rooview.el.save_easing_state();
929 this.win.rooview.el.hide();
930 this.win.rooview.el.set_scale(scale,scale);
931 // this.win.rooview.el.restore_easing_state();
935 this.win.addpropsview.el.set_size(palsize, alloc.height);
936 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
937 this.win.rooview.el.set_scale(scale,scale);
941 this.win.objectview.el.set_size(palsize, alloc.height);
942 var scale = avail > 0.0f ? (avail - palsize -10 ) / avail : 0.0f;
943 //this.win.rooview.el.save_easing_state();
944 this.win.rooview.el.set_scale(scale,scale);
945 // this.win.rooview.el.restore_easing_state();
950 // -- buttons show hide.....
952 public void buttonsShowHide()
954 // basically hide everything, then show the relivant..
957 this.win.openbtn.el.hide();
958 this.win.openbackbtn.el.hide();
960 this.win.backbutton.el.hide();
963 this.win.editfilebutton.el.hide();
964 this.win.projecteditbutton.el.hide();
967 this.win.objectshowbutton.el.hide(); // add objects
968 this.win.addpropbutton.el.hide();
969 this.win.addlistenerbutton.el.hide();
973 this.win.addprojectbutton.el.hide();
974 this.win.addfilebutton.el.hide();
975 this.win.delprojectbutton.el.hide();
977 this.win.search_entry.el.hide();
978 this.win.search_results.el.hide();
979 switch (this.state) {
981 case State.PREVIEW: // this is the default state when working...
984 this.win.editfilebutton.el.show();
985 this.win.projecteditbutton.el.show();
989 this.win.objectshowbutton.el.show(); // add objects
990 this.win.addpropbutton.el.show();
991 this.win.addlistenerbutton.el.show();
992 this.win.search_entry.el.show();
994 this.win.openbtn.el.show();
999 this.win.openbtn.el.show();
1000 this.win.projecteditbutton.el.show();
1001 this.win.search_entry.el.show();
1005 this.win.search_entry.el.show();
1006 this.win.backbutton.el.show();
1007 this.win.objectshowbutton.el.show(); // add objects ?? can you do this from here?
1008 this.win.addpropbutton.el.show();
1009 this.win.addlistenerbutton.el.show();
1013 case State.LISTENER:
1016 this.win.backbutton.el.show();
1017 this.win.objectshowbutton.el.show(); // add objects
1018 this.win.addpropbutton.el.show();
1019 this.win.addlistenerbutton.el.show();
1024 this.win.backbutton.el.show();
1030 if (this.left_projects.getSelectedProject() != null ) {
1031 if (this.left_tree.getActiveFile() != null) {
1033 this.win.openbackbtn.el.show();
1035 this.win.addfilebutton.el.show();
1036 this.win.search_entry.el.show();
1037 this.win.projecteditbutton.el.show();
1041 this.win.addprojectbutton.el.show();
1042 this.win.delprojectbutton.el.show();
1055 public void valaCompiled(Json.Object obj)
1057 // vala has finished compiling...
1058 print("vala compiled");
1060 var buf = this.code_editor.buffer;
1061 buf.check_running = false;
1062 var has_errors = false;
1064 if (obj.has_member("ERR-TOTAL")) {
1065 if (obj.get_int_member("ERR-TOTAL")> 0) {
1068 this.win.statusbar_errors.setNotices( obj.get_object_member("ERR") , (int) obj.get_int_member("ERR-TOTAL"));
1070 this.win.statusbar_errors.setNotices( new Json.Object() , 0);
1073 if (obj.has_member("WARN-TOTAL")) {
1075 this.win.statusbar_warnings.setNotices(obj.get_object_member("WARN"), (int) obj.get_int_member("WARN-TOTAL"));
1077 this.win.statusbar_warnings.setNotices( new Json.Object() , 0);
1080 if (obj.has_member("DEPR-TOTAL")) {
1082 this.win.statusbar_depricated.setNotices( obj.get_object_member("DEPR"), (int) obj.get_int_member("DEPR-TOTAL"));
1085 this.win.statusbar_depricated.setNotices( new Json.Object(),0);
1088 buf.highlightErrorsJson("ERR", obj);
1089 buf.highlightErrorsJson("WARN", obj);
1090 buf.highlightErrorsJson("DEPR", obj);
1092 this.win.statusbar_compilestatus_label.el.hide();
1093 this.win.statusbar_run.el.hide();
1095 if (this.file.xtype == "Gtk") {
1096 this.win.statusbar_compilestatus_label.el.show();
1098 this.win.statusbar_run.el.show();
1100 var gbuf = this.window_gladeview.sourceview;
1101 gbuf.highlightErrorsJson("ERR", obj);
1102 gbuf.highlightErrorsJson("WARN", obj);
1103 gbuf.highlightErrorsJson("DEPR", obj);
1106 this.last_compile_result = obj;