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");
1137 // should disable the right hand side..
1138 _this.set_vbox.el.hide();
1141 _this.set_vbox.el.show();
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);
1153 _this.build_pack_target.el.set_text(cg.target_bin);
1154 _this.build_compile_flags.el.set_text(cg.compile_flags);
1156 _this.fiels_tree_store.load(cg);
1163 // user defined functions
1165 public class Xcls_targets_tree_store : Object
1167 public Gtk.ListStore el;
1168 private ValaProjectSettings _this;
1174 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1177 _this.targets_tree_store = this;
1178 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1179 typeof(string) // ??
1184 // set gobject values
1187 // user defined functions
1188 public void load () {
1193 var cg = _this.project.compilegroups;
1195 _this.targets_tree.cursor = "";
1197 var iter = cg.map_iterator();
1198 while(iter.next()) {
1199 var key = iter.get_key();
1200 if (key == "_default_") {
1204 this.el.append(out citer);
1206 this.el.set_value(citer, 0, key ); // title
1207 //this.el.set_value(citer, 1, items.get(i) );
1209 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1213 public class Xcls_TreeViewColumn35 : Object
1215 public Gtk.TreeViewColumn el;
1216 private ValaProjectSettings _this;
1222 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1225 this.el = new Gtk.TreeViewColumn();
1229 // set gobject values
1230 this.el.title = "name";
1231 this.el.resizable = true;
1232 var child_0 = new Xcls_targets_render( _this );
1234 this.el.pack_start ( child_0.el , false );
1239 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1242 // user defined functions
1244 public class Xcls_targets_render : Object
1246 public Gtk.CellRendererText el;
1247 private ValaProjectSettings _this;
1253 public Xcls_targets_render(ValaProjectSettings _owner )
1256 _this.targets_render = this;
1257 this.el = new Gtk.CellRendererText();
1261 // set gobject values
1262 this.el.editable = true;
1265 this.el.edited.connect( (path, newtext) => {
1268 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1270 _this.targets_tree_store.el.get_value(iter,0, out gval);
1271 var oldval = (string)gval;
1272 if (oldval == newtext) {
1275 var cg = _this.project.compilegroups.get(oldval);
1277 _this.project.compilegroups.unset(oldval);
1278 _this.project.compilegroups.set(newtext, cg);
1279 _this.targets_tree_store.load();
1283 // user defined functions
1285 public class Xcls_set_vbox : Object
1288 private ValaProjectSettings _this;
1294 public Xcls_set_vbox(ValaProjectSettings _owner )
1297 this.el = new Gtk.VBox( false, 0 );
1301 // set gobject values
1302 var child_0 = new Xcls_Label38( _this );
1304 this.el.pack_start ( child_0.el , false,false,0 );
1305 var child_1 = new Xcls_build_pack_target( _this );
1307 this.el.pack_start ( child_1.el , false,false,0 );
1308 var child_2 = new Xcls_Label40( _this );
1310 this.el.pack_start ( child_2.el , false,false,0 );
1311 var child_3 = new Xcls_build_compile_flags( _this );
1313 this.el.pack_start ( child_3.el , false,false,0 );
1314 var child_4 = new Xcls_Label42( _this );
1316 this.el.pack_start ( child_4.el , false,false,0 );
1317 var child_5 = new Xcls_ScrolledWindow43( _this );
1319 this.el.pack_start ( child_5.el , true,true,0 );
1322 // user defined functions
1324 public class Xcls_Label38 : Object
1326 public Gtk.Label el;
1327 private ValaProjectSettings _this;
1333 public Xcls_Label38(ValaProjectSettings _owner )
1336 this.el = new Gtk.Label( "target filename" );
1340 // set gobject values
1343 // user defined functions
1345 public class Xcls_build_pack_target : Object
1347 public Gtk.Entry el;
1348 private ValaProjectSettings _this;
1354 public Xcls_build_pack_target(ValaProjectSettings _owner )
1357 _this.build_pack_target = this;
1358 this.el = new Gtk.Entry();
1362 // set gobject values
1365 this.el.changed.connect( () => {
1366 if (_this.targets_tree.cursor.length < 1) {
1369 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1373 // user defined functions
1375 public class Xcls_Label40 : Object
1377 public Gtk.Label el;
1378 private ValaProjectSettings _this;
1384 public Xcls_Label40(ValaProjectSettings _owner )
1387 this.el = new Gtk.Label( "compile flags" );
1391 // set gobject values
1394 // user defined functions
1396 public class Xcls_build_compile_flags : Object
1398 public Gtk.Entry el;
1399 private ValaProjectSettings _this;
1405 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1408 _this.build_compile_flags = this;
1409 this.el = new Gtk.Entry();
1413 // set gobject values
1416 this.el.changed.connect( () => {
1417 if (_this.targets_tree.cursor.length < 1) {
1420 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1424 // user defined functions
1426 public class Xcls_Label42 : Object
1428 public Gtk.Label el;
1429 private ValaProjectSettings _this;
1435 public Xcls_Label42(ValaProjectSettings _owner )
1438 this.el = new Gtk.Label( "Files to compile" );
1442 // set gobject values
1445 // user defined functions
1447 public class Xcls_ScrolledWindow43 : Object
1449 public Gtk.ScrolledWindow el;
1450 private ValaProjectSettings _this;
1456 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1459 this.el = new Gtk.ScrolledWindow( null, null );
1463 // set gobject values
1464 var child_0 = new Xcls_files_tree( _this );
1468 // user defined functions
1470 public class Xcls_files_tree : Object
1472 public Gtk.TreeView el;
1473 private ValaProjectSettings _this;
1479 public Xcls_files_tree(ValaProjectSettings _owner )
1482 this.el = new Gtk.TreeView();
1486 // set gobject values
1487 var child_0 = new Xcls_files_tree_store( _this );
1489 this.el.set_model ( child_0.el );
1490 var child_1 = new Xcls_TreeViewColumn46( _this );
1492 this.el.append_column ( child_1.el );
1493 var child_2 = new Xcls_TreeViewColumn48( _this );
1495 this.el.append_column ( child_2.el );
1498 // user defined functions
1500 public class Xcls_files_tree_store : Object
1502 public Gtk.ListStore el;
1503 private ValaProjectSettings _this;
1509 public Xcls_files_tree_store(ValaProjectSettings _owner )
1512 _this.files_tree_store = this;
1513 this.el = new Gtk.ListStore( 3, typeof(string), // 0 file name
1514 typeof(string), // type (dir orfile)
1515 typeof(bool) // is checked.
1520 // set gobject values
1523 // user defined functions
1524 public void load () {
1529 var def = _this.project.compilegroups.get("_default_");
1530 var items = def.sources;
1538 for(var i =0 ; i < items.size; i++) {
1539 this.el.append(out citer);
1541 this.el.set_value(citer, 0, items.get(i) ); // title
1542 this.el.set_value(citer, 1, "dir"); // type
1543 this.el.set_value(citer, 2, false ); // checked
1545 var files = _this.project.files(items.get(i));
1547 for(var j =0 ; j < files.size; j++) {
1548 this.el.append(out citer);
1550 this.el.set_value(citer, 0, files.get(j) ); // title
1551 this.el.set_value(citer, 1, "file"); // type
1552 this.el.set_value(citer, 2, false ); // checked
1557 //this.el.set_value(citer, 1, items.get(i) );
1559 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1563 public class Xcls_TreeViewColumn46 : Object
1565 public Gtk.TreeViewColumn el;
1566 private ValaProjectSettings _this;
1572 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1575 this.el = new Gtk.TreeViewColumn();
1579 // set gobject values
1580 this.el.title = "name";
1581 this.el.resizable = true;
1582 var child_0 = new Xcls_files_render( _this );
1584 this.el.pack_start ( child_0.el , false );
1588 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1589 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1591 // user defined functions
1593 public class Xcls_files_render : Object
1595 public Gtk.CellRendererText el;
1596 private ValaProjectSettings _this;
1602 public Xcls_files_render(ValaProjectSettings _owner )
1605 _this.files_render = this;
1606 this.el = new Gtk.CellRendererText();
1610 // set gobject values
1613 // user defined functions
1615 public class Xcls_TreeViewColumn48 : Object
1617 public Gtk.TreeViewColumn el;
1618 private ValaProjectSettings _this;
1624 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1627 this.el = new Gtk.TreeViewColumn();
1631 // set gobject values
1632 this.el.title = "use";
1633 this.el.resizable = false;
1634 this.el.fixed_width = 50;
1635 var child_0 = new Xcls_files_render_use( _this );
1637 this.el.pack_start ( child_0.el , false );
1643 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1647 // user defined functions
1649 public class Xcls_files_render_use : Object
1651 public Gtk.CellRendererToggle el;
1652 private ValaProjectSettings _this;
1658 public Xcls_files_render_use(ValaProjectSettings _owner )
1661 _this.files_render_use = this;
1662 this.el = new Gtk.CellRendererToggle();
1666 // set gobject values
1667 this.el.activatable = true;
1670 this.el.toggled.connect( ( path_string) => {
1671 var m = _this.default_packages_tree_store.el;
1673 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1674 m.get_iter (out iter, path);
1676 m.get_value(iter, 1, out val);
1677 m.set_value(iter, 1, ((bool) val) ? false :true);
1679 m.get_value(iter, 0, out fval);
1680 var fn = (string)fval;
1682 var def = _this.project.compilegroups.get("_default_");
1683 var items = def.packages;
1694 // user defined functions