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();
72 public class Xcls_Notebook2 : Object
74 public Gtk.Notebook el;
75 private ValaProjectSettings _this;
81 public Xcls_Notebook2(ValaProjectSettings _owner )
84 this.el = new Gtk.Notebook();
89 var child_0 = new Xcls_label_global( _this );
91 var child_1 = new Xcls_label_targets( _this );
93 var child_2 = new Xcls_VBox5( _this );
95 this.el.append_page ( child_2.el , _this.label_global.el );
96 var child_3 = new Xcls_HPaned27( _this );
98 this.el.append_page ( child_3.el , _this.label_targets.el );
101 // user defined functions
103 public class Xcls_label_global : Object
106 private ValaProjectSettings _this;
112 public Xcls_label_global(ValaProjectSettings _owner )
115 _this.label_global = this;
116 this.el = new Gtk.Label( "Global" );
120 // set gobject values
123 // user defined functions
125 public class Xcls_label_targets : Object
128 private ValaProjectSettings _this;
134 public Xcls_label_targets(ValaProjectSettings _owner )
137 _this.label_targets = this;
138 this.el = new Gtk.Label( "Targets" );
142 // set gobject values
145 // user defined functions
147 public class Xcls_VBox5 : Object
150 private ValaProjectSettings _this;
156 public Xcls_VBox5(ValaProjectSettings _owner )
159 this.el = new Gtk.VBox( false, 0 );
163 // set gobject values
164 var child_0 = new Xcls_Label6( _this );
166 this.el.pack_start ( child_0.el , false,false,0 );
167 var child_1 = new Xcls_compile_flags( _this );
169 this.el.pack_start ( child_1.el , false,false,0 );
170 var child_2 = new Xcls_Label8( _this );
172 this.el.pack_start ( child_2.el , false,false,0 );
173 var child_3 = new Xcls_ScrolledWindow9( _this );
175 this.el.pack_start ( child_3.el , true,true,0 );
176 var child_4 = new Xcls_Label16( _this );
178 this.el.pack_start ( child_4.el , false,false,0 );
179 var child_5 = new Xcls_ScrolledWindow17( _this );
181 this.el.pack_start ( child_5.el , true,true,0 );
184 // user defined functions
186 public class Xcls_Label6 : Object
189 private ValaProjectSettings _this;
195 public Xcls_Label6(ValaProjectSettings _owner )
198 this.el = new Gtk.Label( "compile flags" );
202 // set gobject values
205 // user defined functions
207 public class Xcls_compile_flags : Object
210 private ValaProjectSettings _this;
216 public Xcls_compile_flags(ValaProjectSettings _owner )
219 _this.compile_flags = this;
220 this.el = new Gtk.Entry();
224 // set gobject values
225 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
228 this.el.changed.connect( () => {
230 _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
231 _this.project.writeConfig();
232 // _this.project.save();
237 // user defined functions
239 public class Xcls_Label8 : Object
242 private ValaProjectSettings _this;
248 public Xcls_Label8(ValaProjectSettings _owner )
251 this.el = new Gtk.Label( "packages" );
255 // set gobject values
258 // user defined functions
260 public class Xcls_ScrolledWindow9 : Object
262 public Gtk.ScrolledWindow el;
263 private ValaProjectSettings _this;
269 public Xcls_ScrolledWindow9(ValaProjectSettings _owner )
272 this.el = new Gtk.ScrolledWindow( null, null );
276 // set gobject values
277 var child_0 = new Xcls_default_packages_tree( _this );
279 this.el.add ( child_0.el );
282 // user defined functions
284 public class Xcls_default_packages_tree : Object
286 public Gtk.TreeView el;
287 private ValaProjectSettings _this;
293 public Xcls_default_packages_tree(ValaProjectSettings _owner )
296 this.el = new Gtk.TreeView();
300 // set gobject values
301 this.el.headers_visible = false;
302 var child_0 = new Xcls_default_packages_tree_store( _this );
304 this.el.set_model ( child_0.el );
305 var child_1 = new Xcls_TreeViewColumn12( _this );
307 this.el.append_column ( child_1.el );
308 var child_2 = new Xcls_TreeViewColumn14( _this );
310 this.el.append_column ( child_2.el );
313 // user defined functions
315 public class Xcls_default_packages_tree_store : Object
317 public Gtk.ListStore el;
318 private ValaProjectSettings _this;
324 public Xcls_default_packages_tree_store(ValaProjectSettings _owner )
327 _this.default_packages_tree_store = this;
328 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
333 // set gobject values
336 // user defined functions
337 public void load () {
339 var def = _this.project.compilegroups.get("_default_");
340 var items = def.packages;
343 var pal = (Palete.Gtk) Palete.factory("Gtk");
344 var pkgs = pal.packages();
345 print("ValaProjectSettings:packages load %d\n", pkgs.size);
349 for(var i =0 ; i < pkgs.size; i++) {
350 this.el.append(out citer);
352 this.el.set_value(citer, 0, pkgs.get(i) ); // title
353 this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );
355 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
359 public class Xcls_TreeViewColumn12 : Object
361 public Gtk.TreeViewColumn el;
362 private ValaProjectSettings _this;
368 public Xcls_TreeViewColumn12(ValaProjectSettings _owner )
371 this.el = new Gtk.TreeViewColumn();
375 // set gobject values
376 this.el.title = "name";
377 this.el.expand = true;
378 this.el.resizable = true;
379 var child_0 = new Xcls_packages_render( _this );
381 this.el.pack_start ( child_0.el , false );
385 this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
387 // user defined functions
389 public class Xcls_packages_render : Object
391 public Gtk.CellRendererText el;
392 private ValaProjectSettings _this;
398 public Xcls_packages_render(ValaProjectSettings _owner )
401 _this.packages_render = this;
402 this.el = new Gtk.CellRendererText();
406 // set gobject values
409 // user defined functions
411 public class Xcls_TreeViewColumn14 : Object
413 public Gtk.TreeViewColumn el;
414 private ValaProjectSettings _this;
420 public Xcls_TreeViewColumn14(ValaProjectSettings _owner )
423 this.el = new Gtk.TreeViewColumn();
427 // set gobject values
428 this.el.title = "use";
429 this.el.resizable = false;
430 this.el.fixed_width = 50;
431 var child_0 = new Xcls_packages_render_use( _this );
433 this.el.pack_start ( child_0.el , false );
438 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
441 // user defined functions
443 public class Xcls_packages_render_use : Object
445 public Gtk.CellRendererToggle el;
446 private ValaProjectSettings _this;
452 public Xcls_packages_render_use(ValaProjectSettings _owner )
455 _this.packages_render_use = this;
456 this.el = new Gtk.CellRendererToggle();
460 // set gobject values
461 this.el.activatable = true;
464 this.el.toggled.connect( ( path_string) => {
465 var m = _this.default_packages_tree_store.el;
467 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
468 m.get_iter (out iter, path);
470 m.get_value(iter, 1, out val);
471 m.set_value(iter, 1, ((bool) val) ? false :true);
473 m.get_value(iter, 0, out fval);
474 var fn = (string)fval;
476 var def = _this.project.compilegroups.get("_default_");
477 var items = def.packages;
488 // user defined functions
490 public class Xcls_Label16 : Object
493 private ValaProjectSettings _this;
499 public Xcls_Label16(ValaProjectSettings _owner )
502 this.el = new Gtk.Label( "Available Directories" );
506 // set gobject values
509 // user defined functions
511 public class Xcls_ScrolledWindow17 : Object
513 public Gtk.ScrolledWindow el;
514 private ValaProjectSettings _this;
520 public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
523 this.el = new Gtk.ScrolledWindow( null, null );
527 // set gobject values
528 var child_0 = new Xcls_default_directory_tree( _this );
530 this.el.add ( child_0.el );
531 var child_1 = new Xcls_default_directory_menu( _this );
535 // user defined functions
537 public class Xcls_default_directory_tree : Object
539 public Gtk.TreeView el;
540 private ValaProjectSettings _this;
546 public Xcls_default_directory_tree(ValaProjectSettings _owner )
549 _this.default_directory_tree = this;
550 this.el = new Gtk.TreeView();
554 // set gobject values
555 this.el.headers_visible = false;
556 var child_0 = new Xcls_default_directory_tree_store( _this );
558 this.el.set_model ( child_0.el );
559 var child_1 = new Xcls_TreeViewColumn20( _this );
561 this.el.append_column ( child_1.el );
564 this.el.button_press_event.connect( ( ev) => {
565 //console.log("button press?");
568 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
569 //print("click" + ev.type);
573 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
577 // this.el.get_selection().select_path(res);
579 //if (!this.get('/LeftTreeMenu').el) {
580 // this.get('/LeftTreeMenu').init();
583 _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
584 _this.default_directory_menu.el.show_all();
585 _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);
586 // print("click:" + res.path.to_string());
591 // user defined functions
593 public class Xcls_default_directory_tree_store : Object
595 public Gtk.ListStore el;
596 private ValaProjectSettings _this;
602 public Xcls_default_directory_tree_store(ValaProjectSettings _owner )
605 _this.default_directory_tree_store = this;
606 this.el = new Gtk.ListStore( 1, typeof(string)
611 // set gobject values
614 // user defined functions
615 public void load () {
620 var def = _this.project.compilegroups.get("_default_");
621 var items = def.sources;
626 for(var i =0 ; i < items.size; i++) {
627 this.el.append(out citer);
629 this.el.set_value(citer, 0, items.get(i) ); // title
630 //this.el.set_value(citer, 1, items.get(i) );
632 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
636 public class Xcls_TreeViewColumn20 : Object
638 public Gtk.TreeViewColumn el;
639 private ValaProjectSettings _this;
645 public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
648 this.el = new Gtk.TreeViewColumn();
652 // set gobject values
653 this.el.title = "name";
654 this.el.resizable = true;
655 var child_0 = new Xcls_directory_render( _this );
657 this.el.pack_start ( child_0.el , false );
661 this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
663 // user defined functions
665 public class Xcls_directory_render : Object
667 public Gtk.CellRendererText el;
668 private ValaProjectSettings _this;
674 public Xcls_directory_render(ValaProjectSettings _owner )
677 _this.directory_render = this;
678 this.el = new Gtk.CellRendererText();
682 // set gobject values
685 // user defined functions
687 public class Xcls_default_directory_menu : Object
690 private ValaProjectSettings _this;
696 public Xcls_default_directory_menu(ValaProjectSettings _owner )
699 _this.default_directory_menu = this;
700 this.el = new Gtk.Menu();
704 // set gobject values
705 var child_0 = new Xcls_MenuItem23( _this );
707 this.el.add ( child_0.el );
708 var child_1 = new Xcls_MenuItem24( _this );
710 this.el.add ( child_1.el );
711 var child_2 = new Xcls_SeparatorMenuItem25( _this );
713 this.el.add ( child_2.el );
714 var child_3 = new Xcls_MenuItem26( _this );
716 this.el.add ( child_3.el );
719 // user defined functions
721 public class Xcls_MenuItem23 : Object
723 public Gtk.MenuItem el;
724 private ValaProjectSettings _this;
730 public Xcls_MenuItem23(ValaProjectSettings _owner )
733 this.el = new Gtk.MenuItem();
737 // set gobject values
738 this.el.label = "Add Directory";
741 this.el.activate.connect( () => {
743 var chooser = new Gtk.FileChooserDialog (
744 "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
746 Gtk.ResponseType.CANCEL,
748 Gtk.ResponseType.ACCEPT);
749 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
754 // add the directory..
755 var fn = _this.project.relPath(chooser.get_filename());
756 _this.project.compilegroups.get("_default_").sources.add(fn);
757 _this.default_directory_tree_store.load();
761 // user defined functions
763 public class Xcls_MenuItem24 : Object
765 public Gtk.MenuItem el;
766 private ValaProjectSettings _this;
772 public Xcls_MenuItem24(ValaProjectSettings _owner )
775 this.el = new Gtk.MenuItem();
779 // set gobject values
780 this.el.label = "Add File";
783 this.el.activate.connect( () => {
785 var chooser = new Gtk.FileChooserDialog (
786 "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
788 Gtk.ResponseType.CANCEL,
790 Gtk.ResponseType.ACCEPT);
791 if (chooser.run () != Gtk.ResponseType.ACCEPT) {
796 // add the directory..
797 var fn = _this.project.relPath(chooser.get_filename());
798 _this.project.compilegroups.get("_default_").sources.add(fn);
799 _this.default_directory_tree_store.load();
803 // user defined functions
805 public class Xcls_SeparatorMenuItem25 : Object
807 public Gtk.SeparatorMenuItem el;
808 private ValaProjectSettings _this;
814 public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
817 this.el = new Gtk.SeparatorMenuItem();
821 // set gobject values
824 // user defined functions
826 public class Xcls_MenuItem26 : Object
828 public Gtk.MenuItem el;
829 private ValaProjectSettings _this;
835 public Xcls_MenuItem26(ValaProjectSettings _owner )
838 this.el = new Gtk.MenuItem();
842 // set gobject values
843 this.el.label = "Remove File/Directory";
846 this.el.activate.connect( () => {
851 if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
852 print("nothing selected\n");
857 // add the directory..
861 mod.get_value(iter,0, out val);
862 var fn = (string) val;
864 print("remove: %s\n", fn);
865 if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
866 print("remove failed");
868 _this.default_directory_tree_store.load();
872 // user defined functions
874 public class Xcls_HPaned27 : Object
876 public Gtk.HPaned el;
877 private ValaProjectSettings _this;
883 public Xcls_HPaned27(ValaProjectSettings _owner )
886 this.el = new Gtk.HPaned();
890 // set gobject values
891 this.el.position = 300;
892 var child_0 = new Xcls_ScrolledWindow28( _this );
894 this.el.add1 ( child_0.el );
895 var child_1 = new Xcls_set_vbox( _this );
897 this.el.add2 ( child_1.el );
900 // user defined functions
902 public class Xcls_ScrolledWindow28 : Object
904 public Gtk.ScrolledWindow el;
905 private ValaProjectSettings _this;
911 public Xcls_ScrolledWindow28(ValaProjectSettings _owner )
914 this.el = new Gtk.ScrolledWindow( null, null );
918 // set gobject values
919 var child_0 = new Xcls_targets_tree_menu( _this );
921 this.el.add ( child_0.el );
922 var child_1 = new Xcls_targets_tree( _this );
924 this.el.add ( child_1.el );
929 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
933 // user defined functions
935 public class Xcls_targets_tree_menu : Object
938 private ValaProjectSettings _this;
944 public Xcls_targets_tree_menu(ValaProjectSettings _owner )
947 _this.targets_tree_menu = this;
948 this.el = new Gtk.Menu();
952 // set gobject values
953 var child_0 = new Xcls_MenuItem30( _this );
955 this.el.add ( child_0.el );
956 var child_1 = new Xcls_SeparatorMenuItem31( _this );
958 this.el.add ( child_1.el );
959 var child_2 = new Xcls_MenuItem32( _this );
961 this.el.add ( child_2.el );
964 // user defined functions
966 public class Xcls_MenuItem30 : Object
968 public Gtk.MenuItem el;
969 private ValaProjectSettings _this;
975 public Xcls_MenuItem30(ValaProjectSettings _owner )
978 this.el = new Gtk.MenuItem();
982 // set gobject values
983 this.el.label = "Add Compile Target";
986 this.el.activate.connect( () => {
988 if (_this.project.compilegroups.has_key("NEW GROUP")) {
992 // add the directory..
994 _this.project.compilegroups.set("NEW GROUP", new Project.GtkValaSettings("NEW GROUP"));
995 _this.targets_tree_store.load();
999 // user defined functions
1001 public class Xcls_SeparatorMenuItem31 : Object
1003 public Gtk.SeparatorMenuItem el;
1004 private ValaProjectSettings _this;
1010 public Xcls_SeparatorMenuItem31(ValaProjectSettings _owner )
1013 this.el = new Gtk.SeparatorMenuItem();
1017 // set gobject values
1020 // user defined functions
1022 public class Xcls_MenuItem32 : Object
1024 public Gtk.MenuItem el;
1025 private ValaProjectSettings _this;
1031 public Xcls_MenuItem32(ValaProjectSettings _owner )
1034 this.el = new Gtk.MenuItem();
1038 // set gobject values
1039 this.el.label = "Remove Target";
1042 this.el.activate.connect( () => {
1047 if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {
1048 print("nothing selected\n");
1053 // add the directory..
1057 mod.get_value(iter,0, out val);
1058 var fn = (string) val;
1060 print("remove: %s\n", fn);
1061 if (!_this.project.compilegroups.unset(fn)) {
1062 print("remove failed");
1064 _this.targets_tree_store.load();
1068 // user defined functions
1070 public class Xcls_targets_tree : Object
1072 public Gtk.TreeView el;
1073 private ValaProjectSettings _this;
1077 public string cursor;
1080 public Xcls_targets_tree(ValaProjectSettings _owner )
1083 _this.targets_tree = this;
1084 this.el = new Gtk.TreeView();
1088 // set gobject values
1089 var child_0 = new Xcls_targets_tree_store( _this );
1091 this.el.set_model ( child_0.el );
1092 var child_1 = new Xcls_TreeViewColumn35( _this );
1094 this.el.append_column ( child_1.el );
1097 this.el.button_press_event.connect( ( ev) => {
1098 //console.log("button press?");
1101 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
1102 //print("click" + ev.type);
1106 //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {
1110 // this.el.get_selection().select_path(res);
1112 //if (!this.get('/LeftTreeMenu').el) {
1113 // this.get('/LeftTreeMenu').init();
1116 _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
1117 _this.targets_tree_menu.el.show_all();
1118 _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);
1119 // print("click:" + res.path.to_string());
1122 this.el.cursor_changed.connect( ( ) => {
1124 if (this.cursor != "") {
1125 // save the values..
1128 // load the new values.
1133 if (!this.el.get_selection().get_selected(out mod, out iter)) {
1134 print("nothing selected\n");
1139 // add the directory..
1143 mod.get_value(iter,0, out val);
1144 var fn = (string) val;
1147 var cg = _this.project.compilegroups.get(fn);
1148 _this.build_pack_target.el.set_text(cg.target_bin);
1149 _this.build_compile_flags.el.set_text(cg.compile_flags);
1156 // user defined functions
1158 public class Xcls_targets_tree_store : Object
1160 public Gtk.ListStore el;
1161 private ValaProjectSettings _this;
1167 public Xcls_targets_tree_store(ValaProjectSettings _owner )
1170 _this.targets_tree_store = this;
1171 this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
1172 typeof(string) // ??
1177 // set gobject values
1180 // user defined functions
1181 public void load () {
1186 var cg = _this.project.compilegroups;
1188 _this.targets_tree.cursor = "";
1190 var iter = cg.map_iterator();
1191 while(iter.next()) {
1192 var key = iter.get_key();
1193 if (key == "_default_") {
1197 this.el.append(out citer);
1199 this.el.set_value(citer, 0, key ); // title
1200 //this.el.set_value(citer, 1, items.get(i) );
1202 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1206 public class Xcls_TreeViewColumn35 : Object
1208 public Gtk.TreeViewColumn el;
1209 private ValaProjectSettings _this;
1215 public Xcls_TreeViewColumn35(ValaProjectSettings _owner )
1218 this.el = new Gtk.TreeViewColumn();
1222 // set gobject values
1223 this.el.title = "name";
1224 this.el.resizable = true;
1225 var child_0 = new Xcls_targets_render( _this );
1227 this.el.pack_start ( child_0.el , false );
1232 this.el.add_attribute(_this.targets_render.el , "text", 0 );
1235 // user defined functions
1237 public class Xcls_targets_render : Object
1239 public Gtk.CellRendererText el;
1240 private ValaProjectSettings _this;
1246 public Xcls_targets_render(ValaProjectSettings _owner )
1249 _this.targets_render = this;
1250 this.el = new Gtk.CellRendererText();
1254 // set gobject values
1255 this.el.editable = true;
1258 this.el.edited.connect( (path, newtext) => {
1261 _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1263 _this.targets_tree_store.el.get_value(iter,0, out gval);
1264 var oldval = (string)gval;
1265 if (oldval == newtext) {
1268 var cg = _this.project.compilegroups.get(oldval);
1270 _this.project.compilegroups.unset(oldval);
1271 _this.project.compilegroups.set(newtext, cg);
1272 _this.targets_tree_store.load();
1276 // user defined functions
1278 public class Xcls_set_vbox : Object
1281 private ValaProjectSettings _this;
1287 public Xcls_set_vbox(ValaProjectSettings _owner )
1290 this.el = new Gtk.VBox( false, 0 );
1294 // set gobject values
1295 var child_0 = new Xcls_Label38( _this );
1297 this.el.pack_start ( child_0.el , false,false,0 );
1298 var child_1 = new Xcls_build_pack_target( _this );
1300 this.el.pack_start ( child_1.el , false,false,0 );
1301 var child_2 = new Xcls_Label40( _this );
1303 this.el.pack_start ( child_2.el , false,false,0 );
1304 var child_3 = new Xcls_build_compile_flags( _this );
1306 this.el.pack_start ( child_3.el , false,false,0 );
1307 var child_4 = new Xcls_Label42( _this );
1309 this.el.pack_start ( child_4.el , false,false,0 );
1310 var child_5 = new Xcls_ScrolledWindow43( _this );
1312 this.el.pack_start ( child_5.el , true,true,0 );
1315 // user defined functions
1317 public class Xcls_Label38 : Object
1319 public Gtk.Label el;
1320 private ValaProjectSettings _this;
1326 public Xcls_Label38(ValaProjectSettings _owner )
1329 this.el = new Gtk.Label( "target filename" );
1333 // set gobject values
1336 // user defined functions
1338 public class Xcls_build_pack_target : Object
1340 public Gtk.Entry el;
1341 private ValaProjectSettings _this;
1347 public Xcls_build_pack_target(ValaProjectSettings _owner )
1350 _this.build_pack_target = this;
1351 this.el = new Gtk.Entry();
1355 // set gobject values
1358 this.el.changed.connect( () => {
1359 if (_this.targets_tree.cursor.length < 1) {
1362 _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;
1366 // user defined functions
1368 public class Xcls_Label40 : Object
1370 public Gtk.Label el;
1371 private ValaProjectSettings _this;
1377 public Xcls_Label40(ValaProjectSettings _owner )
1380 this.el = new Gtk.Label( "compile flags" );
1384 // set gobject values
1387 // user defined functions
1389 public class Xcls_build_compile_flags : Object
1391 public Gtk.Entry el;
1392 private ValaProjectSettings _this;
1398 public Xcls_build_compile_flags(ValaProjectSettings _owner )
1401 _this.build_compile_flags = this;
1402 this.el = new Gtk.Entry();
1406 // set gobject values
1409 this.el.changed.connect( () => {
1410 if (_this.targets_tree.cursor.length < 1) {
1413 _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;
1417 // user defined functions
1419 public class Xcls_Label42 : Object
1421 public Gtk.Label el;
1422 private ValaProjectSettings _this;
1428 public Xcls_Label42(ValaProjectSettings _owner )
1431 this.el = new Gtk.Label( "Files to compile" );
1435 // set gobject values
1438 // user defined functions
1440 public class Xcls_ScrolledWindow43 : Object
1442 public Gtk.ScrolledWindow el;
1443 private ValaProjectSettings _this;
1449 public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
1452 this.el = new Gtk.ScrolledWindow( null, null );
1456 // set gobject values
1457 var child_0 = new Xcls_files_tree( _this );
1461 // user defined functions
1463 public class Xcls_files_tree : Object
1465 public Gtk.TreeView el;
1466 private ValaProjectSettings _this;
1472 public Xcls_files_tree(ValaProjectSettings _owner )
1475 this.el = new Gtk.TreeView();
1479 // set gobject values
1480 var child_0 = new Xcls_files_tree_store( _this );
1482 this.el.set_model ( child_0.el );
1483 var child_1 = new Xcls_TreeViewColumn46( _this );
1485 this.el.append_column ( child_1.el );
1486 var child_2 = new Xcls_TreeViewColumn48( _this );
1488 this.el.append_column ( child_2.el );
1491 // user defined functions
1493 public class Xcls_files_tree_store : Object
1495 public Gtk.ListStore el;
1496 private ValaProjectSettings _this;
1502 public Xcls_files_tree_store(ValaProjectSettings _owner )
1505 _this.files_tree_store = this;
1506 this.el = new Gtk.ListStore( 2, typeof(string), // 0 file name
1507 typeof(string), // type (dir orfile)
1508 typeof(bool) // is checked.
1513 // set gobject values
1516 // user defined functions
1517 public void load () {
1522 var def = _this.project.compilegroups.get("_default_");
1523 var items = def.sources;
1528 for(var i =0 ; i < items.size; i++) {
1529 this.el.append(out citer);
1531 this.el.set_value(citer, 0, items.get(i) ); // title
1532 this.el.set_value(citer, 1, "dir"); // type
1533 this.el.set_value(citer, 2, false ); // checked
1535 var files = def.files(items.get(i));
1537 for(var j =0 ; j < files.size; j++) {
1538 this.el.append(out citer);
1540 this.el.set_value(citer, 0, files.get(j) ); // title
1541 this.el.set_value(citer, 1, "file"); // type
1542 this.el.set_value(citer, 2, false ); // checked
1547 //this.el.set_value(citer, 1, items.get(i) );
1549 this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
1553 public class Xcls_TreeViewColumn46 : Object
1555 public Gtk.TreeViewColumn el;
1556 private ValaProjectSettings _this;
1562 public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
1565 this.el = new Gtk.TreeViewColumn();
1569 // set gobject values
1570 this.el.title = "name";
1571 this.el.resizable = true;
1572 var child_0 = new Xcls_files_render( _this );
1574 this.el.pack_start ( child_0.el , false );
1578 /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
1579 // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
1581 // user defined functions
1583 public class Xcls_files_render : Object
1585 public Gtk.CellRendererText el;
1586 private ValaProjectSettings _this;
1592 public Xcls_files_render(ValaProjectSettings _owner )
1595 _this.files_render = this;
1596 this.el = new Gtk.CellRendererText();
1600 // set gobject values
1603 // user defined functions
1605 public class Xcls_TreeViewColumn48 : Object
1607 public Gtk.TreeViewColumn el;
1608 private ValaProjectSettings _this;
1614 public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
1617 this.el = new Gtk.TreeViewColumn();
1621 // set gobject values
1622 this.el.title = "use";
1623 this.el.resizable = false;
1624 this.el.fixed_width = 50;
1625 var child_0 = new Xcls_files_render_use( _this );
1627 this.el.pack_start ( child_0.el , false );
1633 this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
1637 // user defined functions
1639 public class Xcls_files_render_use : Object
1641 public Gtk.CellRendererToggle el;
1642 private ValaProjectSettings _this;
1648 public Xcls_files_render_use(ValaProjectSettings _owner )
1651 _this.files_render_use = this;
1652 this.el = new Gtk.CellRendererToggle();
1656 // set gobject values
1657 this.el.activatable = true;
1660 this.el.toggled.connect( ( path_string) => {
1661 var m = _this.default_packages_tree_store.el;
1663 Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
1664 m.get_iter (out iter, path);
1666 m.get_value(iter, 1, out val);
1667 m.set_value(iter, 1, ((bool) val) ? false :true);
1669 m.get_value(iter, 0, out fval);
1670 var fn = (string)fval;
1672 var def = _this.project.compilegroups.get("_default_");
1673 var items = def.packages;
1684 // user defined functions