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_set_vbox set_vbox;
30 public Xcls_build_pack_target build_pack_target;
31 public Xcls_build_compile_flags build_compile_flags;
32 public Xcls_files_tree_store files_tree_store;
33 public Xcls_files_render files_render;
34 public Xcls_files_render_use files_render_use;
37 public Project.Gtk project;
38 public Xcls_MainWindow window;
41 public ValaProjectSettings()
44 this.el = new Gtk.VBox( true, 0 );
51 var child_0 = new Xcls_Notebook2( _this );
53 this.el.pack_start ( child_0.el , true,true,0 );
56 // user defined functions
57 public void show (Project.Gtk project) {
60 print("ValaProjectSettings show\n");
62 this.project= project;
64 this.compile_flags.el.text = _this.project.compilegroups.get("_default_").compile_flags;
66 this.default_directory_tree_store.load();
67 this.default_packages_tree_store.load();
68 this.targets_tree_store.load();
69 this.files_tree_store.load();
73 this.project.writeConfig();
75 public class Xcls_Notebook2 : Object
77 public Gtk.Notebook el;
78 private ValaProjectSettings _this;
84 public Xcls_Notebook2(ValaProjectSettings _owner )
87 this.el = new Gtk.Notebook();
92 var child_0 = new Xcls_label_global( _this );
94 var child_1 = new Xcls_label_targets( _this );
96 var child_2 = new Xcls_VBox5( _this );
98 this.el.append_page ( child_2.el , _this.label_global.el );
99 var child_3 = new Xcls_HPaned27( _this );
101 this.el.append_page ( child_3.el , _this.label_targets.el );
104 // user defined functions
106 public class Xcls_label_global : Object
109 private ValaProjectSettings _this;
115 public Xcls_label_global(ValaProjectSettings _owner )
118 _this.label_global = this;
119 this.el = new Gtk.Label( "Global" );
123 // set gobject values
126 // user defined functions
128 public class Xcls_label_targets : Object
131 private ValaProjectSettings _this;
137 public Xcls_label_targets(ValaProjectSettings _owner )
140 _this.label_targets = this;
141 this.el = new Gtk.Label( "Targets" );
145 // set gobject values
148 // user defined functions
150 public class Xcls_VBox5 : Object
153 private ValaProjectSettings _this;
159 public Xcls_VBox5(ValaProjectSettings _owner )
162 this.el = new Gtk.VBox( false, 0 );
166 // set gobject values
167 var child_0 = new Xcls_Label6( _this );
169 this.el.pack_start ( child_0.el , false,false,0 );
170 var child_1 = new Xcls_compile_flags( _this );
172 this.el.pack_start ( child_1.el , false,false,0 );
173 var child_2 = new Xcls_Label8( _this );
175 this.el.pack_start ( child_2.el , false,false,0 );
176 var child_3 = new Xcls_ScrolledWindow9( _this );
178 this.el.pack_start ( child_3.el , true,true,0 );
179 var child_4 = new Xcls_Label16( _this );
181 this.el.pack_start ( child_4.el , false,false,0 );
182 var child_5 = new Xcls_ScrolledWindow17( _this );
184 this.el.pack_start ( child_5.el , true,true,0 );
187 // user defined functions
189 public class Xcls_Label6 : Object
192 private ValaProjectSettings _this;
198 public Xcls_Label6(ValaProjectSettings _owner )
201 this.el = new Gtk.Label( "compile flags" );
205 // set gobject values
208 // user defined functions
210 public class Xcls_compile_flags : Object
213 private ValaProjectSettings _this;
219 public Xcls_compile_flags(ValaProjectSettings _owner )
222 _this.compile_flags = this;
223 this.el = new Gtk.Entry();
227 // set gobject values
228 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
231 this.el.changed.connect( () => {
233 _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
234 _this.project.writeConfig();
235 // _this.project.save();
240 // user defined functions
242 public class Xcls_Label8 : Object
245 private ValaProjectSettings _this;
251 public Xcls_Label8(ValaProjectSettings _owner )
254 this.el = new Gtk.Label( "packages" );
258 // set gobject values
261 // user defined functions
263 public class Xcls_ScrolledWindow9 : Object
265 public Gtk.ScrolledWindow el;
266 private ValaProjectSettings _this;
272 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
275 this.el = new Gtk.ScrolledWindow( null, null );
279 // set gobject values
280 var child_0 = new Xcls_default_packages_tree( _this );
282 this.el.add ( child_0.el );
285 // user defined functions
287 public class Xcls_default_packages_tree : Object
289 public Gtk.TreeView el;
290 private ValaProjectSettings _this;
296 public Xcls_default_packages_tree(ValaProjectSettings _owner )
299 this.el = new Gtk.TreeView();
303 // set gobject values
304 this.el.headers_visible = false;
305 var child_0 = new Xcls_default_packages_tree_store( _this );
307 this.el.set_model ( child_0.el );
308 var child_1 = new Xcls_TreeViewColumn12( _this );
310 this.el.append_column ( child_1.el );
311 var child_2 = new Xcls_TreeViewColumn14( _this );
313 this.el.append_column ( child_2.el );
316 // user defined functions
318 public class Xcls_default_packages_tree_store : Object
320 public Gtk.ListStore el;
321 private ValaProjectSettings _this;
327 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
330 _this.default_packages_tree_store = this;
331 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
336 // set gobject values
339 // user defined functions
340 public void load () {
342 var def = _this.project.compilegroups.get("_default_");
343 var items = def.packages;
346 var pal = (Palete.Gtk) Palete.factory("Gtk");
347 var pkgs = pal.packages();
348 print("ValaProjectSettings:packages load %d\n", pkgs.size);
352 for(var i =0 ; i < pkgs.size; i++) {
353 this.el.append(out citer);
355 this.el.set_value(citer, 0, pkgs.get(i) ); // title
356 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
358 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
362 public class Xcls_TreeViewColumn12 : Object
364 public Gtk.TreeViewColumn el;
365 private ValaProjectSettings _this;
371 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
374 this.el = new Gtk.TreeViewColumn();
378 // set gobject values
379 this.el.title = "name";
380 this.el.expand = true;
381 this.el.resizable = true;
382 var child_0 = new Xcls_packages_render( _this );
384 this.el.pack_start ( child_0.el , false );
388 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
390 // user defined functions
392 public class Xcls_packages_render : Object
394 public Gtk.CellRendererText el;
395 private ValaProjectSettings _this;
401 public Xcls_packages_render(ValaProjectSettings _owner )
404 _this.packages_render = this;
405 this.el = new Gtk.CellRendererText();
409 // set gobject values
412 // user defined functions
414 public class Xcls_TreeViewColumn14 : Object
416 public Gtk.TreeViewColumn el;
417 private ValaProjectSettings _this;
423 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
426 this.el = new Gtk.TreeViewColumn();
430 // set gobject values
431 this.el.title = "use";
432 this.el.resizable = false;
433 this.el.fixed_width = 50;
434 var child_0 = new Xcls_packages_render_use( _this );
436 this.el.pack_start ( child_0.el , false );
441 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
444 // user defined functions
446 public class Xcls_packages_render_use : Object
448 public Gtk.CellRendererToggle el;
449 private ValaProjectSettings _this;
455 public Xcls_packages_render_use(ValaProjectSettings _owner )
458 _this.packages_render_use = this;
459 this.el = new Gtk.CellRendererToggle();
463 // set gobject values
464 this.el.activatable = true;
467 this.el.toggled.connect( ( path_string) => {
468 var m = _this.default_packages_tree_store.el;
470 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
471 m.get_iter (out iter, path);
473 m.get_value(iter, 1, out val);
474 m.set_value(iter, 1, ((bool) val) ? false :true);
476 m.get_value(iter, 0, out fval);
477 var fn = (string)fval;
479 var def = _this.project.compilegroups.get("_default_");
480 var items = def.packages;
491 // user defined functions
493 public class Xcls_Label16 : Object
496 private ValaProjectSettings _this;
502 public Xcls_Label16(ValaProjectSettings _owner )
505 this.el = new Gtk.Label( "Available Directories" );
509 // set gobject values
512 // user defined functions
514 public class Xcls_ScrolledWindow17 : Object
516 public Gtk.ScrolledWindow el;
517 private ValaProjectSettings _this;
523 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
526 this.el = new Gtk.ScrolledWindow( null, null );
530 // set gobject values
531 var child_0 = new Xcls_default_directory_tree( _this );
533 this.el.add ( child_0.el );
534 var child_1 = new Xcls_default_directory_menu( _this );
538 // user defined functions
540 public class Xcls_default_directory_tree : Object
542 public Gtk.TreeView el;
543 private ValaProjectSettings _this;
549 public Xcls_default_directory_tree(ValaProjectSettings _owner )
552 _this.default_directory_tree = this;
553 this.el = new Gtk.TreeView();
557 // set gobject values
558 this.el.headers_visible = false;
559 var child_0 = new Xcls_default_directory_tree_store( _this );
561 this.el.set_model ( child_0.el );
562 var child_1 = new Xcls_TreeViewColumn20( _this );
564 this.el.append_column ( child_1.el );
567 this.el.button_press_event.connect( ( ev) => {
568 //console.log("button press?");
571 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
572 //print("click" + ev.type);
576 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
580 // this.el.get_selection().select_path(res);
582 //if (!this.get('/LeftTreeMenu').el) {
583 // this.get('/LeftTreeMenu').init();
586 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
587 _this.default_directory_menu.el.show_all();
588 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
589 // print("click:" + res.path.to_string());
594 // user defined functions
596 public class Xcls_default_directory_tree_store : Object
598 public Gtk.ListStore el;
599 private ValaProjectSettings _this;
605 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
608 _this.default_directory_tree_store = this;
609 this.el = new Gtk.ListStore( 1, typeof(string)
614 // set gobject values
617 // user defined functions
618 public void load () {
623 var def = _this.project.compilegroups.get("_default_");
624 var items = def.sources;
629 for(var i =0 ; i < items.size; i++) {
630 this.el.append(out citer);
632 this.el.set_value(citer, 0, items.get(i) ); // title
633 //this.el.set_value(citer, 1, items.get(i) );
635 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
639 public class Xcls_TreeViewColumn20 : Object
641 public Gtk.TreeViewColumn el;
642 private ValaProjectSettings _this;
648 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
651 this.el = new Gtk.TreeViewColumn();
655 // set gobject values
656 this.el.title = "name";
657 this.el.resizable = true;
658 var child_0 = new Xcls_directory_render( _this );
660 this.el.pack_start ( child_0.el , false );
664 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
666 // user defined functions
668 public class Xcls_directory_render : Object
670 public Gtk.CellRendererText el;
671 private ValaProjectSettings _this;
677 public Xcls_directory_render(ValaProjectSettings _owner )
680 _this.directory_render = this;
681 this.el = new Gtk.CellRendererText();
685 // set gobject values
688 // user defined functions
690 public class Xcls_default_directory_menu : Object
693 private ValaProjectSettings _this;
699 public Xcls_default_directory_menu(ValaProjectSettings _owner )
702 _this.default_directory_menu = this;
703 this.el = new Gtk.Menu();
707 // set gobject values
708 var child_0 = new Xcls_MenuItem23( _this );
710 this.el.add ( child_0.el );
711 var child_1 = new Xcls_MenuItem24( _this );
713 this.el.add ( child_1.el );
714 var child_2 = new Xcls_SeparatorMenuItem25( _this );
716 this.el.add ( child_2.el );
717 var child_3 = new Xcls_MenuItem26( _this );
719 this.el.add ( child_3.el );
722 // user defined functions
724 public class Xcls_MenuItem23 : Object
726 public Gtk.MenuItem el;
727 private ValaProjectSettings _this;
733 public Xcls_MenuItem23(ValaProjectSettings _owner )
736 this.el = new Gtk.MenuItem();
740 // set gobject values
741 this.el.label = "Add Directory";
744 this.el.activate.connect( () => {
746 var chooser = new Gtk.FileChooserDialog (
747 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
749 Gtk.ResponseType.CANCEL,
751 Gtk.ResponseType.ACCEPT);
752 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
757 // add the directory..
758 var fn = _this.project.relPath(chooser.get_filename());
759 _this.project.compilegroups.get("_default_").sources.add(fn);
760 _this.default_directory_tree_store.load();
764 // user defined functions
766 public class Xcls_MenuItem24 : Object
768 public Gtk.MenuItem el;
769 private ValaProjectSettings _this;
775 public Xcls_MenuItem24(ValaProjectSettings _owner )
778 this.el = new Gtk.MenuItem();
782 // set gobject values
783 this.el.label = "Add File";
786 this.el.activate.connect( () => {
788 var chooser = new Gtk.FileChooserDialog (
789 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
791 Gtk.ResponseType.CANCEL,
793 Gtk.ResponseType.ACCEPT);
794 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
799 // add the directory..
800 var fn = _this.project.relPath(chooser.get_filename());
801 _this.project.compilegroups.get("_default_").sources.add(fn);
802 _this.default_directory_tree_store.load();
806 // user defined functions
808 public class Xcls_SeparatorMenuItem25 : Object
810 public Gtk.SeparatorMenuItem el;
811 private ValaProjectSettings _this;
817 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
820 this.el = new Gtk.SeparatorMenuItem();
824 // set gobject values
827 // user defined functions
829 public class Xcls_MenuItem26 : Object
831 public Gtk.MenuItem el;
832 private ValaProjectSettings _this;
838 public Xcls_MenuItem26(ValaProjectSettings _owner )
841 this.el = new Gtk.MenuItem();
845 // set gobject values
846 this.el.label = "Remove File/Directory";
849 this.el.activate.connect( () => {
854 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
855 print("nothing selected\n");
860 // add the directory..
864 mod.get_value(iter,0, out val);
865 var fn = (string) val;
867 print("remove: %s\n", fn);
868 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
869 print("remove failed");
871 _this.default_directory_tree_store.load();
875 // user defined functions
877 public class Xcls_HPaned27 : Object
879 public Gtk.HPaned el;
880 private ValaProjectSettings _this;
886 public Xcls_HPaned27(ValaProjectSettings _owner )
889 this.el = new Gtk.HPaned();
893 // set gobject values
894 this.el.position = 300;
895 var child_0 = new Xcls_ScrolledWindow28( _this );
897 this.el.add1 ( child_0.el );
898 var child_1 = new Xcls_set_vbox( _this );
900 this.el.add2 ( child_1.el );
903 // user defined functions
905 public class Xcls_ScrolledWindow28 : Object
907 public Gtk.ScrolledWindow el;
908 private ValaProjectSettings _this;
914 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
917 this.el = new Gtk.ScrolledWindow( null, null );
921 // set gobject values
922 var child_0 = new Xcls_targets_tree_menu( _this );
924 this.el.add ( child_0.el );
925 var child_1 = new Xcls_targets_tree( _this );
927 this.el.add ( child_1.el );
932 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
936 // user defined functions
938 public class Xcls_targets_tree_menu : Object
941 private ValaProjectSettings _this;
947 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
950 _this.targets_tree_menu = this;
951 this.el = new Gtk.Menu();
955 // set gobject values
956 var child_0 = new Xcls_MenuItem30( _this );
958 this.el.add ( child_0.el );
959 var child_1 = new Xcls_SeparatorMenuItem31( _this );
961 this.el.add ( child_1.el );
962 var child_2 = new Xcls_MenuItem32( _this );
964 this.el.add ( child_2.el );
967 // user defined functions
969 public class Xcls_MenuItem30 : Object
971 public Gtk.MenuItem el;
972 private ValaProjectSettings _this;
978 public Xcls_MenuItem30(ValaProjectSettings _owner )
981 this.el = new Gtk.MenuItem();
985 // set gobject values
986 this.el.label = "Add Compile Target";
989 this.el.activate.connect( () => {
991 if (_this.project.compilegroups.has_key("NEW GROUP")) {
995 // add the directory..
997 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
998 _this.targets_tree_store.load();
1002 // user defined functions
1004 public class Xcls_SeparatorMenuItem31 : Object
1006 public Gtk.SeparatorMenuItem el;
1007 private ValaProjectSettings _this;
1013 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1016 this.el = new Gtk.SeparatorMenuItem();
1020 // set gobject values
1023 // user defined functions
1025 public class Xcls_MenuItem32 : Object
1027 public Gtk.MenuItem el;
1028 private ValaProjectSettings _this;
1034 public Xcls_MenuItem32(ValaProjectSettings _owner )
1037 this.el = new Gtk.MenuItem();
1041 // set gobject values
1042 this.el.label = "Remove Target";
1045 this.el.activate.connect( () => {
1050 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1051 print("nothing selected\n");
1056 // add the directory..
1060 mod.get_value(iter,0, out val);
1061 var fn = (string) val;
1063 print("remove: %s\n", fn);
1064 if (!_this.project.compilegroups.unset(fn)) {
1065 print("remove failed");
1067 _this.targets_tree_store.load();
1071 // user defined functions
1073 public class Xcls_targets_tree : Object
1075 public Gtk.TreeView el;
1076 private ValaProjectSettings _this;
1080 public string cursor;
1083 public Xcls_targets_tree(ValaProjectSettings _owner )
1086 _this.targets_tree = this;
1087 this.el = new Gtk.TreeView();
1091 // set gobject values
1092 var child_0 = new Xcls_targets_tree_store( _this );
1094 this.el.set_model ( child_0.el );
1095 var child_1 = new Xcls_TreeViewColumn35( _this );
1097 this.el.append_column ( child_1.el );
1100 this.el.button_press_event.connect( ( ev) => {
1101 //console.log("button press?");
1104 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1105 //print("click" + ev.type);
1109 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1113 // this.el.get_selection().select_path(res);
1115 //if (!this.get('/LeftTreeMenu').el) {
1116 // this.get('/LeftTreeMenu').init();
1119 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1120 _this.targets_tree_menu.el.show_all();
1121 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1122 // print("click:" + res.path.to_string());
1125 this.el.cursor_changed.connect( ( ) => {
1127 if (this.cursor != "") {
1128 // save the values..
1131 // load the new values.
1136 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1137 print("nothing selected\n");
1138 // should disable the right hand side..
1139 _this.set_vbox.el.hide();
1142 _this.set_vbox.el.show();
1144 // add the directory..
1148 mod.get_value(iter,0, out val);
1149 var fn = (string) val;
1152 var cg = _this.project.compilegroups.get(fn);
1154 _this.build_pack_target.el.set_text(cg.target_bin);
1155 _this.build_compile_flags.el.set_text(cg.compile_flags);
1157 //_this.files_tree_store.updatesel(cg);
1164 // user defined functions
1166 public class Xcls_targets_tree_store : Object
1168 public Gtk.ListStore el;
1169 private ValaProjectSettings _this;
1175 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1178 _this.targets_tree_store = this;
1179 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1180 typeof(string) // ??
1185 // set gobject values
1188 // user defined functions
1189 public void load () {
1194 var cg = _this.project.compilegroups;
1196 _this.targets_tree.cursor = "";
1198 var iter = cg.map_iterator();
1199 while(iter.next()) {
1200 var key = iter.get_key();
1201 if (key == "_default_") {
1205 this.el.append(out citer);
1207 this.el.set_value(citer, 0, key ); // title
1208 //this.el.set_value(citer, 1, items.get(i) );
1210 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1214 public class Xcls_TreeViewColumn35 : Object
1216 public Gtk.TreeViewColumn el;
1217 private ValaProjectSettings _this;
1223 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1226 this.el = new Gtk.TreeViewColumn();
1230 // set gobject values
1231 this.el.title = "name";
1232 this.el.resizable = true;
1233 var child_0 = new Xcls_targets_render( _this );
1235 this.el.pack_start ( child_0.el , false );
1240 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1243 // user defined functions
1245 public class Xcls_targets_render : Object
1247 public Gtk.CellRendererText el;
1248 private ValaProjectSettings _this;
1254 public Xcls_targets_render(ValaProjectSettings _owner )
1257 _this.targets_render = this;
1258 this.el = new Gtk.CellRendererText();
1262 // set gobject values
1263 this.el.editable = true;
1266 this.el.edited.connect( (path, newtext) => {
1269 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1271 _this.targets_tree_store.el.get_value(iter,0, out gval);
1272 var oldval = (string)gval;
1273 if (oldval == newtext) {
1276 var cg = _this.project.compilegroups.get(oldval);
1278 _this.project.compilegroups.unset(oldval);
1279 _this.project.compilegroups.set(newtext, cg);
1280 _this.targets_tree_store.load();
1284 // user defined functions
1286 public class Xcls_set_vbox : Object
1289 private ValaProjectSettings _this;
1295 public Xcls_set_vbox(ValaProjectSettings _owner )
1298 _this.set_vbox = this;
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( 3, 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;
1540 for(var i =0 ; i < items.size; i++) {
1541 this.el.append(out citer);
1543 this.el.set_value(citer, 0, items.get(i) ); // title
1544 this.el.set_value(citer, 1, "dir"); // type
1545 this.el.set_value(citer, 2, false ); // checked
1547 var files = _this.project.files(items.get(i));
1549 for(var j =0 ; j < files.size; j++) {
1550 this.el.append(out citer);
1552 this.el.set_value(citer, 0, files.get(j) ); // title
1553 this.el.set_value(citer, 1, "file"); // type
1554 this.el.set_value(citer, 2, false ); // checked
1559 //this.el.set_value(citer, 1, items.get(i) );
1561 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1565 public class Xcls_TreeViewColumn46 : Object
1567 public Gtk.TreeViewColumn el;
1568 private ValaProjectSettings _this;
1574 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1577 this.el = new Gtk.TreeViewColumn();
1581 // set gobject values
1582 this.el.title = "name";
1583 this.el.resizable = true;
1584 var child_0 = new Xcls_files_render( _this );
1586 this.el.pack_start ( child_0.el , false );
1590 this.el.add_attribute(_this.files_render.el , "text", 0 );
1592 // this.el.add_attribute(_this.files_render.el , "markup", 2 ); }
1594 // user defined functions
1596 public class Xcls_files_render : Object
1598 public Gtk.CellRendererText el;
1599 private ValaProjectSettings _this;
1605 public Xcls_files_render(ValaProjectSettings _owner )
1608 _this.files_render = this;
1609 this.el = new Gtk.CellRendererText();
1613 // set gobject values
1616 // user defined functions
1618 public class Xcls_TreeViewColumn48 : Object
1620 public Gtk.TreeViewColumn el;
1621 private ValaProjectSettings _this;
1627 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1630 this.el = new Gtk.TreeViewColumn();
1634 // set gobject values
1635 this.el.title = "use";
1636 this.el.resizable = false;
1637 this.el.fixed_width = 50;
1638 var child_0 = new Xcls_files_render_use( _this );
1640 this.el.pack_start ( child_0.el , false );
1646 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1650 // user defined functions
1652 public class Xcls_files_render_use : Object
1654 public Gtk.CellRendererToggle el;
1655 private ValaProjectSettings _this;
1661 public Xcls_files_render_use(ValaProjectSettings _owner )
1664 _this.files_render_use = this;
1665 this.el = new Gtk.CellRendererToggle();
1669 // set gobject values
1670 this.el.activatable = true;
1673 this.el.toggled.connect( ( path_string) => {
1674 var m = _this.default_packages_tree_store.el;
1676 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1677 m.get_iter (out iter, path);
1679 m.get_value(iter, 1, out val);
1680 m.set_value(iter, 1, ((bool) val) ? false :true);
1682 m.get_value(iter, 0, out fval);
1683 var fn = (string)fval;
1685 var def = _this.project.compilegroups.get("_default_");
1686 var items = def.packages;
1697 // user defined functions