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);
67 BuilderApplication.removeWindow(this);
69 if (BuilderApplication.windows.size < 1) {
71 BuilderApplication.singleton( null ).quit();
75 this.el.show.connect( ( ) => {
76 // hide the file editing..
78 //this.hideViewEditing();
79 // this is updated by windowstate - we try and fill it in..
80 _this.statusbar.el.hide();
81 //_this.statusbar_errors.el.hide();
82 //_this.statusbar_warnings.el.hide();
83 //_this.statusbar_depricated.el.hide();
84 _this.statusbar_compile_spinner.el.hide();
86 Resources.singleton().checkResources();
91 this.el.hide.connect( () => {
98 // user defined functions
99 public void updateErrors (Palete.ValaCompileRequest? req) {
103 _this.statusbar_errors.el.hide();
104 _this.statusbar_warnings.el.hide();
105 _this.statusbar_depricated.el.hide();
110 this.statusbar_errors.setNotices(
111 req.errorByType.get("ERR"),
112 req.totalErrors("ERR"),
113 req.totalErrors("ERR", this.windowstate.file)
115 this.statusbar_warnings.setNotices(
116 req.errorByType.get("WARN"),
117 req.totalErrors("WARN"),
118 req.totalErrors("WARN", this.windowstate.file)
120 this.statusbar_depricated.setNotices(
121 req.errorByType.get("DEPR"),
122 req.totalErrors("DEPR"),
123 req.totalErrors("DEPR", this.windowstate.file)
126 public void initChildren () {
127 // this needs putting in a better place..
128 this.windowstate = new WindowState(this);
138 public void show () {
141 if (this.windowstate.file == null) {
142 this.windowstate.showPopoverFiles(this.open_projects_btn.el, null, false);
145 public void setTitle () {
146 if (_this.windowstate.project == null ||
147 _this.windowstate.file == null
149 this.el.set_title("Select File");
153 _this.windowstate.project.name +
155 _this.windowstate.file.relpath);
157 public void openNewWindow () {
159 var w = new Xcls_MainWindow();
161 BuilderApplication.addWindow(w);
164 w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project, false);
167 public class Xcls_headerbar : Object
169 public Gtk.HeaderBar el;
170 private Xcls_MainWindow _this;
174 public bool show_close_button;
178 public Xcls_headerbar(Xcls_MainWindow _owner )
181 _this.headerbar = this;
182 this.el = new Gtk.HeaderBar();
185 this.show_close_button = true;
186 this.title = "Application Builder";
188 // set gobject values
189 var child_1 = new Xcls_Box3( _this );
191 this.el.pack_start ( child_1.el );
194 // user defined functions
196 public class Xcls_Box3 : Object
199 private Xcls_MainWindow _this;
205 public Xcls_Box3(Xcls_MainWindow _owner )
208 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
212 // set gobject values
213 new Xcls_windowbtn( _this );
214 this.el.append( _this.windowbtn.el );
215 new Xcls_open_projects_btn( _this );
216 this.el.append ( _this.open_projects_btn.el );
219 // user defined functions
221 public class Xcls_windowbtn : Object
223 public Gtk.Button el;
224 private Xcls_MainWindow _this;
228 public Gee.ArrayList<Gtk.Widget> mitems;
231 public Xcls_windowbtn(Xcls_MainWindow _owner )
234 _this.windowbtn = this;
235 this.el = new Gtk.Button();
239 // set gobject values
240 this.el.margin_end = 4;
241 this.el.halign = Gtk.Align.START;
242 new Xcls_windowspopup( _this );
243 var child_2 = new Xcls_Box10( _this );
244 this.el.child = child_2.el;
249 this.mitems = new Gee.ArrayList<Gtk.Button>();
253 this.el.clicked.connect( ( ) => {
256 _this.windowspopup.el.set_parent(this.el);
258 _this.windowspopup.el.set_position(Gtk.PositionType.BOTTOM);
259 _this.windowspopup.el.popup();
263 // user defined functions
264 public void updateMenu () {
265 foreach(var m in this.mitems) {
266 _this.popover_menu.el.remove(m);
270 BuilderApplication.windows.sort((a,b) => {
271 if (a.windowstate == null ||
272 a.windowstate.file == null ||
273 b.windowstate == null ||
274 b.windowstate.file == null
279 var ap = a.windowstate.file.project.name;
280 var bp = b.windowstate.file.project.name;
285 return ap.collate(bp);
287 var af = a.windowstate.file == null ? "" : a.windowstate.file.getTitle();
288 var bf = b.windowstate.file == null ? "" : b.windowstate.file.getTitle();
289 return af.collate(bf);
294 foreach(var w in BuilderApplication.windows) {
295 var wid = BuilderApplication.windows.index_of(w);
296 // fixme find a better way to display this.
297 if (w.windowstate == null ||
298 w.windowstate.file == null ||
299 _this.windowstate == null ||
300 _this.windowstate.file == null
304 // should not happen...
305 if (w.windowstate.file.path == _this.windowstate.file.path) {
308 if (w.windowstate.file.project.name != p || p != "") {
309 var ms = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);
310 _this.popover_menu.el.append(ms);
315 p = w.windowstate.file.project.name;
318 GLib.debug("add menuitem %s", w.windowstate.file.path);
322 var m = new Gtk.Button.with_label(
323 w.windowstate.file.project.name + " : " + w.windowstate.file.relpath
325 m.halign = Gtk.Align.START;
328 //w.windowstate.file.path);
329 m.clicked.connect(() => {
330 _this.windowspopup.el.hide();
331 BuilderApplication.windows.get(wid).el.present();
333 _this.popover_menu.el.append(m);
339 public class Xcls_windowspopup : Object
341 public Gtk.Popover el;
342 private Xcls_MainWindow _this;
348 public Xcls_windowspopup(Xcls_MainWindow _owner )
351 _this.windowspopup = this;
352 this.el = new Gtk.Popover();
356 // set gobject values
357 new Xcls_popover_menu( _this );
358 this.el.set_child ( _this.popover_menu.el );
361 // user defined functions
363 public class Xcls_popover_menu : Object
366 private Xcls_MainWindow _this;
372 public Xcls_popover_menu(Xcls_MainWindow _owner )
375 _this.popover_menu = this;
376 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
380 // set gobject values
381 var child_1 = new Xcls_Button7( _this );
383 this.el.append ( child_1.el );
384 var child_2 = new Xcls_Separator9( _this );
386 this.el.append ( child_2.el );
389 // user defined functions
391 public class Xcls_Button7 : Object
393 public Gtk.Button el;
394 private Xcls_MainWindow _this;
400 public Xcls_Button7(Xcls_MainWindow _owner )
403 this.el = new Gtk.Button();
407 // set gobject values
408 this.el.label = "New Window";
409 var child_1 = new Xcls_ShortcutController8( _this );
411 this.el.add_controller( child_1.el );
414 this.el.clicked.connect( ( ) => {
415 _this.windowspopup.el.hide();
416 _this.windowstate.showPopoverFiles(_this.windowbtn.el, _this.project, true);
420 // user defined functions
422 public class Xcls_ShortcutController8 : Object
424 public Gtk.ShortcutController el;
425 private Xcls_MainWindow _this;
431 public Xcls_ShortcutController8(Xcls_MainWindow _owner )
434 this.el = new Gtk.ShortcutController();
438 // set gobject values
439 this.el.scope = Gtk.ShortcutScope.GLOBAL;
444 this.el.add_shortcut(
446 new Gtk.KeyvalTrigger(Gdk.Key.N,Gdk.ModifierType.CONTROL_MASK),
447 new Gtk.SignalAction("clicked")
453 // user defined functions
457 public class Xcls_Separator9 : Object
459 public Gtk.Separator el;
460 private Xcls_MainWindow _this;
466 public Xcls_Separator9(Xcls_MainWindow _owner )
469 this.el = new Gtk.Separator( Gtk.Orientation.HORIZONTAL );
473 // set gobject values
476 // user defined functions
481 public class Xcls_Box10 : Object
484 private Xcls_MainWindow _this;
490 public Xcls_Box10(Xcls_MainWindow _owner )
493 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
497 // set gobject values
498 var child_1 = new Xcls_Image11( _this );
500 this.el.append( child_1.el );
501 var child_2 = new Xcls_Label12( _this );
503 this.el.append( child_2.el );
506 // user defined functions
508 public class Xcls_Image11 : Object
511 private Xcls_MainWindow _this;
517 public Xcls_Image11(Xcls_MainWindow _owner )
520 this.el = new Gtk.Image();
524 // set gobject values
525 this.el.icon_name = "window-new";
526 this.el.margin_start = 4;
529 // user defined functions
532 public class Xcls_Label12 : Object
535 private Xcls_MainWindow _this;
541 public Xcls_Label12(Xcls_MainWindow _owner )
544 this.el = new Gtk.Label( "Windows (Add/List)" );
548 // set gobject values
551 // user defined functions
556 public class Xcls_open_projects_btn : Object
558 public Gtk.Button el;
559 private Xcls_MainWindow _this;
563 public bool always_show_image;
566 public Xcls_open_projects_btn(Xcls_MainWindow _owner )
569 _this.open_projects_btn = this;
570 this.el = new Gtk.Button();
573 this.always_show_image = true;
575 // set gobject values
576 this.el.icon_name = "system-file-manager";
577 this.el.label = "Files / Projects";
580 this.el.clicked.connect( ( ) => {
581 _this.windowstate.showPopoverFiles(this.el, _this.project, false);
585 // user defined functions
590 public class Xcls_vbox : Object
593 private Xcls_MainWindow _this;
599 public Xcls_vbox(Xcls_MainWindow _owner )
603 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
607 // set gobject values
608 this.el.homogeneous = false;
609 this.el.vexpand = true;
610 new Xcls_mainpane( _this );
611 this.el.append( _this.mainpane.el );
612 var child_2 = new Xcls_Box23( _this );
614 this.el.append( child_2.el );
617 // user defined functions
619 public class Xcls_mainpane : Object
622 private Xcls_MainWindow _this;
626 public int lastWidth;
629 public Xcls_mainpane(Xcls_MainWindow _owner )
632 _this.mainpane = this;
633 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
638 // set gobject values
639 this.el.hexpand = true;
640 this.el.vexpand = true;
641 this.el.position = 400;
642 new Xcls_leftpane( _this );
643 this.el.start_child = _this.leftpane.el;
644 var child_2 = new Xcls_Box20( _this );
645 this.el.end_child = child_2.el;
648 this.el.accept_position.connect( ( ) => {
649 _this.windowstate.left_tree.onresize();
654 // user defined functions
656 public class Xcls_leftpane : Object
659 private Xcls_MainWindow _this;
665 public Xcls_leftpane(Xcls_MainWindow _owner )
668 _this.leftpane = this;
669 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
673 // set gobject values
674 this.el.hexpand = true;
675 this.el.vexpand = true;
676 new Xcls_editpane( _this );
677 this.el.append( _this.editpane.el );
680 // user defined functions
682 public class Xcls_editpane : Object
685 private Xcls_MainWindow _this;
691 public Xcls_editpane(Xcls_MainWindow _owner )
694 _this.editpane = this;
695 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
699 // set gobject values
700 new Xcls_tree( _this );
701 this.el.start_child = _this.tree.el;
702 new Xcls_props( _this );
703 this.el.end_child = _this.props.el;
706 this.el.accept_position.connect( ( ) => {
707 _this.windowstate.left_tree.onresize();
710 this.el.move_handle.connect( (scroll) => {
711 GLib.debug("Move handle");
716 // user defined functions
718 public class Xcls_tree : Object
721 private Xcls_MainWindow _this;
727 public Xcls_tree(Xcls_MainWindow _owner )
731 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
735 // set gobject values
736 this.el.hexpand = true;
737 this.el.vexpand = true;
740 // user defined functions
743 public class Xcls_props : Object
746 private Xcls_MainWindow _this;
752 public Xcls_props(Xcls_MainWindow _owner )
756 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
760 // set gobject values
761 this.el.hexpand = true;
762 this.el.vexpand = true;
765 // user defined functions
770 public class Xcls_Box20 : Object
773 private Xcls_MainWindow _this;
779 public Xcls_Box20(Xcls_MainWindow _owner )
782 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
786 // set gobject values
787 this.el.hexpand = true;
788 this.el.vexpand = true;
789 new Xcls_rooviewbox( _this );
790 this.el.append( _this.rooviewbox.el );
791 new Xcls_codeeditviewbox( _this );
792 this.el.append( _this.codeeditviewbox.el );
795 // user defined functions
797 public class Xcls_rooviewbox : Object
800 private Xcls_MainWindow _this;
806 public Xcls_rooviewbox(Xcls_MainWindow _owner )
809 _this.rooviewbox = this;
810 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
814 // set gobject values
815 this.el.hexpand = true;
816 this.el.vexpand = true;
819 // user defined functions
822 public class Xcls_codeeditviewbox : Object
825 private Xcls_MainWindow _this;
831 public Xcls_codeeditviewbox(Xcls_MainWindow _owner )
834 _this.codeeditviewbox = this;
835 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
839 // set gobject values
840 this.el.hexpand = true;
841 this.el.vexpand = true;
844 // user defined functions
849 public class Xcls_Box23 : Object
852 private Xcls_MainWindow _this;
858 public Xcls_Box23(Xcls_MainWindow _owner )
861 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
865 // set gobject values
866 this.el.homogeneous = false;
867 this.el.vexpand = false;
868 var child_1 = new Xcls_Button24( _this );
870 this.el.append( child_1.el );
871 var child_2 = new Xcls_Button25( _this );
873 this.el.append( child_2.el );
874 var child_3 = new Xcls_MenuButton26( _this );
876 this.el.append( child_3.el );
877 var child_4 = new Xcls_Label31( _this );
879 this.el.append( child_4.el );
880 new Xcls_statusbar( _this );
881 this.el.append( _this.statusbar.el );
882 var child_6 = new Xcls_Box33( _this );
884 this.el.append( child_6.el );
885 new Xcls_statusbar_compile_spinner( _this );
886 this.el.append( _this.statusbar_compile_spinner.el );
889 // user defined functions
891 public class Xcls_Button24 : Object
893 public Gtk.Button el;
894 private Xcls_MainWindow _this;
898 public bool always_show_image;
901 public Xcls_Button24(Xcls_MainWindow _owner )
904 this.el = new Gtk.Button();
907 this.always_show_image = true;
909 // set gobject values
910 this.el.icon_name = "emblem-system";
911 this.el.tooltip_text = "Project Details";
912 this.el.label = "Edit Project Settings";
915 this.el.clicked.connect( ( ) => {
917 _this.windowstate.projectPopoverShow(_this.el, null);
923 // user defined functions
926 public class Xcls_Button25 : Object
928 public Gtk.Button el;
929 private Xcls_MainWindow _this;
933 public bool always_show_image;
936 public Xcls_Button25(Xcls_MainWindow _owner )
939 this.el = new Gtk.Button();
942 this.always_show_image = true;
944 // set gobject values
945 this.el.icon_name = "document-properties";
946 this.el.tooltip_text = "File Details";
947 this.el.label = "Edit File Properties";
950 this.el.clicked.connect( ( ) => {
952 // create a new file in project..
953 if (_this.project == null || _this.windowstate.file == null) {
956 _this.windowstate.file_details.show(
957 _this.windowstate.file, _this.el, false
966 // user defined functions
969 public class Xcls_MenuButton26 : Object
971 public Gtk.MenuButton el;
972 private Xcls_MainWindow _this;
976 public bool always_show_image;
979 public Xcls_MenuButton26(Xcls_MainWindow _owner )
982 this.el = new Gtk.MenuButton();
985 this.always_show_image = true;
987 // set gobject values
988 this.el.icon_name = "dialog-information";
989 this.el.label = "About";
990 new Xcls_topbarmenu( _this );
991 this.el.popover = _this.topbarmenu.el;
994 // user defined functions
996 public class Xcls_topbarmenu : Object
998 public Gtk.PopoverMenu el;
999 private Xcls_MainWindow _this;
1005 public Xcls_topbarmenu(Xcls_MainWindow _owner )
1008 _this.topbarmenu = this;
1009 this.el = new Gtk.PopoverMenu.from_model(null);
1013 // set gobject values
1014 var child_1 = new Xcls_Box28( _this );
1016 this.el.set_child ( child_1.el );
1025 // user defined functions
1027 public class Xcls_Box28 : Object
1030 private Xcls_MainWindow _this;
1036 public Xcls_Box28(Xcls_MainWindow _owner )
1039 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1043 // set gobject values
1044 var child_1 = new Xcls_Button29( _this );
1046 this.el.append( child_1.el );
1047 var child_2 = new Xcls_Button30( _this );
1049 this.el.append( child_2.el );
1052 // user defined functions
1054 public class Xcls_Button29 : Object
1056 public Gtk.Button el;
1057 private Xcls_MainWindow _this;
1063 public Xcls_Button29(Xcls_MainWindow _owner )
1066 this.el = new Gtk.Button();
1070 // set gobject values
1071 this.el.label = "Download updated Resources";
1074 this.el.activate.connect( ( ) => {
1075 Resources.singleton().fetchStart();
1079 // user defined functions
1082 public class Xcls_Button30 : Object
1084 public Gtk.Button el;
1085 private Xcls_MainWindow _this;
1091 public Xcls_Button30(Xcls_MainWindow _owner )
1094 this.el = new Gtk.Button();
1098 // set gobject values
1099 this.el.label = "About the Builder";
1102 this.el.clicked.connect( () => {
1103 About.singleton().el.show();
1107 // user defined functions
1113 public class Xcls_Label31 : Object
1115 public Gtk.Label el;
1116 private Xcls_MainWindow _this;
1122 public Xcls_Label31(Xcls_MainWindow _owner )
1125 this.el = new Gtk.Label( " " );
1129 // set gobject values
1130 this.el.hexpand = true;
1133 // user defined functions
1136 public class Xcls_statusbar : Object
1138 public Gtk.ProgressBar el;
1139 private Xcls_MainWindow _this;
1143 public ulong handler_id;
1146 public Xcls_statusbar(Xcls_MainWindow _owner )
1149 _this.statusbar = this;
1150 this.el = new Gtk.ProgressBar();
1153 this.handler_id = -1;
1155 // set gobject values
1156 this.el.show_text = true;
1161 this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {
1164 _this.mainpane.el.set_sensitive(true);
1168 _this.mainpane.el.set_sensitive(false);
1170 this.el.set_fraction ((1.0f * pos) / (1.0f * total));
1171 this.el.set_text("Fetching Resource : %s/%s".printf(pos.to_string(), total.to_string()));
1177 // user defined functions
1180 public class Xcls_Box33 : Object
1183 private Xcls_MainWindow _this;
1189 public Xcls_Box33(Xcls_MainWindow _owner )
1192 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1196 // set gobject values
1197 new Xcls_statusbar_compilestatus_label( _this );
1198 this.el.append( _this.statusbar_compilestatus_label.el );
1199 new Xcls_statusbar_errors( _this );
1200 this.el.append( _this.statusbar_errors.el );
1201 new Xcls_statusbar_warnings( _this );
1202 this.el.append( _this.statusbar_warnings.el );
1203 new Xcls_statusbar_depricated( _this );
1204 this.el.append( _this.statusbar_depricated.el );
1205 new Xcls_statusbar_run( _this );
1206 this.el.append( _this.statusbar_run.el );
1209 // user defined functions
1211 public class Xcls_statusbar_compilestatus_label : Object
1213 public Gtk.Label el;
1214 private Xcls_MainWindow _this;
1220 public Xcls_statusbar_compilestatus_label(Xcls_MainWindow _owner )
1223 _this.statusbar_compilestatus_label = this;
1224 this.el = new Gtk.Label( "Compile Status:" );
1228 // set gobject values
1229 this.el.margin_end = 4;
1230 this.el.margin_start = 4;
1233 // user defined functions
1236 public class Xcls_statusbar_errors : Object
1238 public Gtk.Button el;
1239 private Xcls_MainWindow _this;
1243 public Xcls_ValaCompileErrors popup;
1244 public GLib.ListStore notices;
1247 public Xcls_statusbar_errors(Xcls_MainWindow _owner )
1250 _this.statusbar_errors = this;
1251 this.el = new Gtk.Button();
1254 this.notices = null;
1256 // set gobject values
1257 this.el.icon_name = "dialog-error";
1258 this.el.label = "0 Errors";
1261 this.el.clicked.connect( () => {
1265 if (this.popup == null) {
1266 this.popup = new Xcls_ValaCompileErrors();
1267 this.popup.window = _this;
1268 //this.popup.el.application = _this.el.application;
1269 // this.popup.el.set_transient_for( _this.el );
1270 this.popup.el.set_parent(this.el);
1272 if (_this.statusbar_compile_spinner.el.spinning) {
1273 this.popup.el.show();
1276 this.popup.show(this.notices, this.el);
1281 // user defined functions
1282 public void setNotices (GLib.ListStore nots, int qty, int tf) {
1286 if (this.popup != null && this.popup.el.visible) {
1287 this.popup.el.hide();
1293 this.el.label = "%d/%d Errors".printf(tf,qty);
1294 this.notices = nots;
1295 if (this.popup != null && this.popup.el.visible) {
1296 this.popup.show(this.notices, this.el);
1301 public class Xcls_statusbar_warnings : Object
1303 public Gtk.Button el;
1304 private Xcls_MainWindow _this;
1308 public Xcls_ValaCompileErrors popup;
1309 public GLib.ListStore notices;
1312 public Xcls_statusbar_warnings(Xcls_MainWindow _owner )
1315 _this.statusbar_warnings = this;
1316 this.el = new Gtk.Button();
1319 this.notices = null;
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) {
1329 this.popup = new Xcls_ValaCompileErrors();
1330 this.popup.window = _this;
1331 // this.popup.el.set_transient_for( _this.el );
1332 this.popup.el.set_parent(this.el);
1334 if (_this.statusbar_compile_spinner.el.spinning) {
1335 this.popup.el.show();
1338 this.popup.show(this.notices, this.el);
1343 // user defined functions
1344 public void setNotices (GLib.ListStore nots, int qty, int tf) {
1348 if (this.popup != null && this.popup.el.visible) {
1349 this.popup.el.hide();
1354 this.el.label = "%d/%d Warnings".printf(tf,qty);
1355 this.notices = nots;
1356 if (this.popup != null && this.popup.el.visible) {
1357 this.popup.show(this.notices, this.el);
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) {
1392 this.popup = new Xcls_ValaCompileErrors();
1393 this.popup.window = _this;
1394 // this.popup.el.set_transient_for( _this.el );
1395 this.popup.el.set_parent(this.el);
1397 if (_this.statusbar_compile_spinner.el.spinning) {
1398 this.popup.el.show();
1402 this.popup.show(this.notices, this.el);
1407 // user defined functions
1408 public void setNotices (GLib.ListStore nots, int qty, int tf) {
1411 if (this.popup != null && this.popup.el.visible) {
1412 this.popup.el.hide();
1420 this.el.label = "%d/%d Depricated".printf(tf,qty);
1421 this.notices = nots;
1422 if (this.popup != null && this.popup.el.visible) {
1423 this.popup.show(this.notices, this.el);
1428 public class Xcls_statusbar_run : Object
1430 public Gtk.Button el;
1431 private Xcls_MainWindow _this;
1435 public Xcls_ValaCompileErrors popup;
1438 public Xcls_statusbar_run(Xcls_MainWindow _owner )
1441 _this.statusbar_run = this;
1442 this.el = new Gtk.Button();
1446 // set gobject values
1447 this.el.icon_name = "media-playback-start";
1448 this.el.label = "Run";
1451 this.el.clicked.connect( () => {
1453 if (_this.windowstate.file == null) {
1456 if (_this.statusbar_compile_spinner.el.spinning) {
1457 _this.windowstate.compile_results.el.set_parent(this.el);
1458 _this.windowstate.compile_results.el.show(); // show currently running.
1461 BuilderApplication.valacompilequeue.addFile(
1462 Palete.ValaCompileRequestType.RUN,
1463 _this.windowstate.file, "", true ) ;
1465 _this.windowstate.compile_results.el.set_parent(this.el);
1466 _this.windowstate.compile_results.show(this.el,true);
1471 // user defined functions
1475 public class Xcls_statusbar_compile_spinner : Object
1477 public Gtk.Spinner el;
1478 private Xcls_MainWindow _this;
1484 public Xcls_statusbar_compile_spinner(Xcls_MainWindow _owner )
1487 _this.statusbar_compile_spinner = this;
1488 this.el = new Gtk.Spinner();
1492 // set gobject values
1493 this.el.margin_end = 4;
1494 this.el.margin_start = 4;
1495 this.el.tooltip_text = "Compiling";
1498 // user defined functions
1499 public void start () {
1505 public void stop () {