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 ();
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();
78 public class Xcls_Notebook2 : Object
80 public Gtk.Notebook el;
81 private ValaProjectSettings _this;
87 public Xcls_Notebook2(ValaProjectSettings _owner )
90 this.el = new Gtk.Notebook();
95 var child_0 = new Xcls_label_global( _this );
97 var child_1 = new Xcls_label_targets( _this );
99 var child_2 = new Xcls_VBox5( _this );
101 this.el.append_page ( child_2.el , _this.label_global.el );
102 var child_3 = new Xcls_HPaned27( _this );
104 this.el.append_page ( child_3.el , _this.label_targets.el );
107 // user defined functions
109 public class Xcls_label_global : Object
112 private ValaProjectSettings _this;
118 public Xcls_label_global(ValaProjectSettings _owner )
121 _this.label_global = this;
122 this.el = new Gtk.Label( "Global" );
126 // set gobject values
129 // user defined functions
131 public class Xcls_label_targets : Object
134 private ValaProjectSettings _this;
140 public Xcls_label_targets(ValaProjectSettings _owner )
143 _this.label_targets = this;
144 this.el = new Gtk.Label( "Targets" );
148 // set gobject values
151 // user defined functions
153 public class Xcls_VBox5 : Object
156 private ValaProjectSettings _this;
162 public Xcls_VBox5(ValaProjectSettings _owner )
165 this.el = new Gtk.VBox( false, 0 );
169 // set gobject values
170 var child_0 = new Xcls_Label6( _this );
172 this.el.pack_start ( child_0.el , false,false,0 );
173 var child_1 = new Xcls_compile_flags( _this );
175 this.el.pack_start ( child_1.el , false,false,0 );
176 var child_2 = new Xcls_Label8( _this );
178 this.el.pack_start ( child_2.el , false,false,0 );
179 var child_3 = new Xcls_ScrolledWindow9( _this );
181 this.el.pack_start ( child_3.el , true,true,0 );
182 var child_4 = new Xcls_Label16( _this );
184 this.el.pack_start ( child_4.el , false,false,0 );
185 var child_5 = new Xcls_ScrolledWindow17( _this );
187 this.el.pack_start ( child_5.el , true,true,0 );
190 // user defined functions
192 public class Xcls_Label6 : Object
195 private ValaProjectSettings _this;
201 public Xcls_Label6(ValaProjectSettings _owner )
204 this.el = new Gtk.Label( "compile flags" );
208 // set gobject values
211 // user defined functions
213 public class Xcls_compile_flags : Object
216 private ValaProjectSettings _this;
222 public Xcls_compile_flags(ValaProjectSettings _owner )
225 _this.compile_flags = this;
226 this.el = new Gtk.Entry();
230 // set gobject values
231 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
234 this.el.changed.connect( () => {
236 _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
237 _this.project.writeConfig();
238 // _this.project.save();
243 // user defined functions
245 public class Xcls_Label8 : Object
248 private ValaProjectSettings _this;
254 public Xcls_Label8(ValaProjectSettings _owner )
257 this.el = new Gtk.Label( "packages" );
261 // set gobject values
264 // user defined functions
266 public class Xcls_ScrolledWindow9 : Object
268 public Gtk.ScrolledWindow el;
269 private ValaProjectSettings _this;
275 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
278 this.el = new Gtk.ScrolledWindow( null, null );
282 // set gobject values
283 var child_0 = new Xcls_default_packages_tree( _this );
285 this.el.add ( child_0.el );
288 // user defined functions
290 public class Xcls_default_packages_tree : Object
292 public Gtk.TreeView el;
293 private ValaProjectSettings _this;
299 public Xcls_default_packages_tree(ValaProjectSettings _owner )
302 this.el = new Gtk.TreeView();
306 // set gobject values
307 this.el.headers_visible = false;
308 var child_0 = new Xcls_default_packages_tree_store( _this );
310 this.el.set_model ( child_0.el );
311 var child_1 = new Xcls_TreeViewColumn12( _this );
313 this.el.append_column ( child_1.el );
314 var child_2 = new Xcls_TreeViewColumn14( _this );
316 this.el.append_column ( child_2.el );
319 // user defined functions
321 public class Xcls_default_packages_tree_store : Object
323 public Gtk.ListStore el;
324 private ValaProjectSettings _this;
330 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
333 _this.default_packages_tree_store = this;
334 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
339 // set gobject values
342 // user defined functions
343 public void load () {
345 var def = _this.project.compilegroups.get("_default_");
346 var items = def.packages;
349 var pal = (Palete.Gtk) Palete.factory("Gtk");
350 var pkgs = pal.packages();
351 print("ValaProjectSettings:packages load %d\n", pkgs.size);
355 for(var i =0 ; i < pkgs.size; i++) {
356 this.el.append(out citer);
358 this.el.set_value(citer, 0, pkgs.get(i) ); // title
359 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
361 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
365 public class Xcls_TreeViewColumn12 : Object
367 public Gtk.TreeViewColumn el;
368 private ValaProjectSettings _this;
374 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
377 this.el = new Gtk.TreeViewColumn();
381 // set gobject values
382 this.el.title = "name";
383 this.el.expand = true;
384 this.el.resizable = true;
385 var child_0 = new Xcls_packages_render( _this );
387 this.el.pack_start ( child_0.el , false );
391 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
393 // user defined functions
395 public class Xcls_packages_render : Object
397 public Gtk.CellRendererText el;
398 private ValaProjectSettings _this;
404 public Xcls_packages_render(ValaProjectSettings _owner )
407 _this.packages_render = this;
408 this.el = new Gtk.CellRendererText();
412 // set gobject values
415 // user defined functions
417 public class Xcls_TreeViewColumn14 : Object
419 public Gtk.TreeViewColumn el;
420 private ValaProjectSettings _this;
426 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
429 this.el = new Gtk.TreeViewColumn();
433 // set gobject values
434 this.el.title = "use";
435 this.el.resizable = false;
436 this.el.fixed_width = 50;
437 var child_0 = new Xcls_packages_render_use( _this );
439 this.el.pack_start ( child_0.el , false );
444 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
447 // user defined functions
449 public class Xcls_packages_render_use : Object
451 public Gtk.CellRendererToggle el;
452 private ValaProjectSettings _this;
458 public Xcls_packages_render_use(ValaProjectSettings _owner )
461 _this.packages_render_use = this;
462 this.el = new Gtk.CellRendererToggle();
466 // set gobject values
467 this.el.activatable = true;
470 this.el.toggled.connect( ( path_string) => {
471 var m = _this.default_packages_tree_store.el;
473 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
474 m.get_iter (out iter, path);
476 m.get_value(iter, 1, out val);
477 m.set_value(iter, 1, ((bool) val) ? false :true);
479 m.get_value(iter, 0, out fval);
480 var fn = (string)fval;
482 var def = _this.project.compilegroups.get("_default_");
483 var items = def.packages;
494 // user defined functions
496 public class Xcls_Label16 : Object
499 private ValaProjectSettings _this;
505 public Xcls_Label16(ValaProjectSettings _owner )
508 this.el = new Gtk.Label( "Available Directories" );
512 // set gobject values
515 // user defined functions
517 public class Xcls_ScrolledWindow17 : Object
519 public Gtk.ScrolledWindow el;
520 private ValaProjectSettings _this;
526 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
529 this.el = new Gtk.ScrolledWindow( null, null );
533 // set gobject values
534 var child_0 = new Xcls_default_directory_tree( _this );
536 this.el.add ( child_0.el );
537 var child_1 = new Xcls_default_directory_menu( _this );
541 // user defined functions
543 public class Xcls_default_directory_tree : Object
545 public Gtk.TreeView el;
546 private ValaProjectSettings _this;
552 public Xcls_default_directory_tree(ValaProjectSettings _owner )
555 _this.default_directory_tree = this;
556 this.el = new Gtk.TreeView();
560 // set gobject values
561 this.el.headers_visible = false;
562 var child_0 = new Xcls_default_directory_tree_store( _this );
564 this.el.set_model ( child_0.el );
565 var child_1 = new Xcls_TreeViewColumn20( _this );
567 this.el.append_column ( child_1.el );
570 this.el.button_press_event.connect( ( ev) => {
571 //console.log("button press?");
574 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
575 //print("click" + ev.type);
579 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
583 // this.el.get_selection().select_path(res);
585 //if (!this.get('/LeftTreeMenu').el) {
586 // this.get('/LeftTreeMenu').init();
589 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
590 _this.default_directory_menu.el.show_all();
591 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
592 // print("click:" + res.path.to_string());
597 // user defined functions
599 public class Xcls_default_directory_tree_store : Object
601 public Gtk.ListStore el;
602 private ValaProjectSettings _this;
608 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
611 _this.default_directory_tree_store = this;
612 this.el = new Gtk.ListStore( 1, typeof(string)
617 // set gobject values
620 // user defined functions
621 public void load () {
626 var def = _this.project.compilegroups.get("_default_");
627 var items = def.sources;
632 for(var i =0 ; i < items.size; i++) {
633 this.el.append(out citer);
635 this.el.set_value(citer, 0, items.get(i) ); // title
636 //this.el.set_value(citer, 1, items.get(i) );
638 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
642 public class Xcls_TreeViewColumn20 : Object
644 public Gtk.TreeViewColumn el;
645 private ValaProjectSettings _this;
651 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
654 this.el = new Gtk.TreeViewColumn();
658 // set gobject values
659 this.el.title = "name";
660 this.el.resizable = true;
661 var child_0 = new Xcls_directory_render( _this );
663 this.el.pack_start ( child_0.el , false );
667 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
669 // user defined functions
671 public class Xcls_directory_render : Object
673 public Gtk.CellRendererText el;
674 private ValaProjectSettings _this;
680 public Xcls_directory_render(ValaProjectSettings _owner )
683 _this.directory_render = this;
684 this.el = new Gtk.CellRendererText();
688 // set gobject values
691 // user defined functions
693 public class Xcls_default_directory_menu : Object
696 private ValaProjectSettings _this;
702 public Xcls_default_directory_menu(ValaProjectSettings _owner )
705 _this.default_directory_menu = this;
706 this.el = new Gtk.Menu();
710 // set gobject values
711 var child_0 = new Xcls_MenuItem23( _this );
713 this.el.add ( child_0.el );
714 var child_1 = new Xcls_MenuItem24( _this );
716 this.el.add ( child_1.el );
717 var child_2 = new Xcls_SeparatorMenuItem25( _this );
719 this.el.add ( child_2.el );
720 var child_3 = new Xcls_MenuItem26( _this );
722 this.el.add ( child_3.el );
725 // user defined functions
727 public class Xcls_MenuItem23 : Object
729 public Gtk.MenuItem el;
730 private ValaProjectSettings _this;
736 public Xcls_MenuItem23(ValaProjectSettings _owner )
739 this.el = new Gtk.MenuItem();
743 // set gobject values
744 this.el.label = "Add Directory";
747 this.el.activate.connect( () => {
749 var chooser = new Gtk.FileChooserDialog (
750 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
752 Gtk.ResponseType.CANCEL,
754 Gtk.ResponseType.ACCEPT);
755 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
760 // add the directory..
761 var fn = _this.project.relPath(chooser.get_filename());
762 _this.project.compilegroups.get("_default_").sources.add(fn);
763 _this.default_directory_tree_store.load();
767 // user defined functions
769 public class Xcls_MenuItem24 : Object
771 public Gtk.MenuItem el;
772 private ValaProjectSettings _this;
778 public Xcls_MenuItem24(ValaProjectSettings _owner )
781 this.el = new Gtk.MenuItem();
785 // set gobject values
786 this.el.label = "Add File";
789 this.el.activate.connect( () => {
791 var chooser = new Gtk.FileChooserDialog (
792 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
794 Gtk.ResponseType.CANCEL,
796 Gtk.ResponseType.ACCEPT);
797 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
802 // add the directory..
803 var fn = _this.project.relPath(chooser.get_filename());
804 _this.project.compilegroups.get("_default_").sources.add(fn);
805 _this.default_directory_tree_store.load();
809 // user defined functions
811 public class Xcls_SeparatorMenuItem25 : Object
813 public Gtk.SeparatorMenuItem el;
814 private ValaProjectSettings _this;
820 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
823 this.el = new Gtk.SeparatorMenuItem();
827 // set gobject values
830 // user defined functions
832 public class Xcls_MenuItem26 : Object
834 public Gtk.MenuItem el;
835 private ValaProjectSettings _this;
841 public Xcls_MenuItem26(ValaProjectSettings _owner )
844 this.el = new Gtk.MenuItem();
848 // set gobject values
849 this.el.label = "Remove File/Directory";
852 this.el.activate.connect( () => {
857 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
858 print("nothing selected\n");
863 // add the directory..
867 mod.get_value(iter,0, out val);
868 var fn = (string) val;
870 print("remove: %s\n", fn);
871 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
872 print("remove failed");
874 _this.default_directory_tree_store.load();
878 // user defined functions
880 public class Xcls_HPaned27 : Object
882 public Gtk.HPaned el;
883 private ValaProjectSettings _this;
889 public Xcls_HPaned27(ValaProjectSettings _owner )
892 this.el = new Gtk.HPaned();
896 // set gobject values
897 this.el.position = 300;
898 var child_0 = new Xcls_ScrolledWindow28( _this );
900 this.el.add1 ( child_0.el );
901 var child_1 = new Xcls_set_vbox( _this );
903 this.el.add2 ( child_1.el );
906 // user defined functions
908 public class Xcls_ScrolledWindow28 : Object
910 public Gtk.ScrolledWindow el;
911 private ValaProjectSettings _this;
917 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
920 this.el = new Gtk.ScrolledWindow( null, null );
924 // set gobject values
925 var child_0 = new Xcls_targets_tree_menu( _this );
927 this.el.add ( child_0.el );
928 var child_1 = new Xcls_targets_tree( _this );
930 this.el.add ( child_1.el );
935 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
939 // user defined functions
941 public class Xcls_targets_tree_menu : Object
944 private ValaProjectSettings _this;
950 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
953 _this.targets_tree_menu = this;
954 this.el = new Gtk.Menu();
958 // set gobject values
959 var child_0 = new Xcls_MenuItem30( _this );
961 this.el.add ( child_0.el );
962 var child_1 = new Xcls_SeparatorMenuItem31( _this );
964 this.el.add ( child_1.el );
965 var child_2 = new Xcls_MenuItem32( _this );
967 this.el.add ( child_2.el );
970 // user defined functions
972 public class Xcls_MenuItem30 : Object
974 public Gtk.MenuItem el;
975 private ValaProjectSettings _this;
981 public Xcls_MenuItem30(ValaProjectSettings _owner )
984 this.el = new Gtk.MenuItem();
988 // set gobject values
989 this.el.label = "Add Compile Target";
992 this.el.activate.connect( () => {
994 if (_this.project.compilegroups.has_key("NEW GROUP")) {
998 // add the directory..
1000 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
1001 _this.targets_tree_store.load();
1005 // user defined functions
1007 public class Xcls_SeparatorMenuItem31 : Object
1009 public Gtk.SeparatorMenuItem el;
1010 private ValaProjectSettings _this;
1016 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1019 this.el = new Gtk.SeparatorMenuItem();
1023 // set gobject values
1026 // user defined functions
1028 public class Xcls_MenuItem32 : Object
1030 public Gtk.MenuItem el;
1031 private ValaProjectSettings _this;
1037 public Xcls_MenuItem32(ValaProjectSettings _owner )
1040 this.el = new Gtk.MenuItem();
1044 // set gobject values
1045 this.el.label = "Remove Target";
1048 this.el.activate.connect( () => {
1053 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1054 print("nothing selected\n");
1059 // add the directory..
1063 mod.get_value(iter,0, out val);
1064 var fn = (string) val;
1066 print("remove: %s\n", fn);
1067 if (!_this.project.compilegroups.unset(fn)) {
1068 print("remove failed");
1070 _this.targets_tree_store.load();
1074 // user defined functions
1076 public class Xcls_targets_tree : Object
1078 public Gtk.TreeView el;
1079 private ValaProjectSettings _this;
1083 public string cursor;
1086 public Xcls_targets_tree(ValaProjectSettings _owner )
1089 _this.targets_tree = this;
1090 this.el = new Gtk.TreeView();
1094 // set gobject values
1095 var child_0 = new Xcls_targets_tree_store( _this );
1097 this.el.set_model ( child_0.el );
1098 var child_1 = new Xcls_TreeViewColumn35( _this );
1100 this.el.append_column ( child_1.el );
1103 this.el.button_press_event.connect( ( ev) => {
1104 //console.log("button press?");
1107 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1108 //print("click" + ev.type);
1112 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1116 // this.el.get_selection().select_path(res);
1118 //if (!this.get('/LeftTreeMenu').el) {
1119 // this.get('/LeftTreeMenu').init();
1122 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1123 _this.targets_tree_menu.el.show_all();
1124 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1125 // print("click:" + res.path.to_string());
1128 this.el.cursor_changed.connect( ( ) => {
1130 if (this.cursor != "") {
1131 // save the values..
1134 // load the new values.
1139 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1140 print("nothing selected\n");
1145 // add the directory..
1149 mod.get_value(iter,0, out val);
1150 var fn = (string) val;
1153 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);
1162 // user defined functions
1164 public class Xcls_targets_tree_store : Object
1166 public Gtk.ListStore el;
1167 private ValaProjectSettings _this;
1173 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1176 _this.targets_tree_store = this;
1177 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1178 typeof(string) // ??
1183 // set gobject values
1186 // user defined functions
1187 public void load () {
1192 var cg = _this.project.compilegroups;
1194 _this.targets_tree.cursor = "";
1196 var iter = cg.map_iterator();
1197 while(iter.next()) {
1198 var key = iter.get_key();
1199 if (key == "_default_") {
1203 this.el.append(out citer);
1205 this.el.set_value(citer, 0, key ); // title
1206 //this.el.set_value(citer, 1, items.get(i) );
1208 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1212 public class Xcls_TreeViewColumn35 : Object
1214 public Gtk.TreeViewColumn el;
1215 private ValaProjectSettings _this;
1221 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1224 this.el = new Gtk.TreeViewColumn();
1228 // set gobject values
1229 this.el.title = "name";
1230 this.el.resizable = true;
1231 var child_0 = new Xcls_targets_render( _this );
1233 this.el.pack_start ( child_0.el , false );
1238 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1241 // user defined functions
1243 public class Xcls_targets_render : Object
1245 public Gtk.CellRendererText el;
1246 private ValaProjectSettings _this;
1252 public Xcls_targets_render(ValaProjectSettings _owner )
1255 _this.targets_render = this;
1256 this.el = new Gtk.CellRendererText();
1260 // set gobject values
1261 this.el.editable = true;
1264 this.el.edited.connect( (path, newtext) => {
1267 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1269 _this.targets_tree_store.el.get_value(iter,0, out gval);
1270 var oldval = (string)gval;
1271 if (oldval == newtext) {
1274 var cg = _this.project.compilegroups.get(oldval);
1276 _this.project.compilegroups.unset(oldval);
1277 _this.project.compilegroups.set(newtext, cg);
1278 _this.targets_tree_store.load();
1282 // user defined functions
1284 public class Xcls_set_vbox : Object
1287 private ValaProjectSettings _this;
1293 public Xcls_set_vbox(ValaProjectSettings _owner )
1296 this.el = new Gtk.VBox( false, 0 );
1300 // set gobject values
1301 var child_0 = new Xcls_Label38( _this );
1303 this.el.pack_start ( child_0.el , false,false,0 );
1304 var child_1 = new Xcls_build_pack_target( _this );
1306 this.el.pack_start ( child_1.el , false,false,0 );
1307 var child_2 = new Xcls_Label40( _this );
1309 this.el.pack_start ( child_2.el , false,false,0 );
1310 var child_3 = new Xcls_build_compile_flags( _this );
1312 this.el.pack_start ( child_3.el , false,false,0 );
1313 var child_4 = new Xcls_Label42( _this );
1315 this.el.pack_start ( child_4.el , false,false,0 );
1316 var child_5 = new Xcls_ScrolledWindow43( _this );
1318 this.el.pack_start ( child_5.el , true,true,0 );
1321 // user defined functions
1323 public class Xcls_Label38 : Object
1325 public Gtk.Label el;
1326 private ValaProjectSettings _this;
1332 public Xcls_Label38(ValaProjectSettings _owner )
1335 this.el = new Gtk.Label( "target filename" );
1339 // set gobject values
1342 // user defined functions
1344 public class Xcls_build_pack_target : Object
1346 public Gtk.Entry el;
1347 private ValaProjectSettings _this;
1353 public Xcls_build_pack_target(ValaProjectSettings _owner )
1356 _this.build_pack_target = this;
1357 this.el = new Gtk.Entry();
1361 // set gobject values
1364 this.el.changed.connect( () => {
1365 if (_this.targets_tree.cursor.length < 1) {
1368 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1372 // user defined functions
1374 public class Xcls_Label40 : Object
1376 public Gtk.Label el;
1377 private ValaProjectSettings _this;
1383 public Xcls_Label40(ValaProjectSettings _owner )
1386 this.el = new Gtk.Label( "compile flags" );
1390 // set gobject values
1393 // user defined functions
1395 public class Xcls_build_compile_flags : Object
1397 public Gtk.Entry el;
1398 private ValaProjectSettings _this;
1404 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1407 _this.build_compile_flags = this;
1408 this.el = new Gtk.Entry();
1412 // set gobject values
1415 this.el.changed.connect( () => {
1416 if (_this.targets_tree.cursor.length < 1) {
1419 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1423 // user defined functions
1425 public class Xcls_Label42 : Object
1427 public Gtk.Label el;
1428 private ValaProjectSettings _this;
1434 public Xcls_Label42(ValaProjectSettings _owner )
1437 this.el = new Gtk.Label( "Files to compile" );
1441 // set gobject values
1444 // user defined functions
1446 public class Xcls_ScrolledWindow43 : Object
1448 public Gtk.ScrolledWindow el;
1449 private ValaProjectSettings _this;
1455 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1458 this.el = new Gtk.ScrolledWindow( null, null );
1462 // set gobject values
1463 var child_0 = new Xcls_files_tree( _this );
1467 // user defined functions
1469 public class Xcls_files_tree : Object
1471 public Gtk.TreeView el;
1472 private ValaProjectSettings _this;
1478 public Xcls_files_tree(ValaProjectSettings _owner )
1481 this.el = new Gtk.TreeView();
1485 // set gobject values
1486 var child_0 = new Xcls_files_tree_store( _this );
1488 this.el.set_model ( child_0.el );
1489 var child_1 = new Xcls_TreeViewColumn46( _this );
1491 this.el.append_column ( child_1.el );
1492 var child_2 = new Xcls_TreeViewColumn48( _this );
1494 this.el.append_column ( child_2.el );
1497 // user defined functions
1499 public class Xcls_files_tree_store : Object
1501 public Gtk.ListStore el;
1502 private ValaProjectSettings _this;
1508 public Xcls_files_tree_store(ValaProjectSettings _owner )
1511 _this.files_tree_store = this;
1512 this.el = new Gtk.ListStore( 2, typeof(string), // 0 file name
1513 typeof(string), // type (dir orfile)
1514 typeof(bool) // is checked.
1519 // set gobject values
1522 // user defined functions
1523 public void load () {
1528 var def = _this.project.compilegroups.get("_default_");
1529 var items = def.sources;
1534 for(var i =0 ; i < items.size; i++) {
1535 this.el.append(out citer);
1537 this.el.set_value(citer, 0, items.get(i) ); // title
1538 this.el.set_value(citer, 1, "dir"); // type
1539 this.el.set_value(citer, 2, false ); // checked
1541 var files = def.files(items.get(i));
1543 for(var j =0 ; j < files.size; j++) {
1544 this.el.append(out citer);
1546 this.el.set_value(citer, 0, files.get(j) ); // title
1547 this.el.set_value(citer, 1, "file"); // type
1548 this.el.set_value(citer, 2, false ); // checked
1553 //this.el.set_value(citer, 1, items.get(i) );
1555 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1559 public class Xcls_TreeViewColumn46 : Object
1561 public Gtk.TreeViewColumn el;
1562 private ValaProjectSettings _this;
1568 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1571 this.el = new Gtk.TreeViewColumn();
1575 // set gobject values
1576 this.el.title = "name";
1577 this.el.resizable = true;
1578 var child_0 = new Xcls_files_render( _this );
1580 this.el.pack_start ( child_0.el , false );
1584 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1585 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1587 // user defined functions
1589 public class Xcls_files_render : Object
1591 public Gtk.CellRendererText el;
1592 private ValaProjectSettings _this;
1598 public Xcls_files_render(ValaProjectSettings _owner )
1601 _this.files_render = this;
1602 this.el = new Gtk.CellRendererText();
1606 // set gobject values
1609 // user defined functions
1611 public class Xcls_TreeViewColumn48 : Object
1613 public Gtk.TreeViewColumn el;
1614 private ValaProjectSettings _this;
1620 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1623 this.el = new Gtk.TreeViewColumn();
1627 // set gobject values
1628 this.el.title = "use";
1629 this.el.resizable = false;
1630 this.el.fixed_width = 50;
1631 var child_0 = new Xcls_files_render_use( _this );
1633 this.el.pack_start ( child_0.el , false );
1639 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1643 // user defined functions
1645 public class Xcls_files_render_use : Object
1647 public Gtk.CellRendererToggle el;
1648 private ValaProjectSettings _this;
1654 public Xcls_files_render_use(ValaProjectSettings _owner )
1657 _this.files_render_use = this;
1658 this.el = new Gtk.CellRendererToggle();
1662 // set gobject values
1663 this.el.activatable = true;
1666 this.el.toggled.connect( ( path_string) => {
1667 var m = _this.default_packages_tree_store.el;
1669 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1670 m.get_iter (out iter, path);
1672 m.get_value(iter, 1, out val);
1673 m.set_value(iter, 1, ((bool) val) ? false :true);
1675 m.get_value(iter, 0, out fval);
1676 var fn = (string)fval;
1678 var def = _this.project.compilegroups.get("_default_");
1679 var items = def.packages;
1690 // user defined functions