1 static Xcls_MainWindow _MainWindow;
3 public class Xcls_MainWindow : Object
5 public Gtk.ApplicationWindow el;
6 private Xcls_MainWindow _this;
8 public static Xcls_MainWindow singleton()
10 if (_MainWindow == null) {
11 _MainWindow= new Xcls_MainWindow();
15 public Xcls_headerbar headerbar;
16 public Xcls_windowbtn windowbtn;
17 public Xcls_windowspopup windowspopup;
18 public Xcls_popover_menu popover_menu;
19 public Xcls_open_projects_btn open_projects_btn;
20 public Xcls_vbox vbox;
21 public Xcls_mainpane mainpane;
22 public Xcls_leftpane leftpane;
23 public Xcls_editpane editpane;
24 public Xcls_tree tree;
25 public Xcls_props props;
26 public Xcls_rooviewbox rooviewbox;
27 public Xcls_codeeditviewbox codeeditviewbox;
28 public Xcls_topbarmenu topbarmenu;
29 public Xcls_statusbar statusbar;
30 public Xcls_statusbar_compilestatus_label statusbar_compilestatus_label;
31 public Xcls_statusbar_errors statusbar_errors;
32 public Xcls_statusbar_warnings statusbar_warnings;
33 public Xcls_statusbar_depricated statusbar_depricated;
34 public Xcls_statusbar_run statusbar_run;
35 public Xcls_statusbar_compile_spinner statusbar_compile_spinner;
38 public WindowState windowstate;
39 public Project.Project project;
42 public Xcls_MainWindow()
45 this.el = new Gtk.ApplicationWindow(BuilderApplication.singleton({}));
51 this.el.title = "Roo Application Builder";
52 this.el.default_height = 850;
53 this.el.default_width = 1200;
54 new Xcls_headerbar( _this );
55 this.el.set_titlebar ( _this.headerbar.el );
56 new Xcls_vbox( _this );
57 this.el.set_child ( _this.vbox.el );
61 this.el.set_icon_name("roobuilder");
64 this.el.close_request.connect( ( ) => {
65 Resources.singleton().disconnect(_this.statusbar.handler_id);
68 this.windowstate.file.getLanguageServer().document_close(
72 BuilderApplication.removeWindow(this);
74 if (BuilderApplication.windows.size < 1) {
75 this.windowstate.file.getLanguageServer().exit();
76 BuilderApplication.singleton( null ).quit();
80 this.el.show.connect( ( ) => {
81 // hide the file editing..
83 //this.hideViewEditing();
84 // this is updated by windowstate - we try and fill it in..
85 _this.statusbar.el.hide();
86 //_this.statusbar_errors.el.hide();
87 //_this.statusbar_warnings.el.hide();
88 //_this.statusbar_depricated.el.hide();
89 _this.statusbar_compile_spinner.el.hide();
91 Resources.singleton().checkResources();
96 this.el.hide.connect( () => {
103 // user defined functions
104 public void updateErrors () {
107 GLib.debug("updateErrors");
109 var pr = this.windowstate.project.getErrors("ERR");
111 this.statusbar_errors.setNotices(
113 this.windowstate.file.getErrors("ERR")
116 this.statusbar_warnings.setNotices(
117 this.windowstate.project.getErrors("WARN"),
118 this.windowstate.file.getErrors("WARN")
120 this.statusbar_depricated.setNotices(
121 this.windowstate.project.getErrors("DEPR"),
122 this.windowstate.file.getErrors("DEPR")
125 _this.statusbar_run.el.hide();
127 if (pr.get_n_items() < 1) {
128 _this.statusbar_run.el.show();
132 public void initChildren () {
133 // this needs putting in a better place..
134 this.windowstate = new WindowState(this);
144 public void show () {
147 if (this.windowstate.file == null) {
148 this.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);
151 public void setTitle () {
152 if (_this.windowstate.project == null ||
153 _this.windowstate.file == null
155 this.el.set_title("Select File");
159 _this.windowstate.project.name +
161 _this.windowstate.file.relpath);
163 public void openNewWindow () {
165 var w = new Xcls_MainWindow();
167 BuilderApplication.addWindow(w);
170 w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);
173 public class Xcls_headerbar : Object
175 public Gtk.HeaderBar el;
176 private Xcls_MainWindow _this;
180 public bool show_close_button;
184 public Xcls_headerbar(Xcls_MainWindow _owner )
187 _this.headerbar = this;
188 this.el = new Gtk.HeaderBar();
191 this.show_close_button = true;
192 this.title = "Application Builder";
194 // set gobject values
195 var child_1 = new Xcls_Box3( _this );
197 this.el.pack_start ( child_1.el );
200 // user defined functions
202 public class Xcls_Box3 : Object
205 private Xcls_MainWindow _this;
211 public Xcls_Box3(Xcls_MainWindow _owner )
214 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
218 // set gobject values
219 new Xcls_windowbtn( _this );
220 this.el.append( _this.windowbtn.el );
221 new Xcls_open_projects_btn( _this );
222 this.el.append ( _this.open_projects_btn.el );
225 // user defined functions
227 public class Xcls_windowbtn : Object
229 public Gtk.Button el;
230 private Xcls_MainWindow _this;
234 public Gee.ArrayList<Gtk.Widget> mitems;
237 public Xcls_windowbtn(Xcls_MainWindow _owner )
240 _this.windowbtn = this;
241 this.el = new Gtk.Button();
245 // set gobject values
246 this.el.margin_end = 4;
247 this.el.halign = Gtk.Align.START;
248 new Xcls_windowspopup( _this );
249 var child_2 = new Xcls_Box10( _this );
250 this.el.child = child_2.el;
255 this.mitems = new Gee.ArrayList<Gtk.Button>();
259 this.el.clicked.connect( ( ) => {
262 _this.windowspopup.el.set_parent(this.el);
264 _this.windowspopup.el.set_position(Gtk.PositionType.BOTTOM);
265 _this.windowspopup.el.popup();
269 // user defined functions
270 public void updateMenu () {
271 foreach(var m in this.mitems) {
272 _this.popover_menu.el.remove(m);
276 BuilderApplication.windows.sort((a,b) => {
277 if (a.windowstate == null ||
278 a.windowstate.file == null ||
279 b.windowstate == null ||
280 b.windowstate.file == null
285 var ap = a.windowstate.file.project.name;
286 var bp = b.windowstate.file.project.name;
291 return ap.collate(bp);
293 var af = a.windowstate.file == null ? "" : a.windowstate.file.getTitle();
294 var bf = b.windowstate.file == null ? "" : b.windowstate.file.getTitle();
295 return af.collate(bf);
300 foreach(var w in BuilderApplication.windows) {
301 var wid = BuilderApplication.windows.index_of(w);
302 // fixme find a better way to display this.
303 if (w.windowstate == null ||
304 w.windowstate.file == null ||
305 _this.windowstate == null ||
306 _this.windowstate.file == null
310 // should not happen...
311 if (w.windowstate.file.path == _this.windowstate.file.path) {
314 if (w.windowstate.file.project.name != p || p != "") {
315 var ms = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);
316 _this.popover_menu.el.append(ms);
321 p = w.windowstate.file.project.name;
324 GLib.debug("add menuitem %s", w.windowstate.file.path);
328 var m = new Gtk.Button.with_label(
329 w.windowstate.file.project.name + " : " + w.windowstate.file.relpath
331 m.halign = Gtk.Align.START;
334 //w.windowstate.file.path);
335 m.clicked.connect(() => {
336 _this.windowspopup.el.hide();
337 BuilderApplication.windows.get(wid).el.present();
339 _this.popover_menu.el.append(m);
345 public class Xcls_windowspopup : Object
347 public Gtk.Popover el;
348 private Xcls_MainWindow _this;
354 public Xcls_windowspopup(Xcls_MainWindow _owner )
357 _this.windowspopup = this;
358 this.el = new Gtk.Popover();
362 // set gobject values
363 new Xcls_popover_menu( _this );
364 this.el.set_child ( _this.popover_menu.el );
367 // user defined functions
369 public class Xcls_popover_menu : Object
372 private Xcls_MainWindow _this;
378 public Xcls_popover_menu(Xcls_MainWindow _owner )
381 _this.popover_menu = this;
382 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
386 // set gobject values
387 var child_1 = new Xcls_Button7( _this );
389 this.el.append ( child_1.el );
390 var child_2 = new Xcls_Separator9( _this );
392 this.el.append ( child_2.el );
395 // user defined functions
397 public class Xcls_Button7 : Object
399 public Gtk.Button el;
400 private Xcls_MainWindow _this;
406 public Xcls_Button7(Xcls_MainWindow _owner )
409 this.el = new Gtk.Button();
413 // set gobject values
414 this.el.label = "New Window";
415 var child_1 = new Xcls_ShortcutController8( _this );
417 this.el.add_controller( child_1.el );
420 this.el.clicked.connect( ( ) => {
421 _this.windowspopup.el.hide();
422 _this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);
426 // user defined functions
428 public class Xcls_ShortcutController8 : Object
430 public Gtk.ShortcutController el;
431 private Xcls_MainWindow _this;
437 public Xcls_ShortcutController8(Xcls_MainWindow _owner )
440 this.el = new Gtk.ShortcutController();
444 // set gobject values
445 this.el.scope = Gtk.ShortcutScope.GLOBAL;
450 this.el.add_shortcut(
452 new Gtk.KeyvalTrigger(Gdk.Key.N,Gdk.ModifierType.CONTROL_MASK),
453 new Gtk.SignalAction("clicked")
459 // user defined functions
463 public class Xcls_Separator9 : Object
465 public Gtk.Separator el;
466 private Xcls_MainWindow _this;
472 public Xcls_Separator9(Xcls_MainWindow _owner )
475 this.el = new Gtk.Separator( Gtk.Orientation.HORIZONTAL );
479 // set gobject values
482 // user defined functions
487 public class Xcls_Box10 : Object
490 private Xcls_MainWindow _this;
496 public Xcls_Box10(Xcls_MainWindow _owner )
499 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
503 // set gobject values
504 var child_1 = new Xcls_Image11( _this );
506 this.el.append( child_1.el );
507 var child_2 = new Xcls_Label12( _this );
509 this.el.append( child_2.el );
512 // user defined functions
514 public class Xcls_Image11 : Object
517 private Xcls_MainWindow _this;
523 public Xcls_Image11(Xcls_MainWindow _owner )
526 this.el = new Gtk.Image();
530 // set gobject values
531 this.el.icon_name = "window-new";
532 this.el.margin_start = 4;
535 // user defined functions
538 public class Xcls_Label12 : Object
541 private Xcls_MainWindow _this;
547 public Xcls_Label12(Xcls_MainWindow _owner )
550 this.el = new Gtk.Label( "Windows (Add/List)" );
554 // set gobject values
557 // user defined functions
562 public class Xcls_open_projects_btn : Object
564 public Gtk.Button el;
565 private Xcls_MainWindow _this;
569 public bool always_show_image;
572 public Xcls_open_projects_btn(Xcls_MainWindow _owner )
575 _this.open_projects_btn = this;
576 this.el = new Gtk.Button();
579 this.always_show_image = true;
581 // set gobject values
582 this.el.icon_name = "system-file-manager";
583 this.el.label = "Files / Projects";
586 this.el.clicked.connect( ( ) => {
587 _this.windowstate.showPopoverFiles(this.el, _this.project, false);
591 // user defined functions
596 public class Xcls_vbox : Object
599 private Xcls_MainWindow _this;
605 public Xcls_vbox(Xcls_MainWindow _owner )
609 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
613 // set gobject values
614 this.el.homogeneous = false;
615 this.el.vexpand = true;
616 new Xcls_mainpane( _this );
617 this.el.append( _this.mainpane.el );
618 var child_2 = new Xcls_Box23( _this );
620 this.el.append( child_2.el );
623 // user defined functions
625 public class Xcls_mainpane : Object
628 private Xcls_MainWindow _this;
632 public int lastWidth;
635 public Xcls_mainpane(Xcls_MainWindow _owner )
638 _this.mainpane = this;
639 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
644 // set gobject values
645 this.el.hexpand = true;
646 this.el.vexpand = true;
647 this.el.position = 400;
648 new Xcls_leftpane( _this );
649 this.el.start_child = _this.leftpane.el;
650 var child_2 = new Xcls_Box20( _this );
651 this.el.end_child = child_2.el;
654 this.el.accept_position.connect( ( ) => {
655 _this.windowstate.left_tree.onresize();
660 // user defined functions
662 public class Xcls_leftpane : Object
665 private Xcls_MainWindow _this;
671 public Xcls_leftpane(Xcls_MainWindow _owner )
674 _this.leftpane = this;
675 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
679 // set gobject values
680 this.el.hexpand = true;
681 this.el.vexpand = true;
682 new Xcls_editpane( _this );
683 this.el.append( _this.editpane.el );
686 // user defined functions
688 public class Xcls_editpane : Object
691 private Xcls_MainWindow _this;
697 public Xcls_editpane(Xcls_MainWindow _owner )
700 _this.editpane = this;
701 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
705 // set gobject values
706 new Xcls_tree( _this );
707 this.el.start_child = _this.tree.el;
708 new Xcls_props( _this );
709 this.el.end_child = _this.props.el;
712 this.el.accept_position.connect( ( ) => {
713 _this.windowstate.left_tree.onresize();
716 this.el.move_handle.connect( (scroll) => {
717 GLib.debug("Move handle");
722 // user defined functions
724 public class Xcls_tree : Object
727 private Xcls_MainWindow _this;
733 public Xcls_tree(Xcls_MainWindow _owner )
737 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
741 // set gobject values
742 this.el.hexpand = true;
743 this.el.vexpand = true;
746 // user defined functions
749 public class Xcls_props : Object
752 private Xcls_MainWindow _this;
758 public Xcls_props(Xcls_MainWindow _owner )
762 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
766 // set gobject values
767 this.el.hexpand = true;
768 this.el.vexpand = true;
771 // user defined functions
776 public class Xcls_Box20 : Object
779 private Xcls_MainWindow _this;
785 public Xcls_Box20(Xcls_MainWindow _owner )
788 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
792 // set gobject values
793 this.el.hexpand = true;
794 this.el.vexpand = true;
795 new Xcls_rooviewbox( _this );
796 this.el.append( _this.rooviewbox.el );
797 new Xcls_codeeditviewbox( _this );
798 this.el.append( _this.codeeditviewbox.el );
801 // user defined functions
803 public class Xcls_rooviewbox : Object
806 private Xcls_MainWindow _this;
812 public Xcls_rooviewbox(Xcls_MainWindow _owner )
815 _this.rooviewbox = this;
816 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
820 // set gobject values
821 this.el.hexpand = true;
822 this.el.vexpand = true;
825 // user defined functions
828 public class Xcls_codeeditviewbox : Object
831 private Xcls_MainWindow _this;
837 public Xcls_codeeditviewbox(Xcls_MainWindow _owner )
840 _this.codeeditviewbox = this;
841 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
845 // set gobject values
846 this.el.hexpand = true;
847 this.el.vexpand = true;
850 // user defined functions
855 public class Xcls_Box23 : Object
858 private Xcls_MainWindow _this;
864 public Xcls_Box23(Xcls_MainWindow _owner )
867 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
871 // set gobject values
872 this.el.homogeneous = false;
873 this.el.vexpand = false;
874 var child_1 = new Xcls_Button24( _this );
876 this.el.append( child_1.el );
877 var child_2 = new Xcls_Button25( _this );
879 this.el.append( child_2.el );
880 var child_3 = new Xcls_MenuButton26( _this );
882 this.el.append( child_3.el );
883 var child_4 = new Xcls_Label31( _this );
885 this.el.append( child_4.el );
886 new Xcls_statusbar( _this );
887 this.el.append( _this.statusbar.el );
888 var child_6 = new Xcls_Box33( _this );
890 this.el.append( child_6.el );
891 new Xcls_statusbar_compile_spinner( _this );
892 this.el.append( _this.statusbar_compile_spinner.el );
895 // user defined functions
897 public class Xcls_Button24 : Object
899 public Gtk.Button el;
900 private Xcls_MainWindow _this;
904 public bool always_show_image;
907 public Xcls_Button24(Xcls_MainWindow _owner )
910 this.el = new Gtk.Button();
913 this.always_show_image = true;
915 // set gobject values
916 this.el.icon_name = "emblem-system";
917 this.el.tooltip_text = "Project Details";
918 this.el.label = "Edit Project Settings";
921 this.el.clicked.connect( ( ) => {
923 _this.windowstate.projectPopoverShow(_this.el, null, null);
929 // user defined functions
932 public class Xcls_Button25 : Object
934 public Gtk.Button el;
935 private Xcls_MainWindow _this;
939 public bool always_show_image;
942 public Xcls_Button25(Xcls_MainWindow _owner )
945 this.el = new Gtk.Button();
948 this.always_show_image = true;
950 // set gobject values
951 this.el.icon_name = "document-properties";
952 this.el.tooltip_text = "File Details";
953 this.el.label = "Edit File Properties";
956 this.el.clicked.connect( ( ) => {
958 // create a new file in project..
959 if (_this.project == null || _this.windowstate.file == null) {
962 _this.windowstate.file_details.show(
963 _this.windowstate.file, _this.el, false
972 // user defined functions
975 public class Xcls_MenuButton26 : Object
977 public Gtk.MenuButton el;
978 private Xcls_MainWindow _this;
982 public bool always_show_image;
985 public Xcls_MenuButton26(Xcls_MainWindow _owner )
988 this.el = new Gtk.MenuButton();
991 this.always_show_image = true;
993 // set gobject values
994 this.el.icon_name = "dialog-information";
995 this.el.label = "About";
996 new Xcls_topbarmenu( _this );
997 this.el.popover = _this.topbarmenu.el;
1000 // user defined functions
1002 public class Xcls_topbarmenu : Object
1004 public Gtk.PopoverMenu el;
1005 private Xcls_MainWindow _this;
1011 public Xcls_topbarmenu(Xcls_MainWindow _owner )
1014 _this.topbarmenu = this;
1015 this.el = new Gtk.PopoverMenu.from_model(null);
1019 // set gobject values
1020 var child_1 = new Xcls_Box28( _this );
1022 this.el.set_child ( child_1.el );
1031 // user defined functions
1033 public class Xcls_Box28 : Object
1036 private Xcls_MainWindow _this;
1042 public Xcls_Box28(Xcls_MainWindow _owner )
1045 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1049 // set gobject values
1050 var child_1 = new Xcls_Button29( _this );
1052 this.el.append( child_1.el );
1053 var child_2 = new Xcls_Button30( _this );
1055 this.el.append( child_2.el );
1058 // user defined functions
1060 public class Xcls_Button29 : Object
1062 public Gtk.Button el;
1063 private Xcls_MainWindow _this;
1069 public Xcls_Button29(Xcls_MainWindow _owner )
1072 this.el = new Gtk.Button();
1076 // set gobject values
1077 this.el.label = "Download updated Resources";
1080 this.el.activate.connect( ( ) => {
1081 Resources.singleton().fetchStart();
1085 // user defined functions
1088 public class Xcls_Button30 : Object
1090 public Gtk.Button el;
1091 private Xcls_MainWindow _this;
1097 public Xcls_Button30(Xcls_MainWindow _owner )
1100 this.el = new Gtk.Button();
1104 // set gobject values
1105 this.el.label = "About the Builder";
1108 this.el.clicked.connect( () => {
1109 About.singleton().el.show();
1113 // user defined functions
1119 public class Xcls_Label31 : Object
1121 public Gtk.Label el;
1122 private Xcls_MainWindow _this;
1128 public Xcls_Label31(Xcls_MainWindow _owner )
1131 this.el = new Gtk.Label( " " );
1135 // set gobject values
1136 this.el.hexpand = true;
1139 // user defined functions
1142 public class Xcls_statusbar : Object
1144 public Gtk.ProgressBar el;
1145 private Xcls_MainWindow _this;
1149 public ulong handler_id;
1152 public Xcls_statusbar(Xcls_MainWindow _owner )
1155 _this.statusbar = this;
1156 this.el = new Gtk.ProgressBar();
1159 this.handler_id = -1;
1161 // set gobject values
1162 this.el.show_text = true;
1167 this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
1170 _this.mainpane.el.set_sensitive(true);
1174 _this.mainpane.el.set_sensitive(false);
1176 this.el.set_fraction ((1.0f * pos) / (1.0f * total));
1177 this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
1183 // user defined functions
1186 public class Xcls_Box33 : Object
1189 private Xcls_MainWindow _this;
1195 public Xcls_Box33(Xcls_MainWindow _owner )
1198 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1202 // set gobject values
1203 new Xcls_statusbar_compilestatus_label( _this );
1204 this.el.append( _this.statusbar_compilestatus_label.el );
1205 new Xcls_statusbar_errors( _this );
1206 this.el.append( _this.statusbar_errors.el );
1207 new Xcls_statusbar_warnings( _this );
1208 this.el.append( _this.statusbar_warnings.el );
1209 new Xcls_statusbar_depricated( _this );
1210 this.el.append( _this.statusbar_depricated.el );
1211 new Xcls_statusbar_run( _this );
1212 this.el.append( _this.statusbar_run.el );
1215 // user defined functions
1217 public class Xcls_statusbar_compilestatus_label : Object
1219 public Gtk.Label el;
1220 private Xcls_MainWindow _this;
1226 public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
1229 _this.statusbar_compilestatus_label = this;
1230 this.el = new Gtk.Label( "Compile Status:" );
1234 // set gobject values
1235 this.el.margin_end = 4;
1236 this.el.margin_start = 4;
1239 // user defined functions
1242 public class Xcls_statusbar_errors : Object
1244 public Gtk.Button el;
1245 private Xcls_MainWindow _this;
1249 public Xcls_ValaCompileErrors popup;
1252 public Xcls_statusbar_errors(Xcls_MainWindow _owner )
1255 _this.statusbar_errors = this;
1256 this.el = new Gtk.Button();
1260 // set gobject values
1261 this.el.icon_name = "dialog-error";
1262 this.el.label = "0 Errors";
1265 this.el.clicked.connect( () => {
1267 if (this.popup == null) {
1276 // user defined functions
1277 public void setNotices (GLib.ListStore nots, GLib.ListStore fe ) {
1279 if (nots.get_n_items() < 1 ) {
1281 if (this.popup != null) {
1282 this.popup.el.hide();
1288 this.el.label = "%d/%d Errors".printf((int)fe.get_n_items(),(int)nots.get_n_items());
1292 if (this.popup == null) {
1293 this.popup = new Xcls_ValaCompileErrors();
1294 this.popup.window = _this;
1295 // this.popup.el.set_transient_for( _this.el );
1296 this.popup.el.set_parent(this.el);
1298 this.popup.updateNotices(nots);
1303 public class Xcls_statusbar_warnings : Object
1305 public Gtk.Button el;
1306 private Xcls_MainWindow _this;
1310 public Xcls_ValaCompileErrors popup;
1313 public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1316 _this.statusbar_warnings = this;
1317 this.el = new Gtk.Button();
1321 // set gobject values
1322 this.el.icon_name = "dialog-warning";
1323 this.el.label = "0 Warnings";
1326 this.el.clicked.connect( () => {
1328 if (this.popup == null) {
1337 // user defined functions
1338 public void setNotices (GLib.ListStore nots, GLib.ListStore fe ) {
1340 if (nots.get_n_items() < 1 ) {
1342 if (this.popup != null) {
1343 this.popup.el.hide();
1349 this.el.label = "%d/%d Warnings".printf((int)fe.get_n_items(),(int)nots.get_n_items());
1353 if (this.popup == null) {
1354 this.popup = new Xcls_ValaCompileErrors();
1355 this.popup.window = _this;
1356 // this.popup.el.set_transient_for( _this.el );
1357 this.popup.el.set_parent(this.el);
1359 this.popup.updateNotices(nots);
1364 public class Xcls_statusbar_depricated : Object
1366 public Gtk.Button el;
1367 private Xcls_MainWindow _this;
1371 public Xcls_ValaCompileErrors popup;
1372 public GLib.ListStore notices;
1375 public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
1378 _this.statusbar_depricated = this;
1379 this.el = new Gtk.Button();
1382 this.notices = null;
1384 // set gobject values
1385 this.el.icon_name = "dialog-information";
1386 this.el.label = "0 Depricated";
1389 this.el.clicked.connect( () => {
1391 if (this.popup == null) {
1400 // user defined functions
1401 public void setNotices (GLib.ListStore nots, GLib.ListStore fe ) {
1403 if (nots.get_n_items() < 1 ) {
1405 if (this.popup != null) {
1406 this.popup.el.hide();
1412 this.el.label = "%d/%d Depricated".printf((int)fe.get_n_items(),(int)nots.get_n_items());
1416 if (this.popup == null) {
1417 this.popup = new Xcls_ValaCompileErrors();
1418 this.popup.window = _this;
1419 // this.popup.el.set_transient_for( _this.el );
1420 this.popup.el.set_parent(this.el);
1422 this.popup.updateNotices(nots);
1427 public class Xcls_statusbar_run : Object
1429 public Gtk.Button el;
1430 private Xcls_MainWindow _this;
1434 public Xcls_ValaCompileErrors popup;
1437 public Xcls_statusbar_run(Xcls_MainWindow _owner )
1440 _this.statusbar_run = this;
1441 this.el = new Gtk.Button();
1445 // set gobject values
1446 this.el.icon_name = "media-playback-start";
1447 this.el.label = "Run";
1450 this.el.clicked.connect( () => {
1452 if (_this.windowstate.file == null) {
1455 if (_this.statusbar_compile_spinner.el.spinning) {
1456 _this.windowstate.compile_results.el.set_parent(this.el);
1457 _this.windowstate.compile_results.el.show(); // show currently running.
1461 var req = new Palete.ValaCompileRequest(
1462 Palete.ValaCompileRequestType.RUN,
1463 _this.windowstate.file,
1470 _this.windowstate.compile_results.el.set_parent(this.el);
1471 _this.windowstate.compile_results.show(this.el,true);
1476 // user defined functions
1480 public class Xcls_statusbar_compile_spinner : Object
1482 public Gtk.Spinner el;
1483 private Xcls_MainWindow _this;
1489 public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1492 _this.statusbar_compile_spinner = this;
1493 this.el = new Gtk.Spinner();
1497 // set gobject values
1498 this.el.margin_end = 4;
1499 this.el.margin_start = 4;
1500 this.el.tooltip_text = "Compiling";
1503 // user defined functions
1504 public void start () {
1510 public void stop () {