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();
71 public class Xcls_Notebook2 : Object
73 public Gtk.Notebook el;
74 private ValaProjectSettings _this;
80 public Xcls_Notebook2(ValaProjectSettings _owner )
83 this.el = new Gtk.Notebook();
88 var child_0 = new Xcls_label_global( _this );
90 var child_1 = new Xcls_label_targets( _this );
92 var child_2 = new Xcls_VBox5( _this );
94 this.el.append_page ( child_2.el , _this.label_global.el );
95 var child_3 = new Xcls_HPaned27( _this );
97 this.el.append_page ( child_3.el , _this.label_targets.el );
100 // user defined functions
102 public class Xcls_label_global : Object
105 private ValaProjectSettings _this;
111 public Xcls_label_global(ValaProjectSettings _owner )
114 _this.label_global = this;
115 this.el = new Gtk.Label( "Global" );
119 // set gobject values
122 // user defined functions
124 public class Xcls_label_targets : Object
127 private ValaProjectSettings _this;
133 public Xcls_label_targets(ValaProjectSettings _owner )
136 _this.label_targets = this;
137 this.el = new Gtk.Label( "Targets" );
141 // set gobject values
144 // user defined functions
146 public class Xcls_VBox5 : Object
149 private ValaProjectSettings _this;
155 public Xcls_VBox5(ValaProjectSettings _owner )
158 this.el = new Gtk.VBox( false, 0 );
162 // set gobject values
163 var child_0 = new Xcls_Label6( _this );
165 this.el.pack_start ( child_0.el , false,false,0 );
166 var child_1 = new Xcls_compile_flags( _this );
168 this.el.pack_start ( child_1.el , false,false,0 );
169 var child_2 = new Xcls_Label8( _this );
171 this.el.pack_start ( child_2.el , false,false,0 );
172 var child_3 = new Xcls_ScrolledWindow9( _this );
174 this.el.pack_start ( child_3.el , true,true,0 );
175 var child_4 = new Xcls_Label16( _this );
177 this.el.pack_start ( child_4.el , false,false,0 );
178 var child_5 = new Xcls_ScrolledWindow17( _this );
180 this.el.pack_start ( child_5.el , true,true,0 );
183 // user defined functions
185 public class Xcls_Label6 : Object
188 private ValaProjectSettings _this;
194 public Xcls_Label6(ValaProjectSettings _owner )
197 this.el = new Gtk.Label( "compile flags" );
201 // set gobject values
204 // user defined functions
206 public class Xcls_compile_flags : Object
209 private ValaProjectSettings _this;
215 public Xcls_compile_flags(ValaProjectSettings _owner )
218 _this.compile_flags = this;
219 this.el = new Gtk.Entry();
223 // set gobject values
226 // user defined functions
228 public class Xcls_Label8 : Object
231 private ValaProjectSettings _this;
237 public Xcls_Label8(ValaProjectSettings _owner )
240 this.el = new Gtk.Label( "packages" );
244 // set gobject values
247 // user defined functions
249 public class Xcls_ScrolledWindow9 : Object
251 public Gtk.ScrolledWindow el;
252 private ValaProjectSettings _this;
258 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
261 this.el = new Gtk.ScrolledWindow( null, null );
265 // set gobject values
266 var child_0 = new Xcls_default_packages_tree( _this );
268 this.el.add ( child_0.el );
271 // user defined functions
273 public class Xcls_default_packages_tree : Object
275 public Gtk.TreeView el;
276 private ValaProjectSettings _this;
282 public Xcls_default_packages_tree(ValaProjectSettings _owner )
285 this.el = new Gtk.TreeView();
289 // set gobject values
290 this.el.headers_visible = false;
291 var child_0 = new Xcls_default_packages_tree_store( _this );
293 this.el.set_model ( child_0.el );
294 var child_1 = new Xcls_TreeViewColumn12( _this );
296 this.el.append_column ( child_1.el );
297 var child_2 = new Xcls_TreeViewColumn14( _this );
299 this.el.append_column ( child_2.el );
302 // user defined functions
304 public class Xcls_default_packages_tree_store : Object
306 public Gtk.ListStore el;
307 private ValaProjectSettings _this;
313 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
316 _this.default_packages_tree_store = this;
317 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
322 // set gobject values
325 // user defined functions
326 public void load () {
328 var def = _this.project.compilegroups.get("_default_");
329 var items = def.packages;
332 var pal = (Palete.Gtk) Palete.factory("Gtk");
333 var pkgs = pal.packages();
334 print("ValaProjectSettings:packages load %d\n", pkgs.size);
338 for(var i =0 ; i < pkgs.size; i++) {
339 this.el.append(out citer);
341 this.el.set_value(citer, 0, pkgs.get(i) ); // title
342 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
344 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
348 public class Xcls_TreeViewColumn12 : Object
350 public Gtk.TreeViewColumn el;
351 private ValaProjectSettings _this;
357 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
360 this.el = new Gtk.TreeViewColumn();
364 // set gobject values
365 this.el.title = "name";
366 this.el.expand = true;
367 this.el.resizable = true;
368 var child_0 = new Xcls_packages_render( _this );
370 this.el.pack_start ( child_0.el , false );
374 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
376 // user defined functions
378 public class Xcls_packages_render : Object
380 public Gtk.CellRendererText el;
381 private ValaProjectSettings _this;
387 public Xcls_packages_render(ValaProjectSettings _owner )
390 _this.packages_render = this;
391 this.el = new Gtk.CellRendererText();
395 // set gobject values
398 // user defined functions
400 public class Xcls_TreeViewColumn14 : Object
402 public Gtk.TreeViewColumn el;
403 private ValaProjectSettings _this;
409 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
412 this.el = new Gtk.TreeViewColumn();
416 // set gobject values
417 this.el.title = "use";
418 this.el.resizable = false;
419 this.el.fixed_width = 50;
420 var child_0 = new Xcls_packages_render_use( _this );
422 this.el.pack_start ( child_0.el , false );
427 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
430 // user defined functions
432 public class Xcls_packages_render_use : Object
434 public Gtk.CellRendererToggle el;
435 private ValaProjectSettings _this;
441 public Xcls_packages_render_use(ValaProjectSettings _owner )
444 _this.packages_render_use = this;
445 this.el = new Gtk.CellRendererToggle();
449 // set gobject values
450 this.el.activatable = true;
453 this.el.toggled.connect( ( path_string) => {
454 var m = _this.default_packages_tree_store.el;
456 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
457 m.get_iter (out iter, path);
459 m.get_value(iter, 1, out val);
460 m.set_value(iter, 1, ((bool) val) ? false :true);
462 m.get_value(iter, 0, out fval);
463 var fn = (string)fval;
465 var def = _this.project.compilegroups.get("_default_");
466 var items = def.packages;
477 // user defined functions
479 public class Xcls_Label16 : Object
482 private ValaProjectSettings _this;
488 public Xcls_Label16(ValaProjectSettings _owner )
491 this.el = new Gtk.Label( "Available Directories" );
495 // set gobject values
498 // user defined functions
500 public class Xcls_ScrolledWindow17 : Object
502 public Gtk.ScrolledWindow el;
503 private ValaProjectSettings _this;
509 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
512 this.el = new Gtk.ScrolledWindow( null, null );
516 // set gobject values
517 var child_0 = new Xcls_default_directory_tree( _this );
519 this.el.add ( child_0.el );
520 var child_1 = new Xcls_default_directory_menu( _this );
524 // user defined functions
526 public class Xcls_default_directory_tree : Object
528 public Gtk.TreeView el;
529 private ValaProjectSettings _this;
535 public Xcls_default_directory_tree(ValaProjectSettings _owner )
538 _this.default_directory_tree = this;
539 this.el = new Gtk.TreeView();
543 // set gobject values
544 this.el.headers_visible = false;
545 var child_0 = new Xcls_default_directory_tree_store( _this );
547 this.el.set_model ( child_0.el );
548 var child_1 = new Xcls_TreeViewColumn20( _this );
550 this.el.append_column ( child_1.el );
553 this.el.button_press_event.connect( ( ev) => {
554 //console.log("button press?");
557 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
558 //print("click" + ev.type);
562 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
566 // this.el.get_selection().select_path(res);
568 //if (!this.get('/LeftTreeMenu').el) {
569 // this.get('/LeftTreeMenu').init();
572 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
573 _this.default_directory_menu.el.show_all();
574 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
575 // print("click:" + res.path.to_string());
580 // user defined functions
582 public class Xcls_default_directory_tree_store : Object
584 public Gtk.ListStore el;
585 private ValaProjectSettings _this;
591 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
594 _this.default_directory_tree_store = this;
595 this.el = new Gtk.ListStore( 1, typeof(string)
600 // set gobject values
603 // user defined functions
604 public void load () {
609 var def = _this.project.compilegroups.get("_default_");
610 var items = def.sources;
615 for(var i =0 ; i < items.size; i++) {
616 this.el.append(out citer);
618 this.el.set_value(citer, 0, items.get(i) ); // title
619 //this.el.set_value(citer, 1, items.get(i) );
621 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
625 public class Xcls_TreeViewColumn20 : Object
627 public Gtk.TreeViewColumn el;
628 private ValaProjectSettings _this;
634 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
637 this.el = new Gtk.TreeViewColumn();
641 // set gobject values
642 this.el.title = "name";
643 this.el.resizable = true;
644 var child_0 = new Xcls_directory_render( _this );
646 this.el.pack_start ( child_0.el , false );
650 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
652 // user defined functions
654 public class Xcls_directory_render : Object
656 public Gtk.CellRendererText el;
657 private ValaProjectSettings _this;
663 public Xcls_directory_render(ValaProjectSettings _owner )
666 _this.directory_render = this;
667 this.el = new Gtk.CellRendererText();
671 // set gobject values
674 // user defined functions
676 public class Xcls_default_directory_menu : Object
679 private ValaProjectSettings _this;
685 public Xcls_default_directory_menu(ValaProjectSettings _owner )
688 _this.default_directory_menu = this;
689 this.el = new Gtk.Menu();
693 // set gobject values
694 var child_0 = new Xcls_MenuItem23( _this );
696 this.el.add ( child_0.el );
697 var child_1 = new Xcls_MenuItem24( _this );
699 this.el.add ( child_1.el );
700 var child_2 = new Xcls_SeparatorMenuItem25( _this );
702 this.el.add ( child_2.el );
703 var child_3 = new Xcls_MenuItem26( _this );
705 this.el.add ( child_3.el );
708 // user defined functions
710 public class Xcls_MenuItem23 : Object
712 public Gtk.MenuItem el;
713 private ValaProjectSettings _this;
719 public Xcls_MenuItem23(ValaProjectSettings _owner )
722 this.el = new Gtk.MenuItem();
726 // set gobject values
727 this.el.label = "Add Directory";
730 this.el.activate.connect( () => {
732 var chooser = new Gtk.FileChooserDialog (
733 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
735 Gtk.ResponseType.CANCEL,
737 Gtk.ResponseType.ACCEPT);
738 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
743 // add the directory..
744 var fn = _this.project.relPath(chooser.get_filename());
745 _this.project.compilegroups.get("_default_").sources.add(fn);
746 _this.default_directory_tree_store.load();
750 // user defined functions
752 public class Xcls_MenuItem24 : Object
754 public Gtk.MenuItem el;
755 private ValaProjectSettings _this;
761 public Xcls_MenuItem24(ValaProjectSettings _owner )
764 this.el = new Gtk.MenuItem();
768 // set gobject values
769 this.el.label = "Add File";
772 this.el.activate.connect( () => {
774 var chooser = new Gtk.FileChooserDialog (
775 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
777 Gtk.ResponseType.CANCEL,
779 Gtk.ResponseType.ACCEPT);
780 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
785 // add the directory..
786 var fn = _this.project.relPath(chooser.get_filename());
787 _this.project.compilegroups.get("_default_").sources.add(fn);
788 _this.default_directory_tree_store.load();
792 // user defined functions
794 public class Xcls_SeparatorMenuItem25 : Object
796 public Gtk.SeparatorMenuItem el;
797 private ValaProjectSettings _this;
803 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
806 this.el = new Gtk.SeparatorMenuItem();
810 // set gobject values
813 // user defined functions
815 public class Xcls_MenuItem26 : Object
817 public Gtk.MenuItem el;
818 private ValaProjectSettings _this;
824 public Xcls_MenuItem26(ValaProjectSettings _owner )
827 this.el = new Gtk.MenuItem();
831 // set gobject values
832 this.el.label = "Remove File/Directory";
835 this.el.activate.connect( () => {
840 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
841 print("nothing selected\n");
846 // add the directory..
850 mod.get_value(iter,0, out val);
851 var fn = (string) val;
853 print("remove: %s\n", fn);
854 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
855 print("remove failed");
857 _this.default_directory_tree_store.load();
861 // user defined functions
863 public class Xcls_HPaned27 : Object
865 public Gtk.HPaned el;
866 private ValaProjectSettings _this;
872 public Xcls_HPaned27(ValaProjectSettings _owner )
875 this.el = new Gtk.HPaned();
879 // set gobject values
880 this.el.position = 300;
881 var child_0 = new Xcls_ScrolledWindow28( _this );
883 this.el.add1 ( child_0.el );
884 var child_1 = new Xcls_set_vbox( _this );
886 this.el.add2 ( child_1.el );
889 // user defined functions
891 public class Xcls_ScrolledWindow28 : Object
893 public Gtk.ScrolledWindow el;
894 private ValaProjectSettings _this;
900 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
903 this.el = new Gtk.ScrolledWindow( null, null );
907 // set gobject values
908 var child_0 = new Xcls_targets_tree_menu( _this );
910 this.el.add ( child_0.el );
911 var child_1 = new Xcls_targets_tree( _this );
913 this.el.add ( child_1.el );
918 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
922 // user defined functions
924 public class Xcls_targets_tree_menu : Object
927 private ValaProjectSettings _this;
933 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
936 _this.targets_tree_menu = this;
937 this.el = new Gtk.Menu();
941 // set gobject values
942 var child_0 = new Xcls_MenuItem30( _this );
944 this.el.add ( child_0.el );
945 var child_1 = new Xcls_SeparatorMenuItem31( _this );
947 this.el.add ( child_1.el );
948 var child_2 = new Xcls_MenuItem32( _this );
950 this.el.add ( child_2.el );
953 // user defined functions
955 public class Xcls_MenuItem30 : Object
957 public Gtk.MenuItem el;
958 private ValaProjectSettings _this;
964 public Xcls_MenuItem30(ValaProjectSettings _owner )
967 this.el = new Gtk.MenuItem();
971 // set gobject values
972 this.el.label = "Add Compile Target";
975 this.el.activate.connect( () => {
977 if (_this.project.compilegroups.has_key("NEW GROUP")) {
981 // add the directory..
983 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
984 _this.targets_tree_store.load();
988 // user defined functions
990 public class Xcls_SeparatorMenuItem31 : Object
992 public Gtk.SeparatorMenuItem el;
993 private ValaProjectSettings _this;
999 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1002 this.el = new Gtk.SeparatorMenuItem();
1006 // set gobject values
1009 // user defined functions
1011 public class Xcls_MenuItem32 : Object
1013 public Gtk.MenuItem el;
1014 private ValaProjectSettings _this;
1020 public Xcls_MenuItem32(ValaProjectSettings _owner )
1023 this.el = new Gtk.MenuItem();
1027 // set gobject values
1028 this.el.label = "Remove Target";
1031 this.el.activate.connect( () => {
1036 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1037 print("nothing selected\n");
1042 // add the directory..
1046 mod.get_value(iter,0, out val);
1047 var fn = (string) val;
1049 print("remove: %s\n", fn);
1050 if (!_this.project.compilegroups.unset(fn)) {
1051 print("remove failed");
1053 _this.targets_tree_store.load();
1057 // user defined functions
1059 public class Xcls_targets_tree : Object
1061 public Gtk.TreeView el;
1062 private ValaProjectSettings _this;
1066 public string cursor;
1069 public Xcls_targets_tree(ValaProjectSettings _owner )
1072 _this.targets_tree = this;
1073 this.el = new Gtk.TreeView();
1077 // set gobject values
1078 var child_0 = new Xcls_targets_tree_store( _this );
1080 this.el.set_model ( child_0.el );
1081 var child_1 = new Xcls_TreeViewColumn35( _this );
1083 this.el.append_column ( child_1.el );
1086 this.el.button_press_event.connect( ( ev) => {
1087 //console.log("button press?");
1090 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1091 //print("click" + ev.type);
1095 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1099 // this.el.get_selection().select_path(res);
1101 //if (!this.get('/LeftTreeMenu').el) {
1102 // this.get('/LeftTreeMenu').init();
1105 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1106 _this.targets_tree_menu.el.show_all();
1107 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1108 // print("click:" + res.path.to_string());
1111 this.el.cursor_changed.connect( ( ) => {
1113 if (this.cursor != "") {
1114 // save the values..
1117 // load the new values.
1122 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1123 print("nothing selected\n");
1128 // add the directory..
1132 mod.get_value(iter,0, out val);
1133 var fn = (string) val;
1136 var cg = _this.project.compilegroups.get(fn);
1137 _this.build_pack_target.el.set_text(cg.target_bin);
1138 _this.build_compile_flags.el.set_text(cg.compile_flags);
1145 // user defined functions
1147 public class Xcls_targets_tree_store : Object
1149 public Gtk.ListStore el;
1150 private ValaProjectSettings _this;
1156 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1159 _this.targets_tree_store = this;
1160 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1161 typeof(string) // ??
1166 // set gobject values
1169 // user defined functions
1170 public void load () {
1175 var cg = _this.project.compilegroups;
1177 _this.targets_tree.cursor = "";
1179 var iter = cg.map_iterator();
1180 while(iter.next()) {
1181 var key = iter.get_key();
1182 if (key == "_default_") {
1186 this.el.append(out citer);
1188 this.el.set_value(citer, 0, key ); // title
1189 //this.el.set_value(citer, 1, items.get(i) );
1191 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1195 public class Xcls_TreeViewColumn35 : Object
1197 public Gtk.TreeViewColumn el;
1198 private ValaProjectSettings _this;
1204 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1207 this.el = new Gtk.TreeViewColumn();
1211 // set gobject values
1212 this.el.title = "name";
1213 this.el.resizable = true;
1214 var child_0 = new Xcls_targets_render( _this );
1216 this.el.pack_start ( child_0.el , false );
1221 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1224 // user defined functions
1226 public class Xcls_targets_render : Object
1228 public Gtk.CellRendererText el;
1229 private ValaProjectSettings _this;
1235 public Xcls_targets_render(ValaProjectSettings _owner )
1238 _this.targets_render = this;
1239 this.el = new Gtk.CellRendererText();
1243 // set gobject values
1244 this.el.editable = true;
1247 this.el.edited.connect( (path, newtext) => {
1250 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1252 _this.targets_tree_store.el.get_value(iter,0, out gval);
1253 var oldval = (string)gval;
1254 if (oldval == newtext) {
1257 var cg = _this.project.compilegroups.get(oldval);
1259 _this.project.compilegroups.unset(oldval);
1260 _this.project.compilegroups.set(newtext, cg);
1261 _this.targets_tree_store.load();
1265 // user defined functions
1267 public class Xcls_set_vbox : Object
1270 private ValaProjectSettings _this;
1276 public Xcls_set_vbox(ValaProjectSettings _owner )
1279 this.el = new Gtk.VBox( false, 0 );
1283 // set gobject values
1284 var child_0 = new Xcls_Label38( _this );
1286 this.el.pack_start ( child_0.el , false,false,0 );
1287 var child_1 = new Xcls_build_pack_target( _this );
1289 this.el.pack_start ( child_1.el , false,false,0 );
1290 var child_2 = new Xcls_Label40( _this );
1292 this.el.pack_start ( child_2.el , false,false,0 );
1293 var child_3 = new Xcls_build_compile_flags( _this );
1295 this.el.pack_start ( child_3.el , false,false,0 );
1296 var child_4 = new Xcls_Label42( _this );
1298 this.el.pack_start ( child_4.el , false,false,0 );
1299 var child_5 = new Xcls_ScrolledWindow43( _this );
1301 this.el.pack_start ( child_5.el , true,true,0 );
1304 // user defined functions
1306 public class Xcls_Label38 : Object
1308 public Gtk.Label el;
1309 private ValaProjectSettings _this;
1315 public Xcls_Label38(ValaProjectSettings _owner )
1318 this.el = new Gtk.Label( "target filename" );
1322 // set gobject values
1325 // user defined functions
1327 public class Xcls_build_pack_target : Object
1329 public Gtk.Entry el;
1330 private ValaProjectSettings _this;
1336 public Xcls_build_pack_target(ValaProjectSettings _owner )
1339 _this.build_pack_target = this;
1340 this.el = new Gtk.Entry();
1344 // set gobject values
1347 this.el.changed.connect( () => {
1348 if (_this.targets_tree.cursor.length < 1) {
1351 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1355 // user defined functions
1357 public class Xcls_Label40 : Object
1359 public Gtk.Label el;
1360 private ValaProjectSettings _this;
1366 public Xcls_Label40(ValaProjectSettings _owner )
1369 this.el = new Gtk.Label( "compile flags" );
1373 // set gobject values
1376 // user defined functions
1378 public class Xcls_build_compile_flags : Object
1380 public Gtk.Entry el;
1381 private ValaProjectSettings _this;
1387 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1390 _this.build_compile_flags = this;
1391 this.el = new Gtk.Entry();
1395 // set gobject values
1398 this.el.changed.connect( () => {
1399 if (_this.targets_tree.cursor.length < 1) {
1402 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1406 // user defined functions
1408 public class Xcls_Label42 : Object
1410 public Gtk.Label el;
1411 private ValaProjectSettings _this;
1417 public Xcls_Label42(ValaProjectSettings _owner )
1420 this.el = new Gtk.Label( "Files to compile" );
1424 // set gobject values
1427 // user defined functions
1429 public class Xcls_ScrolledWindow43 : Object
1431 public Gtk.ScrolledWindow el;
1432 private ValaProjectSettings _this;
1438 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1441 this.el = new Gtk.ScrolledWindow( null, null );
1445 // set gobject values
1446 var child_0 = new Xcls_files_tree( _this );
1450 // user defined functions
1452 public class Xcls_files_tree : Object
1454 public Gtk.TreeView el;
1455 private ValaProjectSettings _this;
1461 public Xcls_files_tree(ValaProjectSettings _owner )
1464 this.el = new Gtk.TreeView();
1468 // set gobject values
1469 var child_0 = new Xcls_files_tree_store( _this );
1471 this.el.set_model ( child_0.el );
1472 var child_1 = new Xcls_TreeViewColumn46( _this );
1474 this.el.append_column ( child_1.el );
1475 var child_2 = new Xcls_TreeViewColumn48( _this );
1477 this.el.append_column ( child_2.el );
1480 // user defined functions
1482 public class Xcls_files_tree_store : Object
1484 public Gtk.ListStore el;
1485 private ValaProjectSettings _this;
1491 public Xcls_files_tree_store(ValaProjectSettings _owner )
1494 _this.files_tree_store = this;
1495 this.el = new Gtk.ListStore( 2, typeof(string), // 0 file name
1496 typeof(string), // type (dir orfile)
1497 typeof(bool) // is checked.
1502 // set gobject values
1505 // user defined functions
1506 public void load () {
1511 var def = _this.project.compilegroups.get("_default_");
1512 var items = def.sources;
1517 for(var i =0 ; i < items.size; i++) {
1518 this.el.append(out citer);
1520 this.el.set_value(citer, 0, items.get(i) ); // title
1521 this.el.set_value(citer, 1, "dir"); // type
1522 this.el.set_value(citer, 2, false ); // checked
1524 var files = def.files(items.get(i));
1526 for(var j =0 ; j < files.size; j++) {
1527 this.el.append(out citer);
1529 this.el.set_value(citer, 0, files.get(j) ); // title
1530 this.el.set_value(citer, 1, "file"); // type
1531 this.el.set_value(citer, 2, false ); // checked
1536 //this.el.set_value(citer, 1, items.get(i) );
1538 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1542 public class Xcls_TreeViewColumn46 : Object
1544 public Gtk.TreeViewColumn el;
1545 private ValaProjectSettings _this;
1551 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1554 this.el = new Gtk.TreeViewColumn();
1558 // set gobject values
1559 this.el.title = "name";
1560 this.el.resizable = true;
1561 var child_0 = new Xcls_files_render( _this );
1563 this.el.pack_start ( child_0.el , false );
1567 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1568 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1570 // user defined functions
1572 public class Xcls_files_render : Object
1574 public Gtk.CellRendererText el;
1575 private ValaProjectSettings _this;
1581 public Xcls_files_render(ValaProjectSettings _owner )
1584 _this.files_render = this;
1585 this.el = new Gtk.CellRendererText();
1589 // set gobject values
1592 // user defined functions
1594 public class Xcls_TreeViewColumn48 : Object
1596 public Gtk.TreeViewColumn el;
1597 private ValaProjectSettings _this;
1603 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1606 this.el = new Gtk.TreeViewColumn();
1610 // set gobject values
1611 this.el.title = "use";
1612 this.el.resizable = false;
1613 this.el.fixed_width = 50;
1614 var child_0 = new Xcls_files_render_use( _this );
1616 this.el.pack_start ( child_0.el , false );
1622 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1626 // user defined functions
1628 public class Xcls_files_render_use : Object
1630 public Gtk.CellRendererToggle el;
1631 private ValaProjectSettings _this;
1637 public Xcls_files_render_use(ValaProjectSettings _owner )
1640 _this.files_render_use = this;
1641 this.el = new Gtk.CellRendererToggle();
1645 // set gobject values
1646 this.el.activatable = true;
1649 this.el.toggled.connect( ( path_string) => {
1650 var m = _this.default_packages_tree_store.el;
1652 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1653 m.get_iter (out iter, path);
1655 m.get_value(iter, 1, out val);
1656 m.set_value(iter, 1, ((bool) val) ? false :true);
1658 m.get_value(iter, 0, out fval);
1659 var fn = (string)fval;
1661 var def = _this.project.compilegroups.get("_default_");
1662 var items = def.packages;
1673 // user defined functions