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 = "";
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();
77 public class Xcls_Notebook2 : Object
79 public Gtk.Notebook el;
80 private ValaProjectSettings _this;
86 public Xcls_Notebook2(ValaProjectSettings _owner )
89 this.el = new Gtk.Notebook();
94 var child_0 = new Xcls_label_global( _this );
96 var child_1 = new Xcls_label_targets( _this );
98 var child_2 = new Xcls_VBox5( _this );
100 this.el.append_page ( child_2.el , _this.label_global.el );
101 var child_3 = new Xcls_HPaned27( _this );
103 this.el.append_page ( child_3.el , _this.label_targets.el );
106 // user defined functions
108 public class Xcls_label_global : Object
111 private ValaProjectSettings _this;
117 public Xcls_label_global(ValaProjectSettings _owner )
120 _this.label_global = this;
121 this.el = new Gtk.Label( "Global" );
125 // set gobject values
128 // user defined functions
130 public class Xcls_label_targets : Object
133 private ValaProjectSettings _this;
139 public Xcls_label_targets(ValaProjectSettings _owner )
142 _this.label_targets = this;
143 this.el = new Gtk.Label( "Targets" );
147 // set gobject values
150 // user defined functions
152 public class Xcls_VBox5 : Object
155 private ValaProjectSettings _this;
161 public Xcls_VBox5(ValaProjectSettings _owner )
164 this.el = new Gtk.VBox( false, 0 );
168 // set gobject values
169 var child_0 = new Xcls_Label6( _this );
171 this.el.pack_start ( child_0.el , false,false,0 );
172 var child_1 = new Xcls_compile_flags( _this );
174 this.el.pack_start ( child_1.el , false,false,0 );
175 var child_2 = new Xcls_Label8( _this );
177 this.el.pack_start ( child_2.el , false,false,0 );
178 var child_3 = new Xcls_ScrolledWindow9( _this );
180 this.el.pack_start ( child_3.el , true,true,0 );
181 var child_4 = new Xcls_Label16( _this );
183 this.el.pack_start ( child_4.el , false,false,0 );
184 var child_5 = new Xcls_ScrolledWindow17( _this );
186 this.el.pack_start ( child_5.el , true,true,0 );
189 // user defined functions
191 public class Xcls_Label6 : Object
194 private ValaProjectSettings _this;
200 public Xcls_Label6(ValaProjectSettings _owner )
203 this.el = new Gtk.Label( "compile flags" );
207 // set gobject values
210 // user defined functions
212 public class Xcls_compile_flags : Object
215 private ValaProjectSettings _this;
221 public Xcls_compile_flags(ValaProjectSettings _owner )
224 _this.compile_flags = this;
225 this.el = new Gtk.Entry();
229 // set gobject values
232 this.el.changed.connect( () => {
234 _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
235 _this.project.writeConfig();
236 // _this.project.save();
241 // user defined functions
243 public class Xcls_Label8 : Object
246 private ValaProjectSettings _this;
252 public Xcls_Label8(ValaProjectSettings _owner )
255 this.el = new Gtk.Label( "packages" );
259 // set gobject values
262 // user defined functions
264 public class Xcls_ScrolledWindow9 : Object
266 public Gtk.ScrolledWindow el;
267 private ValaProjectSettings _this;
273 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
276 this.el = new Gtk.ScrolledWindow( null, null );
280 // set gobject values
281 var child_0 = new Xcls_default_packages_tree( _this );
283 this.el.add ( child_0.el );
286 // user defined functions
288 public class Xcls_default_packages_tree : Object
290 public Gtk.TreeView el;
291 private ValaProjectSettings _this;
297 public Xcls_default_packages_tree(ValaProjectSettings _owner )
300 this.el = new Gtk.TreeView();
304 // set gobject values
305 this.el.headers_visible = false;
306 var child_0 = new Xcls_default_packages_tree_store( _this );
308 this.el.set_model ( child_0.el );
309 var child_1 = new Xcls_TreeViewColumn12( _this );
311 this.el.append_column ( child_1.el );
312 var child_2 = new Xcls_TreeViewColumn14( _this );
314 this.el.append_column ( child_2.el );
317 // user defined functions
319 public class Xcls_default_packages_tree_store : Object
321 public Gtk.ListStore el;
322 private ValaProjectSettings _this;
328 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
331 _this.default_packages_tree_store = this;
332 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
337 // set gobject values
340 // user defined functions
341 public void load () {
343 var def = _this.project.compilegroups.get("_default_");
344 var items = def.packages;
347 var pal = (Palete.Gtk) Palete.factory("Gtk");
348 var pkgs = pal.packages();
349 print("ValaProjectSettings:packages load %d\n", pkgs.size);
353 for(var i =0 ; i < pkgs.size; i++) {
354 this.el.append(out citer);
356 this.el.set_value(citer, 0, pkgs.get(i) ); // title
357 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
359 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
363 public class Xcls_TreeViewColumn12 : Object
365 public Gtk.TreeViewColumn el;
366 private ValaProjectSettings _this;
372 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
375 this.el = new Gtk.TreeViewColumn();
379 // set gobject values
380 this.el.title = "name";
381 this.el.expand = true;
382 this.el.resizable = true;
383 var child_0 = new Xcls_packages_render( _this );
385 this.el.pack_start ( child_0.el , false );
389 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
391 // user defined functions
393 public class Xcls_packages_render : Object
395 public Gtk.CellRendererText el;
396 private ValaProjectSettings _this;
402 public Xcls_packages_render(ValaProjectSettings _owner )
405 _this.packages_render = this;
406 this.el = new Gtk.CellRendererText();
410 // set gobject values
413 // user defined functions
415 public class Xcls_TreeViewColumn14 : Object
417 public Gtk.TreeViewColumn el;
418 private ValaProjectSettings _this;
424 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
427 this.el = new Gtk.TreeViewColumn();
431 // set gobject values
432 this.el.title = "use";
433 this.el.resizable = false;
434 this.el.fixed_width = 50;
435 var child_0 = new Xcls_packages_render_use( _this );
437 this.el.pack_start ( child_0.el , false );
442 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
445 // user defined functions
447 public class Xcls_packages_render_use : Object
449 public Gtk.CellRendererToggle el;
450 private ValaProjectSettings _this;
456 public Xcls_packages_render_use(ValaProjectSettings _owner )
459 _this.packages_render_use = this;
460 this.el = new Gtk.CellRendererToggle();
464 // set gobject values
465 this.el.activatable = true;
468 this.el.toggled.connect( ( path_string) => {
469 var m = _this.default_packages_tree_store.el;
471 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
472 m.get_iter (out iter, path);
474 m.get_value(iter, 1, out val);
475 m.set_value(iter, 1, ((bool) val) ? false :true);
477 m.get_value(iter, 0, out fval);
478 var fn = (string)fval;
480 var def = _this.project.compilegroups.get("_default_");
481 var items = def.packages;
492 // user defined functions
494 public class Xcls_Label16 : Object
497 private ValaProjectSettings _this;
503 public Xcls_Label16(ValaProjectSettings _owner )
506 this.el = new Gtk.Label( "Available Directories" );
510 // set gobject values
513 // user defined functions
515 public class Xcls_ScrolledWindow17 : Object
517 public Gtk.ScrolledWindow el;
518 private ValaProjectSettings _this;
524 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
527 this.el = new Gtk.ScrolledWindow( null, null );
531 // set gobject values
532 var child_0 = new Xcls_default_directory_tree( _this );
534 this.el.add ( child_0.el );
535 var child_1 = new Xcls_default_directory_menu( _this );
539 // user defined functions
541 public class Xcls_default_directory_tree : Object
543 public Gtk.TreeView el;
544 private ValaProjectSettings _this;
550 public Xcls_default_directory_tree(ValaProjectSettings _owner )
553 _this.default_directory_tree = this;
554 this.el = new Gtk.TreeView();
558 // set gobject values
559 this.el.headers_visible = false;
560 var child_0 = new Xcls_default_directory_tree_store( _this );
562 this.el.set_model ( child_0.el );
563 var child_1 = new Xcls_TreeViewColumn20( _this );
565 this.el.append_column ( child_1.el );
568 this.el.button_press_event.connect( ( ev) => {
569 //console.log("button press?");
572 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
573 //print("click" + ev.type);
577 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
581 // this.el.get_selection().select_path(res);
583 //if (!this.get('/LeftTreeMenu').el) {
584 // this.get('/LeftTreeMenu').init();
587 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
588 _this.default_directory_menu.el.show_all();
589 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
590 // print("click:" + res.path.to_string());
595 // user defined functions
597 public class Xcls_default_directory_tree_store : Object
599 public Gtk.ListStore el;
600 private ValaProjectSettings _this;
606 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
609 _this.default_directory_tree_store = this;
610 this.el = new Gtk.ListStore( 1, typeof(string)
615 // set gobject values
618 // user defined functions
619 public void load () {
624 var def = _this.project.compilegroups.get("_default_");
625 var items = def.sources;
630 for(var i =0 ; i < items.size; i++) {
631 this.el.append(out citer);
633 this.el.set_value(citer, 0, items.get(i) ); // title
634 //this.el.set_value(citer, 1, items.get(i) );
636 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
640 public class Xcls_TreeViewColumn20 : Object
642 public Gtk.TreeViewColumn el;
643 private ValaProjectSettings _this;
649 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
652 this.el = new Gtk.TreeViewColumn();
656 // set gobject values
657 this.el.title = "name";
658 this.el.resizable = true;
659 var child_0 = new Xcls_directory_render( _this );
661 this.el.pack_start ( child_0.el , false );
665 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
667 // user defined functions
669 public class Xcls_directory_render : Object
671 public Gtk.CellRendererText el;
672 private ValaProjectSettings _this;
678 public Xcls_directory_render(ValaProjectSettings _owner )
681 _this.directory_render = this;
682 this.el = new Gtk.CellRendererText();
686 // set gobject values
689 // user defined functions
691 public class Xcls_default_directory_menu : Object
694 private ValaProjectSettings _this;
700 public Xcls_default_directory_menu(ValaProjectSettings _owner )
703 _this.default_directory_menu = this;
704 this.el = new Gtk.Menu();
708 // set gobject values
709 var child_0 = new Xcls_MenuItem23( _this );
711 this.el.add ( child_0.el );
712 var child_1 = new Xcls_MenuItem24( _this );
714 this.el.add ( child_1.el );
715 var child_2 = new Xcls_SeparatorMenuItem25( _this );
717 this.el.add ( child_2.el );
718 var child_3 = new Xcls_MenuItem26( _this );
720 this.el.add ( child_3.el );
723 // user defined functions
725 public class Xcls_MenuItem23 : Object
727 public Gtk.MenuItem el;
728 private ValaProjectSettings _this;
734 public Xcls_MenuItem23(ValaProjectSettings _owner )
737 this.el = new Gtk.MenuItem();
741 // set gobject values
742 this.el.label = "Add Directory";
745 this.el.activate.connect( () => {
747 var chooser = new Gtk.FileChooserDialog (
748 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
750 Gtk.ResponseType.CANCEL,
752 Gtk.ResponseType.ACCEPT);
753 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
758 // add the directory..
759 var fn = _this.project.relPath(chooser.get_filename());
760 _this.project.compilegroups.get("_default_").sources.add(fn);
761 _this.default_directory_tree_store.load();
765 // user defined functions
767 public class Xcls_MenuItem24 : Object
769 public Gtk.MenuItem el;
770 private ValaProjectSettings _this;
776 public Xcls_MenuItem24(ValaProjectSettings _owner )
779 this.el = new Gtk.MenuItem();
783 // set gobject values
784 this.el.label = "Add File";
787 this.el.activate.connect( () => {
789 var chooser = new Gtk.FileChooserDialog (
790 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
792 Gtk.ResponseType.CANCEL,
794 Gtk.ResponseType.ACCEPT);
795 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
800 // add the directory..
801 var fn = _this.project.relPath(chooser.get_filename());
802 _this.project.compilegroups.get("_default_").sources.add(fn);
803 _this.default_directory_tree_store.load();
807 // user defined functions
809 public class Xcls_SeparatorMenuItem25 : Object
811 public Gtk.SeparatorMenuItem el;
812 private ValaProjectSettings _this;
818 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
821 this.el = new Gtk.SeparatorMenuItem();
825 // set gobject values
828 // user defined functions
830 public class Xcls_MenuItem26 : Object
832 public Gtk.MenuItem el;
833 private ValaProjectSettings _this;
839 public Xcls_MenuItem26(ValaProjectSettings _owner )
842 this.el = new Gtk.MenuItem();
846 // set gobject values
847 this.el.label = "Remove File/Directory";
850 this.el.activate.connect( () => {
855 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
856 print("nothing selected\n");
861 // add the directory..
865 mod.get_value(iter,0, out val);
866 var fn = (string) val;
868 print("remove: %s\n", fn);
869 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
870 print("remove failed");
872 _this.default_directory_tree_store.load();
876 // user defined functions
878 public class Xcls_HPaned27 : Object
880 public Gtk.HPaned el;
881 private ValaProjectSettings _this;
887 public Xcls_HPaned27(ValaProjectSettings _owner )
890 this.el = new Gtk.HPaned();
894 // set gobject values
895 this.el.position = 300;
896 var child_0 = new Xcls_ScrolledWindow28( _this );
898 this.el.add1 ( child_0.el );
899 var child_1 = new Xcls_set_vbox( _this );
901 this.el.add2 ( child_1.el );
904 // user defined functions
906 public class Xcls_ScrolledWindow28 : Object
908 public Gtk.ScrolledWindow el;
909 private ValaProjectSettings _this;
915 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
918 this.el = new Gtk.ScrolledWindow( null, null );
922 // set gobject values
923 var child_0 = new Xcls_targets_tree_menu( _this );
925 this.el.add ( child_0.el );
926 var child_1 = new Xcls_targets_tree( _this );
928 this.el.add ( child_1.el );
933 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
937 // user defined functions
939 public class Xcls_targets_tree_menu : Object
942 private ValaProjectSettings _this;
948 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
951 _this.targets_tree_menu = this;
952 this.el = new Gtk.Menu();
956 // set gobject values
957 var child_0 = new Xcls_MenuItem30( _this );
959 this.el.add ( child_0.el );
960 var child_1 = new Xcls_SeparatorMenuItem31( _this );
962 this.el.add ( child_1.el );
963 var child_2 = new Xcls_MenuItem32( _this );
965 this.el.add ( child_2.el );
968 // user defined functions
970 public class Xcls_MenuItem30 : Object
972 public Gtk.MenuItem el;
973 private ValaProjectSettings _this;
979 public Xcls_MenuItem30(ValaProjectSettings _owner )
982 this.el = new Gtk.MenuItem();
986 // set gobject values
987 this.el.label = "Add Compile Target";
990 this.el.activate.connect( () => {
992 if (_this.project.compilegroups.has_key("NEW GROUP")) {
996 // add the directory..
998 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
999 _this.targets_tree_store.load();
1003 // user defined functions
1005 public class Xcls_SeparatorMenuItem31 : Object
1007 public Gtk.SeparatorMenuItem el;
1008 private ValaProjectSettings _this;
1014 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1017 this.el = new Gtk.SeparatorMenuItem();
1021 // set gobject values
1024 // user defined functions
1026 public class Xcls_MenuItem32 : Object
1028 public Gtk.MenuItem el;
1029 private ValaProjectSettings _this;
1035 public Xcls_MenuItem32(ValaProjectSettings _owner )
1038 this.el = new Gtk.MenuItem();
1042 // set gobject values
1043 this.el.label = "Remove Target";
1046 this.el.activate.connect( () => {
1051 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1052 print("nothing selected\n");
1057 // add the directory..
1061 mod.get_value(iter,0, out val);
1062 var fn = (string) val;
1064 print("remove: %s\n", fn);
1065 if (!_this.project.compilegroups.unset(fn)) {
1066 print("remove failed");
1068 _this.targets_tree_store.load();
1072 // user defined functions
1074 public class Xcls_targets_tree : Object
1076 public Gtk.TreeView el;
1077 private ValaProjectSettings _this;
1081 public string cursor;
1084 public Xcls_targets_tree(ValaProjectSettings _owner )
1087 _this.targets_tree = this;
1088 this.el = new Gtk.TreeView();
1092 // set gobject values
1093 var child_0 = new Xcls_targets_tree_store( _this );
1095 this.el.set_model ( child_0.el );
1096 var child_1 = new Xcls_TreeViewColumn35( _this );
1098 this.el.append_column ( child_1.el );
1101 this.el.button_press_event.connect( ( ev) => {
1102 //console.log("button press?");
1105 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1106 //print("click" + ev.type);
1110 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1114 // this.el.get_selection().select_path(res);
1116 //if (!this.get('/LeftTreeMenu').el) {
1117 // this.get('/LeftTreeMenu').init();
1120 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1121 _this.targets_tree_menu.el.show_all();
1122 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1123 // print("click:" + res.path.to_string());
1126 this.el.cursor_changed.connect( ( ) => {
1128 if (this.cursor != "") {
1129 // save the values..
1132 // load the new values.
1137 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1138 print("nothing selected\n");
1143 // add the directory..
1147 mod.get_value(iter,0, out val);
1148 var fn = (string) val;
1151 var cg = _this.project.compilegroups.get(fn);
1152 _this.build_pack_target.el.set_text(cg.target_bin);
1153 _this.build_compile_flags.el.set_text(cg.compile_flags);
1160 // user defined functions
1162 public class Xcls_targets_tree_store : Object
1164 public Gtk.ListStore el;
1165 private ValaProjectSettings _this;
1171 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1174 _this.targets_tree_store = this;
1175 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1176 typeof(string) // ??
1181 // set gobject values
1184 // user defined functions
1185 public void load () {
1190 var cg = _this.project.compilegroups;
1192 _this.targets_tree.cursor = "";
1194 var iter = cg.map_iterator();
1195 while(iter.next()) {
1196 var key = iter.get_key();
1197 if (key == "_default_") {
1201 this.el.append(out citer);
1203 this.el.set_value(citer, 0, key ); // title
1204 //this.el.set_value(citer, 1, items.get(i) );
1206 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1210 public class Xcls_TreeViewColumn35 : Object
1212 public Gtk.TreeViewColumn el;
1213 private ValaProjectSettings _this;
1219 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1222 this.el = new Gtk.TreeViewColumn();
1226 // set gobject values
1227 this.el.title = "name";
1228 this.el.resizable = true;
1229 var child_0 = new Xcls_targets_render( _this );
1231 this.el.pack_start ( child_0.el , false );
1236 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1239 // user defined functions
1241 public class Xcls_targets_render : Object
1243 public Gtk.CellRendererText el;
1244 private ValaProjectSettings _this;
1250 public Xcls_targets_render(ValaProjectSettings _owner )
1253 _this.targets_render = this;
1254 this.el = new Gtk.CellRendererText();
1258 // set gobject values
1259 this.el.editable = true;
1262 this.el.edited.connect( (path, newtext) => {
1265 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1267 _this.targets_tree_store.el.get_value(iter,0, out gval);
1268 var oldval = (string)gval;
1269 if (oldval == newtext) {
1272 var cg = _this.project.compilegroups.get(oldval);
1274 _this.project.compilegroups.unset(oldval);
1275 _this.project.compilegroups.set(newtext, cg);
1276 _this.targets_tree_store.load();
1280 // user defined functions
1282 public class Xcls_set_vbox : Object
1285 private ValaProjectSettings _this;
1291 public Xcls_set_vbox(ValaProjectSettings _owner )
1294 this.el = new Gtk.VBox( false, 0 );
1298 // set gobject values
1299 var child_0 = new Xcls_Label38( _this );
1301 this.el.pack_start ( child_0.el , false,false,0 );
1302 var child_1 = new Xcls_build_pack_target( _this );
1304 this.el.pack_start ( child_1.el , false,false,0 );
1305 var child_2 = new Xcls_Label40( _this );
1307 this.el.pack_start ( child_2.el , false,false,0 );
1308 var child_3 = new Xcls_build_compile_flags( _this );
1310 this.el.pack_start ( child_3.el , false,false,0 );
1311 var child_4 = new Xcls_Label42( _this );
1313 this.el.pack_start ( child_4.el , false,false,0 );
1314 var child_5 = new Xcls_ScrolledWindow43( _this );
1316 this.el.pack_start ( child_5.el , true,true,0 );
1319 // user defined functions
1321 public class Xcls_Label38 : Object
1323 public Gtk.Label el;
1324 private ValaProjectSettings _this;
1330 public Xcls_Label38(ValaProjectSettings _owner )
1333 this.el = new Gtk.Label( "target filename" );
1337 // set gobject values
1340 // user defined functions
1342 public class Xcls_build_pack_target : Object
1344 public Gtk.Entry el;
1345 private ValaProjectSettings _this;
1351 public Xcls_build_pack_target(ValaProjectSettings _owner )
1354 _this.build_pack_target = this;
1355 this.el = new Gtk.Entry();
1359 // set gobject values
1362 this.el.changed.connect( () => {
1363 if (_this.targets_tree.cursor.length < 1) {
1366 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1370 // user defined functions
1372 public class Xcls_Label40 : Object
1374 public Gtk.Label el;
1375 private ValaProjectSettings _this;
1381 public Xcls_Label40(ValaProjectSettings _owner )
1384 this.el = new Gtk.Label( "compile flags" );
1388 // set gobject values
1391 // user defined functions
1393 public class Xcls_build_compile_flags : Object
1395 public Gtk.Entry el;
1396 private ValaProjectSettings _this;
1402 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1405 _this.build_compile_flags = this;
1406 this.el = new Gtk.Entry();
1410 // set gobject values
1413 this.el.changed.connect( () => {
1414 if (_this.targets_tree.cursor.length < 1) {
1417 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1421 // user defined functions
1423 public class Xcls_Label42 : Object
1425 public Gtk.Label el;
1426 private ValaProjectSettings _this;
1432 public Xcls_Label42(ValaProjectSettings _owner )
1435 this.el = new Gtk.Label( "Files to compile" );
1439 // set gobject values
1442 // user defined functions
1444 public class Xcls_ScrolledWindow43 : Object
1446 public Gtk.ScrolledWindow el;
1447 private ValaProjectSettings _this;
1453 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1456 this.el = new Gtk.ScrolledWindow( null, null );
1460 // set gobject values
1461 var child_0 = new Xcls_files_tree( _this );
1465 // user defined functions
1467 public class Xcls_files_tree : Object
1469 public Gtk.TreeView el;
1470 private ValaProjectSettings _this;
1476 public Xcls_files_tree(ValaProjectSettings _owner )
1479 this.el = new Gtk.TreeView();
1483 // set gobject values
1484 var child_0 = new Xcls_files_tree_store( _this );
1486 this.el.set_model ( child_0.el );
1487 var child_1 = new Xcls_TreeViewColumn46( _this );
1489 this.el.append_column ( child_1.el );
1490 var child_2 = new Xcls_TreeViewColumn48( _this );
1492 this.el.append_column ( child_2.el );
1495 // user defined functions
1497 public class Xcls_files_tree_store : Object
1499 public Gtk.ListStore el;
1500 private ValaProjectSettings _this;
1506 public Xcls_files_tree_store(ValaProjectSettings _owner )
1509 _this.files_tree_store = this;
1510 this.el = new Gtk.ListStore( 2, typeof(string), // 0 file name
1511 typeof(string), // type (dir orfile)
1512 typeof(bool) // is checked.
1517 // set gobject values
1520 // user defined functions
1521 public void load () {
1526 var def = _this.project.compilegroups.get("_default_");
1527 var items = def.sources;
1532 for(var i =0 ; i < items.size; i++) {
1533 this.el.append(out citer);
1535 this.el.set_value(citer, 0, items.get(i) ); // title
1536 this.el.set_value(citer, 1, "dir"); // type
1537 this.el.set_value(citer, 2, false ); // checked
1539 var files = def.files(items.get(i));
1541 for(var j =0 ; j < files.size; j++) {
1542 this.el.append(out citer);
1544 this.el.set_value(citer, 0, files.get(j) ); // title
1545 this.el.set_value(citer, 1, "file"); // type
1546 this.el.set_value(citer, 2, false ); // checked
1551 //this.el.set_value(citer, 1, items.get(i) );
1553 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1557 public class Xcls_TreeViewColumn46 : Object
1559 public Gtk.TreeViewColumn el;
1560 private ValaProjectSettings _this;
1566 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1569 this.el = new Gtk.TreeViewColumn();
1573 // set gobject values
1574 this.el.title = "name";
1575 this.el.resizable = true;
1576 var child_0 = new Xcls_files_render( _this );
1578 this.el.pack_start ( child_0.el , false );
1582 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1583 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1585 // user defined functions
1587 public class Xcls_files_render : Object
1589 public Gtk.CellRendererText el;
1590 private ValaProjectSettings _this;
1596 public Xcls_files_render(ValaProjectSettings _owner )
1599 _this.files_render = this;
1600 this.el = new Gtk.CellRendererText();
1604 // set gobject values
1607 // user defined functions
1609 public class Xcls_TreeViewColumn48 : Object
1611 public Gtk.TreeViewColumn el;
1612 private ValaProjectSettings _this;
1618 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1621 this.el = new Gtk.TreeViewColumn();
1625 // set gobject values
1626 this.el.title = "use";
1627 this.el.resizable = false;
1628 this.el.fixed_width = 50;
1629 var child_0 = new Xcls_files_render_use( _this );
1631 this.el.pack_start ( child_0.el , false );
1637 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1641 // user defined functions
1643 public class Xcls_files_render_use : Object
1645 public Gtk.CellRendererToggle el;
1646 private ValaProjectSettings _this;
1652 public Xcls_files_render_use(ValaProjectSettings _owner )
1655 _this.files_render_use = this;
1656 this.el = new Gtk.CellRendererToggle();
1660 // set gobject values
1661 this.el.activatable = true;
1664 this.el.toggled.connect( ( path_string) => {
1665 var m = _this.default_packages_tree_store.el;
1667 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1668 m.get_iter (out iter, path);
1670 m.get_value(iter, 1, out val);
1671 m.set_value(iter, 1, ((bool) val) ? false :true);
1673 m.get_value(iter, 0, out fval);
1674 var fn = (string)fval;
1676 var def = _this.project.compilegroups.get("_default_");
1677 var items = def.packages;
1688 // user defined functions