1 static ValaProjectSettings _ValaProjectSettings;
3 public class ValaProjectSettings : Object
6 private ValaProjectSettings _this;
8 public static ValaProjectSettings singleton()
10 if (_ValaProjectSettings == null) {
11 _ValaProjectSettings= new ValaProjectSettings();
13 return _ValaProjectSettings;
15 public Xcls_label_global label_global;
16 public Xcls_label_targets label_targets;
17 public Xcls_compile_flags compile_flags;
18 public Xcls_default_packages_tree_store default_packages_tree_store;
19 public Xcls_packages_render packages_render;
20 public Xcls_packages_render_use packages_render_use;
21 public Xcls_default_directory_tree default_directory_tree;
22 public Xcls_default_directory_tree_store default_directory_tree_store;
23 public Xcls_directory_render directory_render;
24 public Xcls_default_directory_menu default_directory_menu;
25 public Xcls_targets_tree_menu targets_tree_menu;
26 public Xcls_targets_tree targets_tree;
27 public Xcls_targets_tree_store targets_tree_store;
28 public Xcls_targets_render targets_render;
29 public Xcls_build_pack_target build_pack_target;
30 public Xcls_build_compile_flags build_compile_flags;
31 public Xcls_files_tree_store files_tree_store;
32 public Xcls_files_render files_render;
33 public Xcls_files_render_use files_render_use;
36 public Project.Gtk project;
37 public Xcls_MainWindow window;
40 public ValaProjectSettings()
43 this.el = new Gtk.VBox( true, 0 );
50 var child_0 = new Xcls_Notebook2( _this );
52 this.el.pack_start ( child_0.el , true,true,0 );
55 // user defined functions
56 public void show (Project.Gtk project) {
59 print("ValaProjectSettings show\n");
61 this.project= project;
63 this.compile_flags.el.text = _this.project.compilegroups.get("_default_").compile_flags;
65 this.default_directory_tree_store.load();
66 this.default_packages_tree_store.load();
67 this.targets_tree_store.load();
68 this.files_tree_store.load();
72 this.project.writeConfig();
74 public class Xcls_Notebook2 : Object
76 public Gtk.Notebook el;
77 private ValaProjectSettings _this;
83 public Xcls_Notebook2(ValaProjectSettings _owner )
86 this.el = new Gtk.Notebook();
91 var child_0 = new Xcls_label_global( _this );
93 var child_1 = new Xcls_label_targets( _this );
95 var child_2 = new Xcls_VBox5( _this );
97 this.el.append_page ( child_2.el , _this.label_global.el );
98 var child_3 = new Xcls_HPaned27( _this );
100 this.el.append_page ( child_3.el , _this.label_targets.el );
103 // user defined functions
105 public class Xcls_label_global : Object
108 private ValaProjectSettings _this;
114 public Xcls_label_global(ValaProjectSettings _owner )
117 _this.label_global = this;
118 this.el = new Gtk.Label( "Global" );
122 // set gobject values
125 // user defined functions
127 public class Xcls_label_targets : Object
130 private ValaProjectSettings _this;
136 public Xcls_label_targets(ValaProjectSettings _owner )
139 _this.label_targets = this;
140 this.el = new Gtk.Label( "Targets" );
144 // set gobject values
147 // user defined functions
149 public class Xcls_VBox5 : Object
152 private ValaProjectSettings _this;
158 public Xcls_VBox5(ValaProjectSettings _owner )
161 this.el = new Gtk.VBox( false, 0 );
165 // set gobject values
166 var child_0 = new Xcls_Label6( _this );
168 this.el.pack_start ( child_0.el , false,false,0 );
169 var child_1 = new Xcls_compile_flags( _this );
171 this.el.pack_start ( child_1.el , false,false,0 );
172 var child_2 = new Xcls_Label8( _this );
174 this.el.pack_start ( child_2.el , false,false,0 );
175 var child_3 = new Xcls_ScrolledWindow9( _this );
177 this.el.pack_start ( child_3.el , true,true,0 );
178 var child_4 = new Xcls_Label16( _this );
180 this.el.pack_start ( child_4.el , false,false,0 );
181 var child_5 = new Xcls_ScrolledWindow17( _this );
183 this.el.pack_start ( child_5.el , true,true,0 );
186 // user defined functions
188 public class Xcls_Label6 : Object
191 private ValaProjectSettings _this;
197 public Xcls_Label6(ValaProjectSettings _owner )
200 this.el = new Gtk.Label( "compile flags" );
204 // set gobject values
207 // user defined functions
209 public class Xcls_compile_flags : Object
212 private ValaProjectSettings _this;
218 public Xcls_compile_flags(ValaProjectSettings _owner )
221 _this.compile_flags = this;
222 this.el = new Gtk.Entry();
226 // set gobject values
227 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
230 this.el.changed.connect( () => {
232 _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
233 _this.project.writeConfig();
234 // _this.project.save();
239 // user defined functions
241 public class Xcls_Label8 : Object
244 private ValaProjectSettings _this;
250 public Xcls_Label8(ValaProjectSettings _owner )
253 this.el = new Gtk.Label( "packages" );
257 // set gobject values
260 // user defined functions
262 public class Xcls_ScrolledWindow9 : Object
264 public Gtk.ScrolledWindow el;
265 private ValaProjectSettings _this;
271 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
274 this.el = new Gtk.ScrolledWindow( null, null );
278 // set gobject values
279 var child_0 = new Xcls_default_packages_tree( _this );
281 this.el.add ( child_0.el );
284 // user defined functions
286 public class Xcls_default_packages_tree : Object
288 public Gtk.TreeView el;
289 private ValaProjectSettings _this;
295 public Xcls_default_packages_tree(ValaProjectSettings _owner )
298 this.el = new Gtk.TreeView();
302 // set gobject values
303 this.el.headers_visible = false;
304 var child_0 = new Xcls_default_packages_tree_store( _this );
306 this.el.set_model ( child_0.el );
307 var child_1 = new Xcls_TreeViewColumn12( _this );
309 this.el.append_column ( child_1.el );
310 var child_2 = new Xcls_TreeViewColumn14( _this );
312 this.el.append_column ( child_2.el );
315 // user defined functions
317 public class Xcls_default_packages_tree_store : Object
319 public Gtk.ListStore el;
320 private ValaProjectSettings _this;
326 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
329 _this.default_packages_tree_store = this;
330 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
335 // set gobject values
338 // user defined functions
339 public void load () {
341 var def = _this.project.compilegroups.get("_default_");
342 var items = def.packages;
345 var pal = (Palete.Gtk) Palete.factory("Gtk");
346 var pkgs = pal.packages();
347 print("ValaProjectSettings:packages load %d\n", pkgs.size);
351 for(var i =0 ; i < pkgs.size; i++) {
352 this.el.append(out citer);
354 this.el.set_value(citer, 0, pkgs.get(i) ); // title
355 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
357 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
361 public class Xcls_TreeViewColumn12 : Object
363 public Gtk.TreeViewColumn el;
364 private ValaProjectSettings _this;
370 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
373 this.el = new Gtk.TreeViewColumn();
377 // set gobject values
378 this.el.title = "name";
379 this.el.expand = true;
380 this.el.resizable = true;
381 var child_0 = new Xcls_packages_render( _this );
383 this.el.pack_start ( child_0.el , false );
387 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
389 // user defined functions
391 public class Xcls_packages_render : Object
393 public Gtk.CellRendererText el;
394 private ValaProjectSettings _this;
400 public Xcls_packages_render(ValaProjectSettings _owner )
403 _this.packages_render = this;
404 this.el = new Gtk.CellRendererText();
408 // set gobject values
411 // user defined functions
413 public class Xcls_TreeViewColumn14 : Object
415 public Gtk.TreeViewColumn el;
416 private ValaProjectSettings _this;
422 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
425 this.el = new Gtk.TreeViewColumn();
429 // set gobject values
430 this.el.title = "use";
431 this.el.resizable = false;
432 this.el.fixed_width = 50;
433 var child_0 = new Xcls_packages_render_use( _this );
435 this.el.pack_start ( child_0.el , false );
440 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
443 // user defined functions
445 public class Xcls_packages_render_use : Object
447 public Gtk.CellRendererToggle el;
448 private ValaProjectSettings _this;
454 public Xcls_packages_render_use(ValaProjectSettings _owner )
457 _this.packages_render_use = this;
458 this.el = new Gtk.CellRendererToggle();
462 // set gobject values
463 this.el.activatable = true;
466 this.el.toggled.connect( ( path_string) => {
467 var m = _this.default_packages_tree_store.el;
469 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
470 m.get_iter (out iter, path);
472 m.get_value(iter, 1, out val);
473 m.set_value(iter, 1, ((bool) val) ? false :true);
475 m.get_value(iter, 0, out fval);
476 var fn = (string)fval;
478 var def = _this.project.compilegroups.get("_default_");
479 var items = def.packages;
490 // user defined functions
492 public class Xcls_Label16 : Object
495 private ValaProjectSettings _this;
501 public Xcls_Label16(ValaProjectSettings _owner )
504 this.el = new Gtk.Label( "Available Directories" );
508 // set gobject values
511 // user defined functions
513 public class Xcls_ScrolledWindow17 : Object
515 public Gtk.ScrolledWindow el;
516 private ValaProjectSettings _this;
522 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
525 this.el = new Gtk.ScrolledWindow( null, null );
529 // set gobject values
530 var child_0 = new Xcls_default_directory_tree( _this );
532 this.el.add ( child_0.el );
533 var child_1 = new Xcls_default_directory_menu( _this );
537 // user defined functions
539 public class Xcls_default_directory_tree : Object
541 public Gtk.TreeView el;
542 private ValaProjectSettings _this;
548 public Xcls_default_directory_tree(ValaProjectSettings _owner )
551 _this.default_directory_tree = this;
552 this.el = new Gtk.TreeView();
556 // set gobject values
557 this.el.headers_visible = false;
558 var child_0 = new Xcls_default_directory_tree_store( _this );
560 this.el.set_model ( child_0.el );
561 var child_1 = new Xcls_TreeViewColumn20( _this );
563 this.el.append_column ( child_1.el );
566 this.el.button_press_event.connect( ( ev) => {
567 //console.log("button press?");
570 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
571 //print("click" + ev.type);
575 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
579 // this.el.get_selection().select_path(res);
581 //if (!this.get('/LeftTreeMenu').el) {
582 // this.get('/LeftTreeMenu').init();
585 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
586 _this.default_directory_menu.el.show_all();
587 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
588 // print("click:" + res.path.to_string());
593 // user defined functions
595 public class Xcls_default_directory_tree_store : Object
597 public Gtk.ListStore el;
598 private ValaProjectSettings _this;
604 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
607 _this.default_directory_tree_store = this;
608 this.el = new Gtk.ListStore( 1, typeof(string)
613 // set gobject values
616 // user defined functions
617 public void load () {
622 var def = _this.project.compilegroups.get("_default_");
623 var items = def.sources;
628 for(var i =0 ; i < items.size; i++) {
629 this.el.append(out citer);
631 this.el.set_value(citer, 0, items.get(i) ); // title
632 //this.el.set_value(citer, 1, items.get(i) );
634 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
638 public class Xcls_TreeViewColumn20 : Object
640 public Gtk.TreeViewColumn el;
641 private ValaProjectSettings _this;
647 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
650 this.el = new Gtk.TreeViewColumn();
654 // set gobject values
655 this.el.title = "name";
656 this.el.resizable = true;
657 var child_0 = new Xcls_directory_render( _this );
659 this.el.pack_start ( child_0.el , false );
663 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
665 // user defined functions
667 public class Xcls_directory_render : Object
669 public Gtk.CellRendererText el;
670 private ValaProjectSettings _this;
676 public Xcls_directory_render(ValaProjectSettings _owner )
679 _this.directory_render = this;
680 this.el = new Gtk.CellRendererText();
684 // set gobject values
687 // user defined functions
689 public class Xcls_default_directory_menu : Object
692 private ValaProjectSettings _this;
698 public Xcls_default_directory_menu(ValaProjectSettings _owner )
701 _this.default_directory_menu = this;
702 this.el = new Gtk.Menu();
706 // set gobject values
707 var child_0 = new Xcls_MenuItem23( _this );
709 this.el.add ( child_0.el );
710 var child_1 = new Xcls_MenuItem24( _this );
712 this.el.add ( child_1.el );
713 var child_2 = new Xcls_SeparatorMenuItem25( _this );
715 this.el.add ( child_2.el );
716 var child_3 = new Xcls_MenuItem26( _this );
718 this.el.add ( child_3.el );
721 // user defined functions
723 public class Xcls_MenuItem23 : Object
725 public Gtk.MenuItem el;
726 private ValaProjectSettings _this;
732 public Xcls_MenuItem23(ValaProjectSettings _owner )
735 this.el = new Gtk.MenuItem();
739 // set gobject values
740 this.el.label = "Add Directory";
743 this.el.activate.connect( () => {
745 var chooser = new Gtk.FileChooserDialog (
746 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
748 Gtk.ResponseType.CANCEL,
750 Gtk.ResponseType.ACCEPT);
751 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
756 // add the directory..
757 var fn = _this.project.relPath(chooser.get_filename());
758 _this.project.compilegroups.get("_default_").sources.add(fn);
759 _this.default_directory_tree_store.load();
763 // user defined functions
765 public class Xcls_MenuItem24 : Object
767 public Gtk.MenuItem el;
768 private ValaProjectSettings _this;
774 public Xcls_MenuItem24(ValaProjectSettings _owner )
777 this.el = new Gtk.MenuItem();
781 // set gobject values
782 this.el.label = "Add File";
785 this.el.activate.connect( () => {
787 var chooser = new Gtk.FileChooserDialog (
788 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
790 Gtk.ResponseType.CANCEL,
792 Gtk.ResponseType.ACCEPT);
793 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
798 // add the directory..
799 var fn = _this.project.relPath(chooser.get_filename());
800 _this.project.compilegroups.get("_default_").sources.add(fn);
801 _this.default_directory_tree_store.load();
805 // user defined functions
807 public class Xcls_SeparatorMenuItem25 : Object
809 public Gtk.SeparatorMenuItem el;
810 private ValaProjectSettings _this;
816 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
819 this.el = new Gtk.SeparatorMenuItem();
823 // set gobject values
826 // user defined functions
828 public class Xcls_MenuItem26 : Object
830 public Gtk.MenuItem el;
831 private ValaProjectSettings _this;
837 public Xcls_MenuItem26(ValaProjectSettings _owner )
840 this.el = new Gtk.MenuItem();
844 // set gobject values
845 this.el.label = "Remove File/Directory";
848 this.el.activate.connect( () => {
853 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
854 print("nothing selected\n");
859 // add the directory..
863 mod.get_value(iter,0, out val);
864 var fn = (string) val;
866 print("remove: %s\n", fn);
867 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
868 print("remove failed");
870 _this.default_directory_tree_store.load();
874 // user defined functions
876 public class Xcls_HPaned27 : Object
878 public Gtk.HPaned el;
879 private ValaProjectSettings _this;
885 public Xcls_HPaned27(ValaProjectSettings _owner )
888 this.el = new Gtk.HPaned();
892 // set gobject values
893 this.el.position = 300;
894 var child_0 = new Xcls_ScrolledWindow28( _this );
896 this.el.add1 ( child_0.el );
897 var child_1 = new Xcls_set_vbox( _this );
899 this.el.add2 ( child_1.el );
902 // user defined functions
904 public class Xcls_ScrolledWindow28 : Object
906 public Gtk.ScrolledWindow el;
907 private ValaProjectSettings _this;
913 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
916 this.el = new Gtk.ScrolledWindow( null, null );
920 // set gobject values
921 var child_0 = new Xcls_targets_tree_menu( _this );
923 this.el.add ( child_0.el );
924 var child_1 = new Xcls_targets_tree( _this );
926 this.el.add ( child_1.el );
931 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
935 // user defined functions
937 public class Xcls_targets_tree_menu : Object
940 private ValaProjectSettings _this;
946 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
949 _this.targets_tree_menu = this;
950 this.el = new Gtk.Menu();
954 // set gobject values
955 var child_0 = new Xcls_MenuItem30( _this );
957 this.el.add ( child_0.el );
958 var child_1 = new Xcls_SeparatorMenuItem31( _this );
960 this.el.add ( child_1.el );
961 var child_2 = new Xcls_MenuItem32( _this );
963 this.el.add ( child_2.el );
966 // user defined functions
968 public class Xcls_MenuItem30 : Object
970 public Gtk.MenuItem el;
971 private ValaProjectSettings _this;
977 public Xcls_MenuItem30(ValaProjectSettings _owner )
980 this.el = new Gtk.MenuItem();
984 // set gobject values
985 this.el.label = "Add Compile Target";
988 this.el.activate.connect( () => {
990 if (_this.project.compilegroups.has_key("NEW GROUP")) {
994 // add the directory..
996 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
997 _this.targets_tree_store.load();
1001 // user defined functions
1003 public class Xcls_SeparatorMenuItem31 : Object
1005 public Gtk.SeparatorMenuItem el;
1006 private ValaProjectSettings _this;
1012 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1015 this.el = new Gtk.SeparatorMenuItem();
1019 // set gobject values
1022 // user defined functions
1024 public class Xcls_MenuItem32 : Object
1026 public Gtk.MenuItem el;
1027 private ValaProjectSettings _this;
1033 public Xcls_MenuItem32(ValaProjectSettings _owner )
1036 this.el = new Gtk.MenuItem();
1040 // set gobject values
1041 this.el.label = "Remove Target";
1044 this.el.activate.connect( () => {
1049 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1050 print("nothing selected\n");
1055 // add the directory..
1059 mod.get_value(iter,0, out val);
1060 var fn = (string) val;
1062 print("remove: %s\n", fn);
1063 if (!_this.project.compilegroups.unset(fn)) {
1064 print("remove failed");
1066 _this.targets_tree_store.load();
1070 // user defined functions
1072 public class Xcls_targets_tree : Object
1074 public Gtk.TreeView el;
1075 private ValaProjectSettings _this;
1079 public string cursor;
1082 public Xcls_targets_tree(ValaProjectSettings _owner )
1085 _this.targets_tree = this;
1086 this.el = new Gtk.TreeView();
1090 // set gobject values
1091 var child_0 = new Xcls_targets_tree_store( _this );
1093 this.el.set_model ( child_0.el );
1094 var child_1 = new Xcls_TreeViewColumn35( _this );
1096 this.el.append_column ( child_1.el );
1099 this.el.button_press_event.connect( ( ev) => {
1100 //console.log("button press?");
1103 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1104 //print("click" + ev.type);
1108 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1112 // this.el.get_selection().select_path(res);
1114 //if (!this.get('/LeftTreeMenu').el) {
1115 // this.get('/LeftTreeMenu').init();
1118 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1119 _this.targets_tree_menu.el.show_all();
1120 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1121 // print("click:" + res.path.to_string());
1124 this.el.cursor_changed.connect( ( ) => {
1126 if (this.cursor != "") {
1127 // save the values..
1130 // load the new values.
1135 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1136 print("nothing selected\n");
1141 // add the directory..
1145 mod.get_value(iter,0, out val);
1146 var fn = (string) val;
1149 var cg = _this.project.compilegroups.get(fn);
1150 _this.build_pack_target.el.set_text(cg.target_bin);
1151 _this.build_compile_flags.el.set_text(cg.compile_flags);
1158 // user defined functions
1160 public class Xcls_targets_tree_store : Object
1162 public Gtk.ListStore el;
1163 private ValaProjectSettings _this;
1169 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1172 _this.targets_tree_store = this;
1173 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1174 typeof(string) // ??
1179 // set gobject values
1182 // user defined functions
1183 public void load () {
1188 var cg = _this.project.compilegroups;
1190 _this.targets_tree.cursor = "";
1192 var iter = cg.map_iterator();
1193 while(iter.next()) {
1194 var key = iter.get_key();
1195 if (key == "_default_") {
1199 this.el.append(out citer);
1201 this.el.set_value(citer, 0, key ); // title
1202 //this.el.set_value(citer, 1, items.get(i) );
1204 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1208 public class Xcls_TreeViewColumn35 : Object
1210 public Gtk.TreeViewColumn el;
1211 private ValaProjectSettings _this;
1217 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1220 this.el = new Gtk.TreeViewColumn();
1224 // set gobject values
1225 this.el.title = "name";
1226 this.el.resizable = true;
1227 var child_0 = new Xcls_targets_render( _this );
1229 this.el.pack_start ( child_0.el , false );
1234 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1237 // user defined functions
1239 public class Xcls_targets_render : Object
1241 public Gtk.CellRendererText el;
1242 private ValaProjectSettings _this;
1248 public Xcls_targets_render(ValaProjectSettings _owner )
1251 _this.targets_render = this;
1252 this.el = new Gtk.CellRendererText();
1256 // set gobject values
1257 this.el.editable = true;
1260 this.el.edited.connect( (path, newtext) => {
1263 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1265 _this.targets_tree_store.el.get_value(iter,0, out gval);
1266 var oldval = (string)gval;
1267 if (oldval == newtext) {
1270 var cg = _this.project.compilegroups.get(oldval);
1272 _this.project.compilegroups.unset(oldval);
1273 _this.project.compilegroups.set(newtext, cg);
1274 _this.targets_tree_store.load();
1278 // user defined functions
1280 public class Xcls_set_vbox : Object
1283 private ValaProjectSettings _this;
1289 public Xcls_set_vbox(ValaProjectSettings _owner )
1292 this.el = new Gtk.VBox( false, 0 );
1296 // set gobject values
1297 var child_0 = new Xcls_Label38( _this );
1299 this.el.pack_start ( child_0.el , false,false,0 );
1300 var child_1 = new Xcls_build_pack_target( _this );
1302 this.el.pack_start ( child_1.el , false,false,0 );
1303 var child_2 = new Xcls_Label40( _this );
1305 this.el.pack_start ( child_2.el , false,false,0 );
1306 var child_3 = new Xcls_build_compile_flags( _this );
1308 this.el.pack_start ( child_3.el , false,false,0 );
1309 var child_4 = new Xcls_Label42( _this );
1311 this.el.pack_start ( child_4.el , false,false,0 );
1312 var child_5 = new Xcls_ScrolledWindow43( _this );
1314 this.el.pack_start ( child_5.el , true,true,0 );
1317 // user defined functions
1319 public class Xcls_Label38 : Object
1321 public Gtk.Label el;
1322 private ValaProjectSettings _this;
1328 public Xcls_Label38(ValaProjectSettings _owner )
1331 this.el = new Gtk.Label( "target filename" );
1335 // set gobject values
1338 // user defined functions
1340 public class Xcls_build_pack_target : Object
1342 public Gtk.Entry el;
1343 private ValaProjectSettings _this;
1349 public Xcls_build_pack_target(ValaProjectSettings _owner )
1352 _this.build_pack_target = this;
1353 this.el = new Gtk.Entry();
1357 // set gobject values
1360 this.el.changed.connect( () => {
1361 if (_this.targets_tree.cursor.length < 1) {
1364 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1368 // user defined functions
1370 public class Xcls_Label40 : Object
1372 public Gtk.Label el;
1373 private ValaProjectSettings _this;
1379 public Xcls_Label40(ValaProjectSettings _owner )
1382 this.el = new Gtk.Label( "compile flags" );
1386 // set gobject values
1389 // user defined functions
1391 public class Xcls_build_compile_flags : Object
1393 public Gtk.Entry el;
1394 private ValaProjectSettings _this;
1400 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1403 _this.build_compile_flags = this;
1404 this.el = new Gtk.Entry();
1408 // set gobject values
1411 this.el.changed.connect( () => {
1412 if (_this.targets_tree.cursor.length < 1) {
1415 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1419 // user defined functions
1421 public class Xcls_Label42 : Object
1423 public Gtk.Label el;
1424 private ValaProjectSettings _this;
1430 public Xcls_Label42(ValaProjectSettings _owner )
1433 this.el = new Gtk.Label( "Files to compile" );
1437 // set gobject values
1440 // user defined functions
1442 public class Xcls_ScrolledWindow43 : Object
1444 public Gtk.ScrolledWindow el;
1445 private ValaProjectSettings _this;
1451 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1454 this.el = new Gtk.ScrolledWindow( null, null );
1458 // set gobject values
1459 var child_0 = new Xcls_files_tree( _this );
1463 // user defined functions
1465 public class Xcls_files_tree : Object
1467 public Gtk.TreeView el;
1468 private ValaProjectSettings _this;
1474 public Xcls_files_tree(ValaProjectSettings _owner )
1477 this.el = new Gtk.TreeView();
1481 // set gobject values
1482 var child_0 = new Xcls_files_tree_store( _this );
1484 this.el.set_model ( child_0.el );
1485 var child_1 = new Xcls_TreeViewColumn46( _this );
1487 this.el.append_column ( child_1.el );
1488 var child_2 = new Xcls_TreeViewColumn48( _this );
1490 this.el.append_column ( child_2.el );
1493 // user defined functions
1495 public class Xcls_files_tree_store : Object
1497 public Gtk.ListStore el;
1498 private ValaProjectSettings _this;
1504 public Xcls_files_tree_store(ValaProjectSettings _owner )
1507 _this.files_tree_store = this;
1508 this.el = new Gtk.ListStore( 3, typeof(string), // 0 file name
1509 typeof(string), // type (dir orfile)
1510 typeof(bool) // is checked.
1515 // set gobject values
1518 // user defined functions
1519 public void load () {
1524 var def = _this.project.compilegroups.get("_default_");
1525 var items = def.sources;
1530 for(var i =0 ; i < items.size; i++) {
1531 this.el.append(out citer);
1533 this.el.set_value(citer, 0, items.get(i) ); // title
1534 this.el.set_value(citer, 1, "dir"); // type
1535 this.el.set_value(citer, 2, false ); // checked
1537 var files = def.files(items.get(i));
1539 for(var j =0 ; j < files.size; j++) {
1540 this.el.append(out citer);
1542 this.el.set_value(citer, 0, files.get(j) ); // title
1543 this.el.set_value(citer, 1, "file"); // type
1544 this.el.set_value(citer, 2, false ); // checked
1549 //this.el.set_value(citer, 1, items.get(i) );
1551 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1555 public class Xcls_TreeViewColumn46 : Object
1557 public Gtk.TreeViewColumn el;
1558 private ValaProjectSettings _this;
1564 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1567 this.el = new Gtk.TreeViewColumn();
1571 // set gobject values
1572 this.el.title = "name";
1573 this.el.resizable = true;
1574 var child_0 = new Xcls_files_render( _this );
1576 this.el.pack_start ( child_0.el , false );
1580 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1581 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1583 // user defined functions
1585 public class Xcls_files_render : Object
1587 public Gtk.CellRendererText el;
1588 private ValaProjectSettings _this;
1594 public Xcls_files_render(ValaProjectSettings _owner )
1597 _this.files_render = this;
1598 this.el = new Gtk.CellRendererText();
1602 // set gobject values
1605 // user defined functions
1607 public class Xcls_TreeViewColumn48 : Object
1609 public Gtk.TreeViewColumn el;
1610 private ValaProjectSettings _this;
1616 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1619 this.el = new Gtk.TreeViewColumn();
1623 // set gobject values
1624 this.el.title = "use";
1625 this.el.resizable = false;
1626 this.el.fixed_width = 50;
1627 var child_0 = new Xcls_files_render_use( _this );
1629 this.el.pack_start ( child_0.el , false );
1635 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1639 // user defined functions
1641 public class Xcls_files_render_use : Object
1643 public Gtk.CellRendererToggle el;
1644 private ValaProjectSettings _this;
1650 public Xcls_files_render_use(ValaProjectSettings _owner )
1653 _this.files_render_use = this;
1654 this.el = new Gtk.CellRendererToggle();
1658 // set gobject values
1659 this.el.activatable = true;
1662 this.el.toggled.connect( ( path_string) => {
1663 var m = _this.default_packages_tree_store.el;
1665 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1666 m.get_iter (out iter, path);
1668 m.get_value(iter, 1, out val);
1669 m.set_value(iter, 1, ((bool) val) ? false :true);
1671 m.get_value(iter, 0, out fval);
1672 var fn = (string)fval;
1674 var def = _this.project.compilegroups.get("_default_");
1675 var items = def.packages;
1686 // user defined functions