1 static ValaProjectSettingsPopover _ValaProjectSettingsPopover;
3 public class ValaProjectSettingsPopover : Object
6 private ValaProjectSettingsPopover _this;
8 public static ValaProjectSettingsPopover singleton()
10 if (_ValaProjectSettingsPopover == null) {
11 _ValaProjectSettingsPopover= new ValaProjectSettingsPopover();
13 return _ValaProjectSettingsPopover;
15 public Xcls_notebook notebook;
16 public Xcls_label_global label_global;
17 public Xcls_label_targets label_targets;
18 public Xcls_compile_flags compile_flags;
19 public Xcls_vapi_scroll vapi_scroll;
20 public Xcls_vapimodel vapimodel;
21 public Xcls_vapi_filter vapi_filter;
22 public Xcls_vapi_search vapi_search;
23 public Xcls_set_vbox set_vbox;
24 public Xcls_treeview treeview;
25 public Xcls_treeselmodel treeselmodel;
26 public Xcls_treelistsort treelistsort;
27 public Xcls_treelistmodel treelistmodel;
28 public Xcls_treemodel treemodel;
29 public Xcls_name name;
30 public Xcls_target_sel target_sel;
31 public Xcls_target_model target_model;
32 public Xcls_set_vboxb set_vboxb;
33 public Xcls_build_name build_name;
34 public Xcls_build_execute_args build_execute_args;
35 public Xcls_save_btn save_btn;
38 public Project.Callback doneObj;
39 public Xcls_MainWindow window;
40 public Project.GtkValaSettings? selected_target;
41 public uint border_width;
43 public Project.Gtk project;
46 public ValaProjectSettingsPopover()
49 this.el = new Gtk.Window();
54 this.selected_target = null;
55 this.border_width = 0;
61 var child_1 = new Xcls_HeaderBar2( _this );
62 this.el.titlebar = child_1.el;
63 var child_2 = new Xcls_Box4( _this );
65 this.el.set_child ( child_2.el );
68 this.el.close_request.connect( ( ) => {
74 this.el.hide.connect( () => {
82 // user defined functions
83 public void show (Gtk.Window pwin, Project.Gtk project, Project.Callback? doneObj) {
85 //print("ValaProjectSettings show\n");
86 this.doneObj = doneObj;
87 this.project= project;
89 this.compile_flags.el.buffer.set_text(
90 project.compile_flags.data
93 project.loadVapiIntoStore(_this.vapimodel.el);
94 GLib.Timeout.add(500, () => {
95 this.vapi_scroll.el.vadjustment.value = 0;
101 project.loadTargetsIntoStore(this.target_model.el);
103 _this.target_sel.el.selected = Gtk.INVALID_LIST_POSITION;
104 _this.target_sel.selectTarget(null);
105 // Gtk.Allocation rect;
106 //btn.get_allocation(out rect);
107 // this.el.set_pointing_to(rect);
108 this.el.application = pwin.application; // ??? make it modal?
109 this.el.set_transient_for(pwin);
112 // print("SHOWALL - POPIP\n");
113 this.el.set_size_request(800,800);
115 this.notebook.el.page = 0; // first page.
117 //this.view.el.grab_focus();
120 public void save () {
123 public class Xcls_HeaderBar2 : Object
125 public Gtk.HeaderBar el;
126 private ValaProjectSettingsPopover _this;
132 public Xcls_HeaderBar2(ValaProjectSettingsPopover _owner )
135 this.el = new Gtk.HeaderBar();
139 // set gobject values
140 var child_1 = new Xcls_Label3( _this );
141 this.el.title_widget = child_1.el;
144 // user defined functions
146 public class Xcls_Label3 : Object
149 private ValaProjectSettingsPopover _this;
155 public Xcls_Label3(ValaProjectSettingsPopover _owner )
158 this.el = new Gtk.Label( "Change Vala Compile settings" );
162 // set gobject values
165 // user defined functions
169 public class Xcls_Box4 : Object
172 private ValaProjectSettingsPopover _this;
178 public Xcls_Box4(ValaProjectSettingsPopover _owner )
181 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
185 // set gobject values
186 this.el.hexpand = true;
187 this.el.vexpand = true;
188 new Xcls_notebook( _this );
189 this.el.append( _this.notebook.el );
190 var child_2 = new Xcls_Box58( _this );
192 this.el.append( child_2.el );
195 // user defined functions
197 public class Xcls_notebook : Object
199 public Gtk.Notebook el;
200 private ValaProjectSettingsPopover _this;
206 public Xcls_notebook(ValaProjectSettingsPopover _owner )
209 _this.notebook = this;
210 this.el = new Gtk.Notebook();
214 // set gobject values
215 this.el.vexpand = true;
216 new Xcls_label_global( _this );
217 new Xcls_label_targets( _this );
218 var child_3 = new Xcls_Box8( _this );
220 this.el.append_page ( child_3.el , _this.label_global.el );
221 var child_4 = new Xcls_Paned26( _this );
223 this.el.append_page ( child_4.el , _this.label_targets.el );
226 // user defined functions
228 public class Xcls_label_global : Object
231 private ValaProjectSettingsPopover _this;
237 public Xcls_label_global(ValaProjectSettingsPopover _owner )
240 _this.label_global = this;
241 this.el = new Gtk.Label( "Global" );
245 // set gobject values
248 // user defined functions
251 public class Xcls_label_targets : Object
254 private ValaProjectSettingsPopover _this;
260 public Xcls_label_targets(ValaProjectSettingsPopover _owner )
263 _this.label_targets = this;
264 this.el = new Gtk.Label( "Targets" );
268 // set gobject values
271 // user defined functions
274 public class Xcls_Box8 : Object
277 private ValaProjectSettingsPopover _this;
283 public Xcls_Box8(ValaProjectSettingsPopover _owner )
286 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
290 // set gobject values
291 this.el.homogeneous = false;
292 var child_1 = new Xcls_Label9( _this );
294 this.el.append( child_1.el );
295 new Xcls_compile_flags( _this );
296 this.el.append( _this.compile_flags.el );
297 new Xcls_vapi_scroll( _this );
298 this.el.append( _this.vapi_scroll.el );
299 new Xcls_vapi_search( _this );
300 this.el.append( _this.vapi_search.el );
303 // user defined functions
305 public class Xcls_Label9 : Object
308 private ValaProjectSettingsPopover _this;
314 public Xcls_Label9(ValaProjectSettingsPopover _owner )
317 this.el = new Gtk.Label( "compile flags" );
321 // set gobject values
322 this.el.halign = Gtk.Align.START;
323 this.el.hexpand = true;
326 // user defined functions
329 public class Xcls_compile_flags : Object
332 private ValaProjectSettingsPopover _this;
338 public Xcls_compile_flags(ValaProjectSettingsPopover _owner )
341 _this.compile_flags = this;
342 this.el = new Gtk.Entry();
346 // set gobject values
347 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
350 this.el.changed.connect( () => {
352 _this.project.compile_flags = this.el.buffer.text;
353 _this.project.save();
354 // _this.project.save();
359 // user defined functions
362 public class Xcls_vapi_scroll : Object
364 public Gtk.ScrolledWindow el;
365 private ValaProjectSettingsPopover _this;
371 public Xcls_vapi_scroll(ValaProjectSettingsPopover _owner )
374 _this.vapi_scroll = this;
375 this.el = new Gtk.ScrolledWindow();
379 // set gobject values
380 this.el.vscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
381 this.el.has_frame = true;
382 this.el.hexpand = true;
383 this.el.vexpand = true;
384 this.el.hscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
385 var child_1 = new Xcls_ColumnView12( _this );
386 this.el.child = child_1.el;
389 // user defined functions
391 public class Xcls_ColumnView12 : Object
393 public Gtk.ColumnView el;
394 private ValaProjectSettingsPopover _this;
400 public Xcls_ColumnView12(ValaProjectSettingsPopover _owner )
403 var child_1 = new Xcls_NoSelection13( _this );
405 this.el = new Gtk.ColumnView( child_1.el );
409 // set gobject values
410 var child_2 = new Xcls_ColumnViewColumn21( _this );
412 this.el.append_column ( child_2.el );
413 var child_3 = new Xcls_ColumnViewColumn23( _this );
415 this.el.append_column ( child_3.el );
418 // user defined functions
420 public class Xcls_NoSelection13 : Object
422 public Gtk.NoSelection el;
423 private ValaProjectSettingsPopover _this;
429 public Xcls_NoSelection13(ValaProjectSettingsPopover _owner )
432 var child_1 = new Xcls_FilterListModel14( _this );
434 this.el = new Gtk.NoSelection( child_1.el );
438 // set gobject values
441 // user defined functions
443 public class Xcls_FilterListModel14 : Object
445 public Gtk.FilterListModel el;
446 private ValaProjectSettingsPopover _this;
452 public Xcls_FilterListModel14(ValaProjectSettingsPopover _owner )
455 var child_1 = new Xcls_SortListModel15( _this );
457 new Xcls_vapi_filter( _this );
458 this.el = new Gtk.FilterListModel( child_1.el, _this.vapi_filter.el );
462 // set gobject values
465 // user defined functions
467 public class Xcls_SortListModel15 : Object
469 public Gtk.SortListModel el;
470 private ValaProjectSettingsPopover _this;
476 public Xcls_SortListModel15(ValaProjectSettingsPopover _owner )
479 new Xcls_vapimodel( _this );
480 var child_2 = new Xcls_StringSorter17( _this );
482 this.el = new Gtk.SortListModel( _this.vapimodel.el, child_2.el );
486 // set gobject values
489 // user defined functions
491 public class Xcls_vapimodel : Object
493 public GLib.ListStore el;
494 private ValaProjectSettingsPopover _this;
500 public Xcls_vapimodel(ValaProjectSettingsPopover _owner )
503 _this.vapimodel = this;
504 this.el = new GLib.ListStore( typeof(Project.VapiSelection) );
508 // set gobject values
511 // user defined functions
514 public class Xcls_StringSorter17 : Object
516 public Gtk.StringSorter el;
517 private ValaProjectSettingsPopover _this;
523 public Xcls_StringSorter17(ValaProjectSettingsPopover _owner )
526 var child_1 = new Xcls_PropertyExpression18( _this );
528 this.el = new Gtk.StringSorter( child_1.el );
532 // set gobject values
535 // user defined functions
537 public class Xcls_PropertyExpression18 : Object
539 public Gtk.PropertyExpression el;
540 private ValaProjectSettingsPopover _this;
546 public Xcls_PropertyExpression18(ValaProjectSettingsPopover _owner )
549 this.el = new Gtk.PropertyExpression( typeof(Project.VapiSelection), null, "sortkey" );
553 // set gobject values
556 // user defined functions
561 public class Xcls_vapi_filter : Object
563 public Gtk.StringFilter el;
564 private ValaProjectSettingsPopover _this;
570 public Xcls_vapi_filter(ValaProjectSettingsPopover _owner )
573 _this.vapi_filter = this;
574 var child_1 = new Xcls_PropertyExpression20( _this );
576 this.el = new Gtk.StringFilter( child_1.el );
580 // set gobject values
583 // user defined functions
585 public class Xcls_PropertyExpression20 : Object
587 public Gtk.PropertyExpression el;
588 private ValaProjectSettingsPopover _this;
594 public Xcls_PropertyExpression20(ValaProjectSettingsPopover _owner )
597 this.el = new Gtk.PropertyExpression( typeof(Project.VapiSelection), null, "sortkey" );
601 // set gobject values
604 // user defined functions
610 public class Xcls_ColumnViewColumn21 : Object
612 public Gtk.ColumnViewColumn el;
613 private ValaProjectSettingsPopover _this;
619 public Xcls_ColumnViewColumn21(ValaProjectSettingsPopover _owner )
622 var child_1 = new Xcls_SignalListItemFactory22( _this );
624 this.el = new Gtk.ColumnViewColumn( "Vapi Package", child_1.el );
628 // set gobject values
629 this.el.expand = true;
632 // user defined functions
634 public class Xcls_SignalListItemFactory22 : Object
636 public Gtk.SignalListItemFactory el;
637 private ValaProjectSettingsPopover _this;
643 public Xcls_SignalListItemFactory22(ValaProjectSettingsPopover _owner )
646 this.el = new Gtk.SignalListItemFactory();
650 // set gobject values
653 this.el.setup.connect( (item) => {
654 //var j = (JsRender.JsRender) item;
655 var gi = (Gtk.ListItem)item;
657 var lbl = new Gtk.Label("");
658 lbl.halign = Gtk.Align.START;
664 this.el.bind.connect( (listitem) => {
666 var lbl = (Gtk.Box) ((Gtk.ListItem)listitem).get_child();
668 var item = (Project.VapiSelection) ((Gtk.ListItem)listitem).get_item();
670 item.bind_property("name",
672 GLib.BindingFlags.SYNC_CREATE);
678 // user defined functions
682 public class Xcls_ColumnViewColumn23 : Object
684 public Gtk.ColumnViewColumn el;
685 private ValaProjectSettingsPopover _this;
691 public Xcls_ColumnViewColumn23(ValaProjectSettingsPopover _owner )
694 var child_1 = new Xcls_SignalListItemFactory24( _this );
696 this.el = new Gtk.ColumnViewColumn( "use", child_1.el );
700 // set gobject values
703 // user defined functions
705 public class Xcls_SignalListItemFactory24 : Object
707 public Gtk.SignalListItemFactory el;
708 private ValaProjectSettingsPopover _this;
714 public Xcls_SignalListItemFactory24(ValaProjectSettingsPopover _owner )
717 this.el = new Gtk.SignalListItemFactory();
721 // set gobject values
724 this.el.setup.connect( (listitem) => {
726 var btn = new Gtk.CheckButton();
728 ((Gtk.ListItem)listitem).set_child(btn);
730 btn.toggled.connect(() => {
732 var jr = (Project.VapiSelection) ((Gtk.ListItem)listitem).get_item();
733 jr.selected = btn.active;
736 this.el.bind.connect( (listitem) => {
737 //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
741 //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
742 var btn = (Gtk.CheckButton) ((Gtk.ListItem)listitem).get_child();
745 var vs = (Project.VapiSelection)((Gtk.ListItem)listitem).get_item();
747 //GLib.debug("change %s to %s", lbl.label, np.name);
749 btn.active = vs.selected;
757 // user defined functions
763 public class Xcls_vapi_search : Object
765 public Gtk.SearchEntry el;
766 private ValaProjectSettingsPopover _this;
772 public Xcls_vapi_search(ValaProjectSettingsPopover _owner )
775 _this.vapi_search = this;
776 this.el = new Gtk.SearchEntry();
780 // set gobject values
781 this.el.placeholder_text = "Search Libraries (Vapi)";
782 this.el.search_delay = 500;
785 this.el.search_changed.connect( ( ) => {
787 _this.vapi_filter.el.set_search(this.el.get_text());
792 // user defined functions
796 public class Xcls_Paned26 : Object
799 private ValaProjectSettingsPopover _this;
805 public Xcls_Paned26(ValaProjectSettingsPopover _owner )
808 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
812 // set gobject values
813 this.el.vexpand = true;
814 this.el.position = 300;
815 new Xcls_set_vbox( _this );
816 this.el.set_end_child ( _this.set_vbox.el );
817 var child_2 = new Xcls_Box43( _this );
818 this.el.start_child = child_2.el;
821 // user defined functions
823 public class Xcls_set_vbox : Object
826 private ValaProjectSettingsPopover _this;
832 public Xcls_set_vbox(ValaProjectSettingsPopover _owner )
835 _this.set_vbox = this;
836 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
840 // set gobject values
841 this.el.homogeneous = false;
842 var child_1 = new Xcls_ScrolledWindow28( _this );
844 this.el.append( child_1.el );
847 // user defined functions
849 public class Xcls_ScrolledWindow28 : Object
851 public Gtk.ScrolledWindow el;
852 private ValaProjectSettingsPopover _this;
858 public Xcls_ScrolledWindow28(ValaProjectSettingsPopover _owner )
861 this.el = new Gtk.ScrolledWindow();
865 // set gobject values
866 this.el.vexpand = true;
867 new Xcls_treeview( _this );
868 this.el.child = _this.treeview.el;
871 // user defined functions
873 public class Xcls_treeview : Object
875 public Gtk.ColumnView el;
876 private ValaProjectSettingsPopover _this;
882 public Xcls_treeview(ValaProjectSettingsPopover _owner )
885 _this.treeview = this;
886 new Xcls_treeselmodel( _this );
887 this.el = new Gtk.ColumnView( _this.treeselmodel.el );
891 // set gobject values
892 new Xcls_name( _this );
893 this.el.append_column ( _this.name.el );
894 var child_3 = new Xcls_ColumnViewColumn41( _this );
896 this.el.append_column ( child_3.el );
899 // user defined functions
901 public class Xcls_treeselmodel : Object
903 public Gtk.SingleSelection el;
904 private ValaProjectSettingsPopover _this;
910 public Xcls_treeselmodel(ValaProjectSettingsPopover _owner )
913 _this.treeselmodel = this;
914 var child_1 = new Xcls_FilterListModel31( _this );
916 this.el = new Gtk.SingleSelection( child_1.el );
920 // set gobject values
923 // user defined functions
925 public class Xcls_FilterListModel31 : Object
927 public Gtk.FilterListModel el;
928 private ValaProjectSettingsPopover _this;
934 public Xcls_FilterListModel31(ValaProjectSettingsPopover _owner )
937 new Xcls_treelistsort( _this );
938 var child_2 = new Xcls_CustomFilter38( _this );
940 this.el = new Gtk.FilterListModel( _this.treelistsort.el, child_2.el );
944 // set gobject values
947 // user defined functions
949 public class Xcls_treelistsort : Object
951 public Gtk.SortListModel el;
952 private ValaProjectSettingsPopover _this;
958 public Xcls_treelistsort(ValaProjectSettingsPopover _owner )
961 _this.treelistsort = this;
962 new Xcls_treelistmodel( _this );
963 var child_2 = new Xcls_TreeListRowSorter35( _this );
965 this.el = new Gtk.SortListModel( _this.treelistmodel.el, child_2.el );
969 // set gobject values
974 //this.el.set_sorter(new Gtk.TreeListRowSorter(_this.treeview.el.sorter));
978 // user defined functions
980 public class Xcls_treelistmodel : Object
982 public Gtk.TreeListModel el;
983 private ValaProjectSettingsPopover _this;
989 public Xcls_treelistmodel(ValaProjectSettingsPopover _owner )
992 _this.treelistmodel = this;
993 new Xcls_treemodel( _this );
994 this.el = new Gtk.TreeListModel( _this.treemodel.el, false, true, (item) => {
995 //GLib.debug("liststore got %s", item.get_type().name());
996 return ((JsRender.JsRender)item).childfiles;
1001 // set gobject values
1004 // user defined functions
1006 public class Xcls_treemodel : Object
1008 public GLib.ListStore el;
1009 private ValaProjectSettingsPopover _this;
1015 public Xcls_treemodel(ValaProjectSettingsPopover _owner )
1018 _this.treemodel = this;
1019 this.el = new GLib.ListStore( typeof(JsRender.JsRender) );
1023 // set gobject values
1026 // user defined functions
1030 public class Xcls_TreeListRowSorter35 : Object
1032 public Gtk.TreeListRowSorter el;
1033 private ValaProjectSettingsPopover _this;
1039 public Xcls_TreeListRowSorter35(ValaProjectSettingsPopover _owner )
1042 var child_1 = new Xcls_StringSorter36( _this );
1044 this.el = new Gtk.TreeListRowSorter( child_1.el );
1048 // set gobject values
1051 // user defined functions
1053 public class Xcls_StringSorter36 : Object
1055 public Gtk.StringSorter el;
1056 private ValaProjectSettingsPopover _this;
1062 public Xcls_StringSorter36(ValaProjectSettingsPopover _owner )
1065 var child_1 = new Xcls_PropertyExpression37( _this );
1067 this.el = new Gtk.StringSorter( child_1.el );
1071 // set gobject values
1074 // user defined functions
1076 public class Xcls_PropertyExpression37 : Object
1078 public Gtk.PropertyExpression el;
1079 private ValaProjectSettingsPopover _this;
1085 public Xcls_PropertyExpression37(ValaProjectSettingsPopover _owner )
1088 this.el = new Gtk.PropertyExpression( typeof(JsRender.JsRender), null, "name" );
1092 // set gobject values
1095 // user defined functions
1101 public class Xcls_CustomFilter38 : Object
1103 public Gtk.CustomFilter el;
1104 private ValaProjectSettingsPopover _this;
1110 public Xcls_CustomFilter38(ValaProjectSettingsPopover _owner )
1113 this.el = new Gtk.CustomFilter( (item) => {
1115 var tr = ((Gtk.TreeListRow)item).get_item();
1116 //GLib.debug("filter %s", tr.get_type().name());
1117 var j = (JsRender.JsRender) tr;
1118 if (j.xtype == "Gtk") {
1121 if (j.xtype != "Dir") {
1122 return j.path.has_suffix(".vala") || j.path.has_suffix(".c");
1126 for (var i =0 ; i < j.childfiles.n_items; i++) {
1127 var f = (JsRender.JsRender) j.childfiles.get_item(i);
1128 if (f.xtype == "Gtk") {
1131 if (f.path.has_suffix(".vala") || f.path.has_suffix(".c")) {
1141 // set gobject values
1144 // user defined functions
1149 public class Xcls_name : Object
1151 public Gtk.ColumnViewColumn el;
1152 private ValaProjectSettingsPopover _this;
1158 public Xcls_name(ValaProjectSettingsPopover _owner )
1162 var child_1 = new Xcls_SignalListItemFactory40( _this );
1164 this.el = new Gtk.ColumnViewColumn( "Other Files", child_1.el );
1168 // set gobject values
1169 this.el.id = "name";
1170 this.el.expand = true;
1171 this.el.resizable = true;
1176 this.el.set_sorter( new Gtk.StringSorter(
1177 new Gtk.PropertyExpression(typeof(JsRender.JsRender), null, "name")
1184 // user defined functions
1186 public class Xcls_SignalListItemFactory40 : Object
1188 public Gtk.SignalListItemFactory el;
1189 private ValaProjectSettingsPopover _this;
1195 public Xcls_SignalListItemFactory40(ValaProjectSettingsPopover _owner )
1198 this.el = new Gtk.SignalListItemFactory();
1202 // set gobject values
1205 this.el.setup.connect( (listitem) => {
1207 var expand = new Gtk.TreeExpander();
1209 expand.set_indent_for_depth(true);
1210 expand.set_indent_for_icon(true);
1212 var lbl = new Gtk.Label("");
1213 lbl.use_markup = true;
1216 lbl.justify = Gtk.Justification.LEFT;
1220 expand.set_child(lbl);
1221 ((Gtk.ListItem)listitem).set_child(expand);
1222 ((Gtk.ListItem)listitem).activatable = false;
1224 this.el.bind.connect( (listitem) => {
1225 //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
1229 //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1230 var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1233 var lbl = (Gtk.Label) expand.child;
1235 if (lbl.label != "") { // do not update
1240 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1241 var jr = (JsRender.JsRender) lr.get_item();
1242 //GLib.debug("change %s to %s", lbl.label, np.name);
1243 lbl.label = jr.name; // for dir's we could hsow the sub path..
1244 lbl.tooltip_markup = jr.path;
1246 expand.set_hide_expander( jr.childfiles.n_items < 1);
1247 expand.set_list_row(lr);
1249 expand.set_hide_expander( jr.xtype != "Dir" );
1250 expand.set_list_row(lr);
1257 // user defined functions
1261 public class Xcls_ColumnViewColumn41 : Object
1263 public Gtk.ColumnViewColumn el;
1264 private ValaProjectSettingsPopover _this;
1270 public Xcls_ColumnViewColumn41(ValaProjectSettingsPopover _owner )
1273 var child_1 = new Xcls_SignalListItemFactory42( _this );
1275 this.el = new Gtk.ColumnViewColumn( "use", child_1.el );
1279 // set gobject values
1282 // user defined functions
1284 public class Xcls_SignalListItemFactory42 : Object
1286 public Gtk.SignalListItemFactory el;
1287 private ValaProjectSettingsPopover _this;
1293 public Xcls_SignalListItemFactory42(ValaProjectSettingsPopover _owner )
1296 this.el = new Gtk.SignalListItemFactory();
1300 // set gobject values
1303 this.el.setup.connect( (listitem) => {
1305 var btn = new Gtk.CheckButton();
1307 ((Gtk.ListItem)listitem).set_child(btn);
1309 btn.toggled.connect(() => {
1311 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1312 var jr = (JsRender.JsRender) lr.get_item();
1313 jr.compile_group_selected = btn.active;
1318 this.el.bind.connect( (listitem) => {
1319 //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
1323 //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1324 var btn = (Gtk.CheckButton) ((Gtk.ListItem)listitem).get_child();
1327 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1328 var jr = (JsRender.JsRender) lr.get_item();
1329 //GLib.debug("change %s to %s", lbl.label, np.name);
1333 jr.bind_property("compile_group_selected",
1335 GLib.BindingFlags.SYNC_CREATE);
1341 // user defined functions
1348 public class Xcls_Box43 : Object
1351 private ValaProjectSettingsPopover _this;
1357 public Xcls_Box43(ValaProjectSettingsPopover _owner )
1360 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1364 // set gobject values
1365 var child_1 = new Xcls_Box44( _this );
1367 this.el.append( child_1.el );
1368 var child_2 = new Xcls_ScrolledWindow47( _this );
1370 this.el.append( child_2.el );
1371 new Xcls_set_vboxb( _this );
1372 this.el.append( _this.set_vboxb.el );
1375 // user defined functions
1377 public class Xcls_Box44 : Object
1380 private ValaProjectSettingsPopover _this;
1386 public Xcls_Box44(ValaProjectSettingsPopover _owner )
1389 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1393 // set gobject values
1394 this.el.hexpand = true;
1395 var child_1 = new Xcls_Button45( _this );
1397 this.el.append( child_1.el );
1398 var child_2 = new Xcls_Button46( _this );
1400 this.el.append( child_2.el );
1403 // user defined functions
1405 public class Xcls_Button45 : Object
1407 public Gtk.Button el;
1408 private ValaProjectSettingsPopover _this;
1414 public Xcls_Button45(ValaProjectSettingsPopover _owner )
1417 this.el = new Gtk.Button();
1421 // set gobject values
1422 this.el.hexpand = true;
1423 this.el.label = "Add Compile Target";
1426 this.el.clicked.connect( () => {
1428 if (_this.project.compilegroups.has_key("NEW GROUP")) {
1431 var cg = new Project.GtkValaSettings(_this.project, "NEW GROUP");
1432 _this.project.compilegroups.set(cg.name, cg);
1433 _this.project.loadTargetsIntoStore(_this.target_model.el);
1434 // select it.. ?? should load it??
1435 for(var i =0;i < _this.target_model.el.n_items; i++) {
1436 var ncg = (Project.GtkValaSettings) _this.target_model.el.get_item(i);
1437 if (ncg.name == cg.name) {
1438 _this.target_sel.el.selected = i;
1439 _this.target_sel.selectTarget(cg);
1449 // user defined functions
1452 public class Xcls_Button46 : Object
1454 public Gtk.Button el;
1455 private ValaProjectSettingsPopover _this;
1461 public Xcls_Button46(ValaProjectSettingsPopover _owner )
1464 this.el = new Gtk.Button();
1468 // set gobject values
1469 this.el.hexpand = true;
1470 this.el.label = "Remove Target";
1473 this.el.clicked.connect( () => {
1474 // load the new values.
1475 if (_this.target_sel.el.selected == Gtk.INVALID_LIST_POSITION) {
1476 GLib.debug("nothing selected");
1481 // add the directory..
1482 var cg = (Project.GtkValaSettings) _this.target_model.el.get_item(_this.target_sel.el.selected);
1485 GLib.debug("remove: %s\n", cg.name);
1486 if (!_this.project.compilegroups.unset(cg.name)) {
1487 GLib.debug("remove failed");
1489 _this.project.loadTargetsIntoStore(_this.target_model.el);
1493 // user defined functions
1497 public class Xcls_ScrolledWindow47 : Object
1499 public Gtk.ScrolledWindow el;
1500 private ValaProjectSettingsPopover _this;
1506 public Xcls_ScrolledWindow47(ValaProjectSettingsPopover _owner )
1509 this.el = new Gtk.ScrolledWindow();
1513 // set gobject values
1514 this.el.vexpand = true;
1515 var child_1 = new Xcls_ColumnView48( _this );
1516 this.el.child = child_1.el;
1521 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
1526 // user defined functions
1528 public class Xcls_ColumnView48 : Object
1530 public Gtk.ColumnView el;
1531 private ValaProjectSettingsPopover _this;
1537 public Xcls_ColumnView48(ValaProjectSettingsPopover _owner )
1540 new Xcls_target_sel( _this );
1541 this.el = new Gtk.ColumnView( _this.target_sel.el );
1545 // set gobject values
1546 var child_2 = new Xcls_ColumnViewColumn51( _this );
1548 this.el.append_column ( child_2.el );
1551 // user defined functions
1553 public class Xcls_target_sel : Object
1555 public Gtk.SingleSelection el;
1556 private ValaProjectSettingsPopover _this;
1562 public Xcls_target_sel(ValaProjectSettingsPopover _owner )
1565 _this.target_sel = this;
1566 new Xcls_target_model( _this );
1567 this.el = new Gtk.SingleSelection( _this.target_model.el );
1571 // set gobject values
1574 this.el.selection_changed.connect( (position, n_items) => {
1577 // load the new values.
1578 if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
1579 this.selectTarget(null);
1582 this.selectTarget(null);
1586 // add the directory..
1587 var cg = (Project.GtkValaSettings) _this.target_model.el.get_item(this.el.selected);
1589 this.selectTarget(cg);
1594 // user defined functions
1595 public void selectTarget (Project.GtkValaSettings? cg) {
1596 // load the new values
1597 _this.selected_target = cg;
1598 _this.project.active_cg = cg;
1603 _this.set_vbox.el.hide();
1604 _this.set_vboxb.el.hide();
1609 _this.set_vbox.el.show();
1610 _this.set_vboxb.el.show();
1611 // add the directory..
1614 GLib.debug("loading dirs into project list");
1615 cg.loading_ui = true;
1618 _this.treeview.el.set_model(new Gtk.SingleSelection(null));
1619 _this.project.loadDirsIntoStore(_this.treemodel.el);
1620 _this.treeview.el.set_model(_this.treeselmodel.el);
1622 cg.loading_ui = false;
1623 GLib.debug("Set name to %s", cg.name);
1625 _this.build_name.el.buffer.set_text(cg.name.data);
1628 _this.build_execute_args.el.buffer.set_text( cg.execute_args.data );
1633 public class Xcls_target_model : Object
1635 public GLib.ListStore el;
1636 private ValaProjectSettingsPopover _this;
1642 public Xcls_target_model(ValaProjectSettingsPopover _owner )
1645 _this.target_model = this;
1646 this.el = new GLib.ListStore( typeof(Project.GtkValaSettings) );
1650 // set gobject values
1653 // user defined functions
1657 public class Xcls_ColumnViewColumn51 : Object
1659 public Gtk.ColumnViewColumn el;
1660 private ValaProjectSettingsPopover _this;
1666 public Xcls_ColumnViewColumn51(ValaProjectSettingsPopover _owner )
1669 var child_1 = new Xcls_SignalListItemFactory52( _this );
1671 this.el = new Gtk.ColumnViewColumn( "Build Target", child_1.el );
1675 // set gobject values
1676 this.el.expand = true;
1679 // user defined functions
1681 public class Xcls_SignalListItemFactory52 : Object
1683 public Gtk.SignalListItemFactory el;
1684 private ValaProjectSettingsPopover _this;
1690 public Xcls_SignalListItemFactory52(ValaProjectSettingsPopover _owner )
1693 this.el = new Gtk.SignalListItemFactory();
1697 // set gobject values
1700 this.el.setup.connect( (item) => {
1701 //var j = (JsRender.JsRender) item;
1702 var gi = (Gtk.ListItem)item;
1704 var lbl = new Gtk.Label("");
1705 lbl.halign = Gtk.Align.START;
1711 this.el.bind.connect( (listitem) => {
1713 var lbl = (Gtk.Box) ((Gtk.ListItem)listitem).get_child();
1715 var item = (Project.GtkValaSettings) ((Gtk.ListItem)listitem).get_item();
1717 item.bind_property("name",
1719 GLib.BindingFlags.SYNC_CREATE);
1725 // user defined functions
1731 public class Xcls_set_vboxb : Object
1734 private ValaProjectSettingsPopover _this;
1740 public Xcls_set_vboxb(ValaProjectSettingsPopover _owner )
1743 _this.set_vboxb = this;
1744 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1748 // set gobject values
1749 var child_1 = new Xcls_Label54( _this );
1751 this.el.append( child_1.el );
1752 new Xcls_build_name( _this );
1753 this.el.append( _this.build_name.el );
1754 var child_3 = new Xcls_Label56( _this );
1756 this.el.append( child_3.el );
1757 new Xcls_build_execute_args( _this );
1758 this.el.append( _this.build_execute_args.el );
1761 // user defined functions
1763 public class Xcls_Label54 : Object
1765 public Gtk.Label el;
1766 private ValaProjectSettingsPopover _this;
1772 public Xcls_Label54(ValaProjectSettingsPopover _owner )
1775 this.el = new Gtk.Label( "Build Name (executable name)" );
1779 // set gobject values
1782 // user defined functions
1785 public class Xcls_build_name : Object
1787 public Gtk.Entry el;
1788 private ValaProjectSettingsPopover _this;
1794 public Xcls_build_name(ValaProjectSettingsPopover _owner )
1797 _this.build_name = this;
1798 this.el = new Gtk.Entry();
1802 // set gobject values
1805 this.el.changed.connect( () => {
1806 if (_this.selected_target == null) {
1809 var name = this.el.text;
1810 // name ischanging.. probably always..
1811 if (_this.selected_target.name != name) {
1812 _this.project.compilegroups.unset(_this.selected_target.name);
1813 _this.project.compilegroups.set(name, _this.selected_target);
1816 _this.selected_target.name = this.el.buffer.text;
1820 // user defined functions
1823 public class Xcls_Label56 : Object
1825 public Gtk.Label el;
1826 private ValaProjectSettingsPopover _this;
1832 public Xcls_Label56(ValaProjectSettingsPopover _owner )
1835 this.el = new Gtk.Label( "test argments - when run after a build" );
1839 // set gobject values
1842 // user defined functions
1845 public class Xcls_build_execute_args : Object
1847 public Gtk.Entry el;
1848 private ValaProjectSettingsPopover _this;
1854 public Xcls_build_execute_args(ValaProjectSettingsPopover _owner )
1857 _this.build_execute_args = this;
1858 this.el = new Gtk.Entry();
1862 // set gobject values
1863 this.el.placeholder_text = "eg. -f somefile -g ";
1866 this.el.changed.connect( () => {
1867 if (_this.selected_target == null) {
1870 _this.selected_target.execute_args = this.el.buffer.text;
1875 // user defined functions
1882 public class Xcls_Box58 : Object
1885 private ValaProjectSettingsPopover _this;
1891 public Xcls_Box58(ValaProjectSettingsPopover _owner )
1894 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1898 // set gobject values
1899 this.el.margin_end = 4;
1900 this.el.margin_start = 4;
1901 this.el.hexpand = true;
1902 this.el.margin_bottom = 4;
1903 this.el.margin_top = 4;
1904 var child_1 = new Xcls_Button59( _this );
1906 this.el.append( child_1.el );
1907 var child_2 = new Xcls_Label60( _this );
1909 this.el.append( child_2.el );
1910 new Xcls_save_btn( _this );
1911 this.el.append( _this.save_btn.el );
1914 // user defined functions
1916 public class Xcls_Button59 : Object
1918 public Gtk.Button el;
1919 private ValaProjectSettingsPopover _this;
1925 public Xcls_Button59(ValaProjectSettingsPopover _owner )
1928 this.el = new Gtk.Button();
1932 // set gobject values
1933 this.el.label = "Cancel";
1936 this.el.clicked.connect( () => {
1943 // user defined functions
1946 public class Xcls_Label60 : Object
1948 public Gtk.Label el;
1949 private ValaProjectSettingsPopover _this;
1955 public Xcls_Label60(ValaProjectSettingsPopover _owner )
1958 this.el = new Gtk.Label( "" );
1962 // set gobject values
1963 this.el.hexpand = true;
1966 // user defined functions
1969 public class Xcls_save_btn : Object
1971 public Gtk.Button el;
1972 private ValaProjectSettingsPopover _this;
1978 public Xcls_save_btn(ValaProjectSettingsPopover _owner )
1981 _this.save_btn = this;
1982 this.el = new Gtk.Button();
1986 // set gobject values
1987 this.el.css_classes = { "suggested-action" };
1988 this.el.label = "Save";
1991 this.el.clicked.connect( ( ) => {
1994 _this.project.save();
1999 if (_this.doneObj != null) {
2000 _this.doneObj.call(_this.project);
2007 // user defined functions