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;
38 public signal void hide () {
44 public ValaProjectSettings()
47 this.el = new Gtk.VBox( true, 0 );
54 var child_0 = new Xcls_Notebook2( _this );
56 this.el.pack_start ( child_0.el , true,true,0 );
59 // user defined functions
60 public void show (Project.Gtk project) {
63 print("ValaProjectSettings show\n");
65 this.project= project;
67 this.compile_flags.el.text = _this.project.compilegroups.get("_default_").compile_flags;
69 this.default_directory_tree_store.load();
70 this.default_packages_tree_store.load();
71 this.targets_tree_store.load();
72 this.files_tree_store.load();
81 public class Xcls_Notebook2 : Object
83 public Gtk.Notebook el;
84 private ValaProjectSettings _this;
90 public Xcls_Notebook2(ValaProjectSettings _owner )
93 this.el = new Gtk.Notebook();
98 var child_0 = new Xcls_label_global( _this );
100 var child_1 = new Xcls_label_targets( _this );
102 var child_2 = new Xcls_VBox5( _this );
104 this.el.append_page ( child_2.el , _this.label_global.el );
105 var child_3 = new Xcls_HPaned27( _this );
107 this.el.append_page ( child_3.el , _this.label_targets.el );
110 // user defined functions
112 public class Xcls_label_global : Object
115 private ValaProjectSettings _this;
121 public Xcls_label_global(ValaProjectSettings _owner )
124 _this.label_global = this;
125 this.el = new Gtk.Label( "Global" );
129 // set gobject values
132 // user defined functions
134 public class Xcls_label_targets : Object
137 private ValaProjectSettings _this;
143 public Xcls_label_targets(ValaProjectSettings _owner )
146 _this.label_targets = this;
147 this.el = new Gtk.Label( "Targets" );
151 // set gobject values
154 // user defined functions
156 public class Xcls_VBox5 : Object
159 private ValaProjectSettings _this;
165 public Xcls_VBox5(ValaProjectSettings _owner )
168 this.el = new Gtk.VBox( false, 0 );
172 // set gobject values
173 var child_0 = new Xcls_Label6( _this );
175 this.el.pack_start ( child_0.el , false,false,0 );
176 var child_1 = new Xcls_compile_flags( _this );
178 this.el.pack_start ( child_1.el , false,false,0 );
179 var child_2 = new Xcls_Label8( _this );
181 this.el.pack_start ( child_2.el , false,false,0 );
182 var child_3 = new Xcls_ScrolledWindow9( _this );
184 this.el.pack_start ( child_3.el , true,true,0 );
185 var child_4 = new Xcls_Label16( _this );
187 this.el.pack_start ( child_4.el , false,false,0 );
188 var child_5 = new Xcls_ScrolledWindow17( _this );
190 this.el.pack_start ( child_5.el , true,true,0 );
193 // user defined functions
195 public class Xcls_Label6 : Object
198 private ValaProjectSettings _this;
204 public Xcls_Label6(ValaProjectSettings _owner )
207 this.el = new Gtk.Label( "compile flags" );
211 // set gobject values
214 // user defined functions
216 public class Xcls_compile_flags : Object
219 private ValaProjectSettings _this;
225 public Xcls_compile_flags(ValaProjectSettings _owner )
228 _this.compile_flags = this;
229 this.el = new Gtk.Entry();
233 // set gobject values
234 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
237 this.el.changed.connect( () => {
239 _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
240 _this.project.writeConfig();
241 // _this.project.save();
246 // user defined functions
248 public class Xcls_Label8 : Object
251 private ValaProjectSettings _this;
257 public Xcls_Label8(ValaProjectSettings _owner )
260 this.el = new Gtk.Label( "packages" );
264 // set gobject values
267 // user defined functions
269 public class Xcls_ScrolledWindow9 : Object
271 public Gtk.ScrolledWindow el;
272 private ValaProjectSettings _this;
278 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
281 this.el = new Gtk.ScrolledWindow( null, null );
285 // set gobject values
286 var child_0 = new Xcls_default_packages_tree( _this );
288 this.el.add ( child_0.el );
291 // user defined functions
293 public class Xcls_default_packages_tree : Object
295 public Gtk.TreeView el;
296 private ValaProjectSettings _this;
302 public Xcls_default_packages_tree(ValaProjectSettings _owner )
305 this.el = new Gtk.TreeView();
309 // set gobject values
310 this.el.headers_visible = false;
311 var child_0 = new Xcls_default_packages_tree_store( _this );
313 this.el.set_model ( child_0.el );
314 var child_1 = new Xcls_TreeViewColumn12( _this );
316 this.el.append_column ( child_1.el );
317 var child_2 = new Xcls_TreeViewColumn14( _this );
319 this.el.append_column ( child_2.el );
322 // user defined functions
324 public class Xcls_default_packages_tree_store : Object
326 public Gtk.ListStore el;
327 private ValaProjectSettings _this;
333 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
336 _this.default_packages_tree_store = this;
337 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
342 // set gobject values
345 // user defined functions
346 public void load () {
348 var def = _this.project.compilegroups.get("_default_");
349 var items = def.packages;
352 var pal = (Palete.Gtk) Palete.factory("Gtk");
353 var pkgs = pal.packages();
354 print("ValaProjectSettings:packages load %d\n", pkgs.size);
358 for(var i =0 ; i < pkgs.size; i++) {
359 this.el.append(out citer);
361 this.el.set_value(citer, 0, pkgs.get(i) ); // title
362 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
364 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
368 public class Xcls_TreeViewColumn12 : Object
370 public Gtk.TreeViewColumn el;
371 private ValaProjectSettings _this;
377 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
380 this.el = new Gtk.TreeViewColumn();
384 // set gobject values
385 this.el.title = "name";
386 this.el.expand = true;
387 this.el.resizable = true;
388 var child_0 = new Xcls_packages_render( _this );
390 this.el.pack_start ( child_0.el , false );
394 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
396 // user defined functions
398 public class Xcls_packages_render : Object
400 public Gtk.CellRendererText el;
401 private ValaProjectSettings _this;
407 public Xcls_packages_render(ValaProjectSettings _owner )
410 _this.packages_render = this;
411 this.el = new Gtk.CellRendererText();
415 // set gobject values
418 // user defined functions
420 public class Xcls_TreeViewColumn14 : Object
422 public Gtk.TreeViewColumn el;
423 private ValaProjectSettings _this;
429 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
432 this.el = new Gtk.TreeViewColumn();
436 // set gobject values
437 this.el.title = "use";
438 this.el.resizable = false;
439 this.el.fixed_width = 50;
440 var child_0 = new Xcls_packages_render_use( _this );
442 this.el.pack_start ( child_0.el , false );
447 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
450 // user defined functions
452 public class Xcls_packages_render_use : Object
454 public Gtk.CellRendererToggle el;
455 private ValaProjectSettings _this;
461 public Xcls_packages_render_use(ValaProjectSettings _owner )
464 _this.packages_render_use = this;
465 this.el = new Gtk.CellRendererToggle();
469 // set gobject values
470 this.el.activatable = true;
473 this.el.toggled.connect( ( path_string) => {
474 var m = _this.default_packages_tree_store.el;
476 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
477 m.get_iter (out iter, path);
479 m.get_value(iter, 1, out val);
480 m.set_value(iter, 1, ((bool) val) ? false :true);
482 m.get_value(iter, 0, out fval);
483 var fn = (string)fval;
485 var def = _this.project.compilegroups.get("_default_");
486 var items = def.packages;
497 // user defined functions
499 public class Xcls_Label16 : Object
502 private ValaProjectSettings _this;
508 public Xcls_Label16(ValaProjectSettings _owner )
511 this.el = new Gtk.Label( "Available Directories" );
515 // set gobject values
518 // user defined functions
520 public class Xcls_ScrolledWindow17 : Object
522 public Gtk.ScrolledWindow el;
523 private ValaProjectSettings _this;
529 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
532 this.el = new Gtk.ScrolledWindow( null, null );
536 // set gobject values
537 var child_0 = new Xcls_default_directory_tree( _this );
539 this.el.add ( child_0.el );
540 var child_1 = new Xcls_default_directory_menu( _this );
544 // user defined functions
546 public class Xcls_default_directory_tree : Object
548 public Gtk.TreeView el;
549 private ValaProjectSettings _this;
555 public Xcls_default_directory_tree(ValaProjectSettings _owner )
558 _this.default_directory_tree = this;
559 this.el = new Gtk.TreeView();
563 // set gobject values
564 this.el.headers_visible = false;
565 var child_0 = new Xcls_default_directory_tree_store( _this );
567 this.el.set_model ( child_0.el );
568 var child_1 = new Xcls_TreeViewColumn20( _this );
570 this.el.append_column ( child_1.el );
573 this.el.button_press_event.connect( ( ev) => {
574 //console.log("button press?");
577 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
578 //print("click" + ev.type);
582 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
586 // this.el.get_selection().select_path(res);
588 //if (!this.get('/LeftTreeMenu').el) {
589 // this.get('/LeftTreeMenu').init();
592 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
593 _this.default_directory_menu.el.show_all();
594 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
595 // print("click:" + res.path.to_string());
600 // user defined functions
602 public class Xcls_default_directory_tree_store : Object
604 public Gtk.ListStore el;
605 private ValaProjectSettings _this;
611 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
614 _this.default_directory_tree_store = this;
615 this.el = new Gtk.ListStore( 1, typeof(string)
620 // set gobject values
623 // user defined functions
624 public void load () {
629 var def = _this.project.compilegroups.get("_default_");
630 var items = def.sources;
635 for(var i =0 ; i < items.size; i++) {
636 this.el.append(out citer);
638 this.el.set_value(citer, 0, items.get(i) ); // title
639 //this.el.set_value(citer, 1, items.get(i) );
641 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
645 public class Xcls_TreeViewColumn20 : Object
647 public Gtk.TreeViewColumn el;
648 private ValaProjectSettings _this;
654 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
657 this.el = new Gtk.TreeViewColumn();
661 // set gobject values
662 this.el.title = "name";
663 this.el.resizable = true;
664 var child_0 = new Xcls_directory_render( _this );
666 this.el.pack_start ( child_0.el , false );
670 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
672 // user defined functions
674 public class Xcls_directory_render : Object
676 public Gtk.CellRendererText el;
677 private ValaProjectSettings _this;
683 public Xcls_directory_render(ValaProjectSettings _owner )
686 _this.directory_render = this;
687 this.el = new Gtk.CellRendererText();
691 // set gobject values
694 // user defined functions
696 public class Xcls_default_directory_menu : Object
699 private ValaProjectSettings _this;
705 public Xcls_default_directory_menu(ValaProjectSettings _owner )
708 _this.default_directory_menu = this;
709 this.el = new Gtk.Menu();
713 // set gobject values
714 var child_0 = new Xcls_MenuItem23( _this );
716 this.el.add ( child_0.el );
717 var child_1 = new Xcls_MenuItem24( _this );
719 this.el.add ( child_1.el );
720 var child_2 = new Xcls_SeparatorMenuItem25( _this );
722 this.el.add ( child_2.el );
723 var child_3 = new Xcls_MenuItem26( _this );
725 this.el.add ( child_3.el );
728 // user defined functions
730 public class Xcls_MenuItem23 : Object
732 public Gtk.MenuItem el;
733 private ValaProjectSettings _this;
739 public Xcls_MenuItem23(ValaProjectSettings _owner )
742 this.el = new Gtk.MenuItem();
746 // set gobject values
747 this.el.label = "Add Directory";
750 this.el.activate.connect( () => {
752 var chooser = new Gtk.FileChooserDialog (
753 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
755 Gtk.ResponseType.CANCEL,
757 Gtk.ResponseType.ACCEPT);
758 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
763 // add the directory..
764 var fn = _this.project.relPath(chooser.get_filename());
765 _this.project.compilegroups.get("_default_").sources.add(fn);
766 _this.default_directory_tree_store.load();
770 // user defined functions
772 public class Xcls_MenuItem24 : Object
774 public Gtk.MenuItem el;
775 private ValaProjectSettings _this;
781 public Xcls_MenuItem24(ValaProjectSettings _owner )
784 this.el = new Gtk.MenuItem();
788 // set gobject values
789 this.el.label = "Add File";
792 this.el.activate.connect( () => {
794 var chooser = new Gtk.FileChooserDialog (
795 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
797 Gtk.ResponseType.CANCEL,
799 Gtk.ResponseType.ACCEPT);
800 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
805 // add the directory..
806 var fn = _this.project.relPath(chooser.get_filename());
807 _this.project.compilegroups.get("_default_").sources.add(fn);
808 _this.default_directory_tree_store.load();
812 // user defined functions
814 public class Xcls_SeparatorMenuItem25 : Object
816 public Gtk.SeparatorMenuItem el;
817 private ValaProjectSettings _this;
823 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
826 this.el = new Gtk.SeparatorMenuItem();
830 // set gobject values
833 // user defined functions
835 public class Xcls_MenuItem26 : Object
837 public Gtk.MenuItem el;
838 private ValaProjectSettings _this;
844 public Xcls_MenuItem26(ValaProjectSettings _owner )
847 this.el = new Gtk.MenuItem();
851 // set gobject values
852 this.el.label = "Remove File/Directory";
855 this.el.activate.connect( () => {
860 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
861 print("nothing selected\n");
866 // add the directory..
870 mod.get_value(iter,0, out val);
871 var fn = (string) val;
873 print("remove: %s\n", fn);
874 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
875 print("remove failed");
877 _this.default_directory_tree_store.load();
881 // user defined functions
883 public class Xcls_HPaned27 : Object
885 public Gtk.HPaned el;
886 private ValaProjectSettings _this;
892 public Xcls_HPaned27(ValaProjectSettings _owner )
895 this.el = new Gtk.HPaned();
899 // set gobject values
900 this.el.position = 300;
901 var child_0 = new Xcls_ScrolledWindow28( _this );
903 this.el.add1 ( child_0.el );
904 var child_1 = new Xcls_set_vbox( _this );
906 this.el.add2 ( child_1.el );
909 // user defined functions
911 public class Xcls_ScrolledWindow28 : Object
913 public Gtk.ScrolledWindow el;
914 private ValaProjectSettings _this;
920 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
923 this.el = new Gtk.ScrolledWindow( null, null );
927 // set gobject values
928 var child_0 = new Xcls_targets_tree_menu( _this );
930 this.el.add ( child_0.el );
931 var child_1 = new Xcls_targets_tree( _this );
933 this.el.add ( child_1.el );
938 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
942 // user defined functions
944 public class Xcls_targets_tree_menu : Object
947 private ValaProjectSettings _this;
953 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
956 _this.targets_tree_menu = this;
957 this.el = new Gtk.Menu();
961 // set gobject values
962 var child_0 = new Xcls_MenuItem30( _this );
964 this.el.add ( child_0.el );
965 var child_1 = new Xcls_SeparatorMenuItem31( _this );
967 this.el.add ( child_1.el );
968 var child_2 = new Xcls_MenuItem32( _this );
970 this.el.add ( child_2.el );
973 // user defined functions
975 public class Xcls_MenuItem30 : Object
977 public Gtk.MenuItem el;
978 private ValaProjectSettings _this;
984 public Xcls_MenuItem30(ValaProjectSettings _owner )
987 this.el = new Gtk.MenuItem();
991 // set gobject values
992 this.el.label = "Add Compile Target";
995 this.el.activate.connect( () => {
997 if (_this.project.compilegroups.has_key("NEW GROUP")) {
1001 // add the directory..
1003 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
1004 _this.targets_tree_store.load();
1008 // user defined functions
1010 public class Xcls_SeparatorMenuItem31 : Object
1012 public Gtk.SeparatorMenuItem el;
1013 private ValaProjectSettings _this;
1019 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1022 this.el = new Gtk.SeparatorMenuItem();
1026 // set gobject values
1029 // user defined functions
1031 public class Xcls_MenuItem32 : Object
1033 public Gtk.MenuItem el;
1034 private ValaProjectSettings _this;
1040 public Xcls_MenuItem32(ValaProjectSettings _owner )
1043 this.el = new Gtk.MenuItem();
1047 // set gobject values
1048 this.el.label = "Remove Target";
1051 this.el.activate.connect( () => {
1056 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1057 print("nothing selected\n");
1062 // add the directory..
1066 mod.get_value(iter,0, out val);
1067 var fn = (string) val;
1069 print("remove: %s\n", fn);
1070 if (!_this.project.compilegroups.unset(fn)) {
1071 print("remove failed");
1073 _this.targets_tree_store.load();
1077 // user defined functions
1079 public class Xcls_targets_tree : Object
1081 public Gtk.TreeView el;
1082 private ValaProjectSettings _this;
1086 public string cursor;
1089 public Xcls_targets_tree(ValaProjectSettings _owner )
1092 _this.targets_tree = this;
1093 this.el = new Gtk.TreeView();
1097 // set gobject values
1098 var child_0 = new Xcls_targets_tree_store( _this );
1100 this.el.set_model ( child_0.el );
1101 var child_1 = new Xcls_TreeViewColumn35( _this );
1103 this.el.append_column ( child_1.el );
1106 this.el.button_press_event.connect( ( ev) => {
1107 //console.log("button press?");
1110 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1111 //print("click" + ev.type);
1115 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1119 // this.el.get_selection().select_path(res);
1121 //if (!this.get('/LeftTreeMenu').el) {
1122 // this.get('/LeftTreeMenu').init();
1125 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1126 _this.targets_tree_menu.el.show_all();
1127 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1128 // print("click:" + res.path.to_string());
1131 this.el.cursor_changed.connect( ( ) => {
1133 if (this.cursor != "") {
1134 // save the values..
1137 // load the new values.
1142 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1143 print("nothing selected\n");
1148 // add the directory..
1152 mod.get_value(iter,0, out val);
1153 var fn = (string) val;
1156 var cg = _this.project.compilegroups.get(fn);
1157 _this.build_pack_target.el.set_text(cg.target_bin);
1158 _this.build_compile_flags.el.set_text(cg.compile_flags);
1165 // user defined functions
1167 public class Xcls_targets_tree_store : Object
1169 public Gtk.ListStore el;
1170 private ValaProjectSettings _this;
1176 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1179 _this.targets_tree_store = this;
1180 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1181 typeof(string) // ??
1186 // set gobject values
1189 // user defined functions
1190 public void load () {
1195 var cg = _this.project.compilegroups;
1197 _this.targets_tree.cursor = "";
1199 var iter = cg.map_iterator();
1200 while(iter.next()) {
1201 var key = iter.get_key();
1202 if (key == "_default_") {
1206 this.el.append(out citer);
1208 this.el.set_value(citer, 0, key ); // title
1209 //this.el.set_value(citer, 1, items.get(i) );
1211 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1215 public class Xcls_TreeViewColumn35 : Object
1217 public Gtk.TreeViewColumn el;
1218 private ValaProjectSettings _this;
1224 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1227 this.el = new Gtk.TreeViewColumn();
1231 // set gobject values
1232 this.el.title = "name";
1233 this.el.resizable = true;
1234 var child_0 = new Xcls_targets_render( _this );
1236 this.el.pack_start ( child_0.el , false );
1241 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1244 // user defined functions
1246 public class Xcls_targets_render : Object
1248 public Gtk.CellRendererText el;
1249 private ValaProjectSettings _this;
1255 public Xcls_targets_render(ValaProjectSettings _owner )
1258 _this.targets_render = this;
1259 this.el = new Gtk.CellRendererText();
1263 // set gobject values
1264 this.el.editable = true;
1267 this.el.edited.connect( (path, newtext) => {
1270 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1272 _this.targets_tree_store.el.get_value(iter,0, out gval);
1273 var oldval = (string)gval;
1274 if (oldval == newtext) {
1277 var cg = _this.project.compilegroups.get(oldval);
1279 _this.project.compilegroups.unset(oldval);
1280 _this.project.compilegroups.set(newtext, cg);
1281 _this.targets_tree_store.load();
1285 // user defined functions
1287 public class Xcls_set_vbox : Object
1290 private ValaProjectSettings _this;
1296 public Xcls_set_vbox(ValaProjectSettings _owner )
1299 this.el = new Gtk.VBox( false, 0 );
1303 // set gobject values
1304 var child_0 = new Xcls_Label38( _this );
1306 this.el.pack_start ( child_0.el , false,false,0 );
1307 var child_1 = new Xcls_build_pack_target( _this );
1309 this.el.pack_start ( child_1.el , false,false,0 );
1310 var child_2 = new Xcls_Label40( _this );
1312 this.el.pack_start ( child_2.el , false,false,0 );
1313 var child_3 = new Xcls_build_compile_flags( _this );
1315 this.el.pack_start ( child_3.el , false,false,0 );
1316 var child_4 = new Xcls_Label42( _this );
1318 this.el.pack_start ( child_4.el , false,false,0 );
1319 var child_5 = new Xcls_ScrolledWindow43( _this );
1321 this.el.pack_start ( child_5.el , true,true,0 );
1324 // user defined functions
1326 public class Xcls_Label38 : Object
1328 public Gtk.Label el;
1329 private ValaProjectSettings _this;
1335 public Xcls_Label38(ValaProjectSettings _owner )
1338 this.el = new Gtk.Label( "target filename" );
1342 // set gobject values
1345 // user defined functions
1347 public class Xcls_build_pack_target : Object
1349 public Gtk.Entry el;
1350 private ValaProjectSettings _this;
1356 public Xcls_build_pack_target(ValaProjectSettings _owner )
1359 _this.build_pack_target = this;
1360 this.el = new Gtk.Entry();
1364 // set gobject values
1367 this.el.changed.connect( () => {
1368 if (_this.targets_tree.cursor.length < 1) {
1371 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1375 // user defined functions
1377 public class Xcls_Label40 : Object
1379 public Gtk.Label el;
1380 private ValaProjectSettings _this;
1386 public Xcls_Label40(ValaProjectSettings _owner )
1389 this.el = new Gtk.Label( "compile flags" );
1393 // set gobject values
1396 // user defined functions
1398 public class Xcls_build_compile_flags : Object
1400 public Gtk.Entry el;
1401 private ValaProjectSettings _this;
1407 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1410 _this.build_compile_flags = this;
1411 this.el = new Gtk.Entry();
1415 // set gobject values
1418 this.el.changed.connect( () => {
1419 if (_this.targets_tree.cursor.length < 1) {
1422 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1426 // user defined functions
1428 public class Xcls_Label42 : Object
1430 public Gtk.Label el;
1431 private ValaProjectSettings _this;
1437 public Xcls_Label42(ValaProjectSettings _owner )
1440 this.el = new Gtk.Label( "Files to compile" );
1444 // set gobject values
1447 // user defined functions
1449 public class Xcls_ScrolledWindow43 : Object
1451 public Gtk.ScrolledWindow el;
1452 private ValaProjectSettings _this;
1458 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1461 this.el = new Gtk.ScrolledWindow( null, null );
1465 // set gobject values
1466 var child_0 = new Xcls_files_tree( _this );
1470 // user defined functions
1472 public class Xcls_files_tree : Object
1474 public Gtk.TreeView el;
1475 private ValaProjectSettings _this;
1481 public Xcls_files_tree(ValaProjectSettings _owner )
1484 this.el = new Gtk.TreeView();
1488 // set gobject values
1489 var child_0 = new Xcls_files_tree_store( _this );
1491 this.el.set_model ( child_0.el );
1492 var child_1 = new Xcls_TreeViewColumn46( _this );
1494 this.el.append_column ( child_1.el );
1495 var child_2 = new Xcls_TreeViewColumn48( _this );
1497 this.el.append_column ( child_2.el );
1500 // user defined functions
1502 public class Xcls_files_tree_store : Object
1504 public Gtk.ListStore el;
1505 private ValaProjectSettings _this;
1511 public Xcls_files_tree_store(ValaProjectSettings _owner )
1514 _this.files_tree_store = this;
1515 this.el = new Gtk.ListStore( 2, typeof(string), // 0 file name
1516 typeof(string), // type (dir orfile)
1517 typeof(bool) // is checked.
1522 // set gobject values
1525 // user defined functions
1526 public void load () {
1531 var def = _this.project.compilegroups.get("_default_");
1532 var items = def.sources;
1537 for(var i =0 ; i < items.size; i++) {
1538 this.el.append(out citer);
1540 this.el.set_value(citer, 0, items.get(i) ); // title
1541 this.el.set_value(citer, 1, "dir"); // type
1542 this.el.set_value(citer, 2, false ); // checked
1544 var files = def.files(items.get(i));
1546 for(var j =0 ; j < files.size; j++) {
1547 this.el.append(out citer);
1549 this.el.set_value(citer, 0, files.get(j) ); // title
1550 this.el.set_value(citer, 1, "file"); // type
1551 this.el.set_value(citer, 2, false ); // checked
1556 //this.el.set_value(citer, 1, items.get(i) );
1558 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1562 public class Xcls_TreeViewColumn46 : Object
1564 public Gtk.TreeViewColumn el;
1565 private ValaProjectSettings _this;
1571 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1574 this.el = new Gtk.TreeViewColumn();
1578 // set gobject values
1579 this.el.title = "name";
1580 this.el.resizable = true;
1581 var child_0 = new Xcls_files_render( _this );
1583 this.el.pack_start ( child_0.el , false );
1587 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1588 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1590 // user defined functions
1592 public class Xcls_files_render : Object
1594 public Gtk.CellRendererText el;
1595 private ValaProjectSettings _this;
1601 public Xcls_files_render(ValaProjectSettings _owner )
1604 _this.files_render = this;
1605 this.el = new Gtk.CellRendererText();
1609 // set gobject values
1612 // user defined functions
1614 public class Xcls_TreeViewColumn48 : Object
1616 public Gtk.TreeViewColumn el;
1617 private ValaProjectSettings _this;
1623 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1626 this.el = new Gtk.TreeViewColumn();
1630 // set gobject values
1631 this.el.title = "use";
1632 this.el.resizable = false;
1633 this.el.fixed_width = 50;
1634 var child_0 = new Xcls_files_render_use( _this );
1636 this.el.pack_start ( child_0.el , false );
1642 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1646 // user defined functions
1648 public class Xcls_files_render_use : Object
1650 public Gtk.CellRendererToggle el;
1651 private ValaProjectSettings _this;
1657 public Xcls_files_render_use(ValaProjectSettings _owner )
1660 _this.files_render_use = this;
1661 this.el = new Gtk.CellRendererToggle();
1665 // set gobject values
1666 this.el.activatable = true;
1669 this.el.toggled.connect( ( path_string) => {
1670 var m = _this.default_packages_tree_store.el;
1672 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1673 m.get_iter (out iter, path);
1675 m.get_value(iter, 1, out val);
1676 m.set_value(iter, 1, ((bool) val) ? false :true);
1678 m.get_value(iter, 0, out fval);
1679 var fn = (string)fval;
1681 var def = _this.project.compilegroups.get("_default_");
1682 var items = def.packages;
1693 // user defined functions