Fix #7959 - new project flow - use void func to callback after each step, tidy up...
[roobuilder] / src / Builder4 / ValaProjectSettingsPopover.vala
1     static ValaProjectSettingsPopover  _ValaProjectSettingsPopover;
2
3     public class ValaProjectSettingsPopover : Object
4     {
5         public Gtk.Window el;
6         private ValaProjectSettingsPopover  _this;
7
8         public static ValaProjectSettingsPopover singleton()
9         {
10             if (_ValaProjectSettingsPopover == null) {
11                 _ValaProjectSettingsPopover= new ValaProjectSettingsPopover();
12             }
13             return _ValaProjectSettingsPopover;
14         }
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;
36
37             // my vars (def)
38         public Project.Callback doneObj;
39         public Xcls_MainWindow window;
40         public Project.GtkValaSettings? selected_target;
41         public uint border_width;
42         public bool done;
43         public Project.Gtk project;
44         public bool autohide;
45
46         // ctor
47         public ValaProjectSettingsPopover()
48         {
49             _this = this;
50             this.el = new Gtk.Window();
51
52             // my vars (dec)
53             this.doneObj = null;
54             this.window = null;
55             this.selected_target = null;
56             this.border_width = 0;
57             this.done = false;
58             this.project = null;
59             this.autohide = false;
60
61             // set gobject values
62             this.el.modal = true;
63             var child_1 = new Xcls_HeaderBar2( _this );
64             this.el.titlebar = child_1.el;
65             var child_2 = new Xcls_Box5( _this );
66             child_2.ref();
67             this.el.set_child ( child_2.el  );
68
69             //listeners
70             this.el.close_request.connect( ( ) => {
71                 if (!this.done) {
72                         return true;
73                 }
74                 return false;
75             });
76             this.el.hide.connect( () => {
77                   if (!this.done) {
78                 _this.el.show();
79               
80               }
81             });
82         }
83
84         // user defined functions
85         public void show (Gtk.Window pwin, Project.Gtk project, Project.Callback doneObj) {
86              
87             //print("ValaProjectSettings show\n");
88             this.doneObj = doneObj;
89             this.project=  project;
90                  
91             this.compile_flags.el.buffer.set_text(
92                 project.compile_flags.data
93                 );
94                    
95             project.loadVapiIntoStore(_this.vapimodel.el);
96              GLib.Timeout.add(500, () => {
97                          this.vapi_scroll.el.vadjustment.value  = 0;     
98                      return false;
99              });
100             
101            
102                 
103                 project.loadTargetsIntoStore(this.target_model.el);
104                 
105                 _this.target_sel.el.selected = Gtk.INVALID_LIST_POSITION;
106                 _this.target_sel.selectTarget(null);
107         //      Gtk.Allocation rect;
108                 //btn.get_allocation(out rect);
109          //   this.el.set_pointing_to(rect);
110          this.el.application = pwin.application; // ??? make it modal?
111                  this.el.set_transient_for(pwin);
112                  
113                 // window + header?
114                 // print("SHOWALL - POPIP\n");
115                 this.el.set_size_request(800,800);
116                 this.el.show();
117                 this.notebook.el.page = 0; // first page.
118                 
119                 //this.view.el.grab_focus();
120         
121         }
122         public void save ()  {
123             this.project.save(); 
124         }
125         public class Xcls_HeaderBar2 : Object
126         {
127             public Gtk.HeaderBar el;
128             private ValaProjectSettingsPopover  _this;
129
130
131                 // my vars (def)
132
133             // ctor
134             public Xcls_HeaderBar2(ValaProjectSettingsPopover _owner )
135             {
136                 _this = _owner;
137                 this.el = new Gtk.HeaderBar();
138
139                 // my vars (dec)
140
141                 // set gobject values
142                 var child_1 = new Xcls_Label3( _this );
143                 this.el.title_widget = child_1.el;
144                 var child_2 = new Xcls_Button4( _this );
145                 child_2.ref();
146                 this.el.pack_end ( child_2.el  );
147             }
148
149             // user defined functions
150         }
151         public class Xcls_Label3 : Object
152         {
153             public Gtk.Label el;
154             private ValaProjectSettingsPopover  _this;
155
156
157                 // my vars (def)
158
159             // ctor
160             public Xcls_Label3(ValaProjectSettingsPopover _owner )
161             {
162                 _this = _owner;
163                 this.el = new Gtk.Label( "Change Vala  Compile settings" );
164
165                 // my vars (dec)
166
167                 // set gobject values
168             }
169
170             // user defined functions
171         }
172
173         public class Xcls_Button4 : Object
174         {
175             public Gtk.Button el;
176             private ValaProjectSettingsPopover  _this;
177
178
179                 // my vars (def)
180
181             // ctor
182             public Xcls_Button4(ValaProjectSettingsPopover _owner )
183             {
184                 _this = _owner;
185                 this.el = new Gtk.Button();
186
187                 // my vars (dec)
188
189                 // set gobject values
190                 this.el.icon_name = "";
191                 this.el.label = "Create / Recreate Build files (configure.ac / makefile.am etc)";
192             }
193
194             // user defined functions
195         }
196
197
198         public class Xcls_Box5 : Object
199         {
200             public Gtk.Box el;
201             private ValaProjectSettingsPopover  _this;
202
203
204                 // my vars (def)
205
206             // ctor
207             public Xcls_Box5(ValaProjectSettingsPopover _owner )
208             {
209                 _this = _owner;
210                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
211
212                 // my vars (dec)
213
214                 // set gobject values
215                 this.el.hexpand = true;
216                 this.el.vexpand = true;
217                 new Xcls_notebook( _this );
218                 this.el.append( _this.notebook.el );
219                 var child_2 = new Xcls_Box59( _this );
220                 child_2.ref();
221                 this.el.append( child_2.el );
222             }
223
224             // user defined functions
225         }
226         public class Xcls_notebook : Object
227         {
228             public Gtk.Notebook el;
229             private ValaProjectSettingsPopover  _this;
230
231
232                 // my vars (def)
233
234             // ctor
235             public Xcls_notebook(ValaProjectSettingsPopover _owner )
236             {
237                 _this = _owner;
238                 _this.notebook = this;
239                 this.el = new Gtk.Notebook();
240
241                 // my vars (dec)
242
243                 // set gobject values
244                 this.el.vexpand = true;
245                 new Xcls_label_global( _this );
246                 new Xcls_label_targets( _this );
247                 var child_3 = new Xcls_Box9( _this );
248                 child_3.ref();
249                 this.el.append_page ( child_3.el , _this.label_global.el );
250                 var child_4 = new Xcls_Paned27( _this );
251                 child_4.ref();
252                 this.el.append_page ( child_4.el , _this.label_targets.el );
253             }
254
255             // user defined functions
256         }
257         public class Xcls_label_global : Object
258         {
259             public Gtk.Label el;
260             private ValaProjectSettingsPopover  _this;
261
262
263                 // my vars (def)
264
265             // ctor
266             public Xcls_label_global(ValaProjectSettingsPopover _owner )
267             {
268                 _this = _owner;
269                 _this.label_global = this;
270                 this.el = new Gtk.Label( "Global" );
271
272                 // my vars (dec)
273
274                 // set gobject values
275             }
276
277             // user defined functions
278         }
279
280         public class Xcls_label_targets : Object
281         {
282             public Gtk.Label el;
283             private ValaProjectSettingsPopover  _this;
284
285
286                 // my vars (def)
287
288             // ctor
289             public Xcls_label_targets(ValaProjectSettingsPopover _owner )
290             {
291                 _this = _owner;
292                 _this.label_targets = this;
293                 this.el = new Gtk.Label( "Targets" );
294
295                 // my vars (dec)
296
297                 // set gobject values
298             }
299
300             // user defined functions
301         }
302
303         public class Xcls_Box9 : Object
304         {
305             public Gtk.Box el;
306             private ValaProjectSettingsPopover  _this;
307
308
309                 // my vars (def)
310
311             // ctor
312             public Xcls_Box9(ValaProjectSettingsPopover _owner )
313             {
314                 _this = _owner;
315                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
316
317                 // my vars (dec)
318
319                 // set gobject values
320                 this.el.homogeneous = false;
321                 var child_1 = new Xcls_Label10( _this );
322                 child_1.ref();
323                 this.el.append( child_1.el );
324                 new Xcls_compile_flags( _this );
325                 this.el.append( _this.compile_flags.el );
326                 new Xcls_vapi_scroll( _this );
327                 this.el.append( _this.vapi_scroll.el );
328                 new Xcls_vapi_search( _this );
329                 this.el.append( _this.vapi_search.el );
330             }
331
332             // user defined functions
333         }
334         public class Xcls_Label10 : Object
335         {
336             public Gtk.Label el;
337             private ValaProjectSettingsPopover  _this;
338
339
340                 // my vars (def)
341
342             // ctor
343             public Xcls_Label10(ValaProjectSettingsPopover _owner )
344             {
345                 _this = _owner;
346                 this.el = new Gtk.Label( "compile flags" );
347
348                 // my vars (dec)
349
350                 // set gobject values
351                 this.el.halign = Gtk.Align.START;
352                 this.el.hexpand = true;
353             }
354
355             // user defined functions
356         }
357
358         public class Xcls_compile_flags : Object
359         {
360             public Gtk.Entry el;
361             private ValaProjectSettingsPopover  _this;
362
363
364                 // my vars (def)
365
366             // ctor
367             public Xcls_compile_flags(ValaProjectSettingsPopover _owner )
368             {
369                 _this = _owner;
370                 _this.compile_flags = this;
371                 this.el = new Gtk.Entry();
372
373                 // my vars (dec)
374
375                 // set gobject values
376                 this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
377
378                 //listeners
379                 this.el.changed.connect( () => {
380                     
381                    _this.project.compile_flags = this.el.buffer.text;
382                    _this.project.save();
383                 //    _this.project.save();
384                 
385                 });
386             }
387
388             // user defined functions
389         }
390
391         public class Xcls_vapi_scroll : Object
392         {
393             public Gtk.ScrolledWindow el;
394             private ValaProjectSettingsPopover  _this;
395
396
397                 // my vars (def)
398
399             // ctor
400             public Xcls_vapi_scroll(ValaProjectSettingsPopover _owner )
401             {
402                 _this = _owner;
403                 _this.vapi_scroll = this;
404                 this.el = new Gtk.ScrolledWindow();
405
406                 // my vars (dec)
407
408                 // set gobject values
409                 this.el.vscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
410                 this.el.has_frame = true;
411                 this.el.hexpand = true;
412                 this.el.vexpand = true;
413                 this.el.hscrollbar_policy = Gtk.PolicyType.AUTOMATIC;
414                 var child_1 = new Xcls_ColumnView13( _this );
415                 this.el.child = child_1.el;
416             }
417
418             // user defined functions
419         }
420         public class Xcls_ColumnView13 : Object
421         {
422             public Gtk.ColumnView el;
423             private ValaProjectSettingsPopover  _this;
424
425
426                 // my vars (def)
427
428             // ctor
429             public Xcls_ColumnView13(ValaProjectSettingsPopover _owner )
430             {
431                 _this = _owner;
432                 var child_1 = new Xcls_NoSelection14( _this );
433                 child_1.ref();
434                 this.el = new Gtk.ColumnView( child_1.el );
435
436                 // my vars (dec)
437
438                 // set gobject values
439                 var child_2 = new Xcls_ColumnViewColumn22( _this );
440                 child_2.ref();
441                 this.el.append_column ( child_2.el  );
442                 var child_3 = new Xcls_ColumnViewColumn24( _this );
443                 child_3.ref();
444                 this.el.append_column ( child_3.el  );
445             }
446
447             // user defined functions
448         }
449         public class Xcls_NoSelection14 : Object
450         {
451             public Gtk.NoSelection el;
452             private ValaProjectSettingsPopover  _this;
453
454
455                 // my vars (def)
456
457             // ctor
458             public Xcls_NoSelection14(ValaProjectSettingsPopover _owner )
459             {
460                 _this = _owner;
461                 var child_1 = new Xcls_FilterListModel15( _this );
462                 child_1.ref();
463                 this.el = new Gtk.NoSelection( child_1.el );
464
465                 // my vars (dec)
466
467                 // set gobject values
468             }
469
470             // user defined functions
471         }
472         public class Xcls_FilterListModel15 : Object
473         {
474             public Gtk.FilterListModel el;
475             private ValaProjectSettingsPopover  _this;
476
477
478                 // my vars (def)
479
480             // ctor
481             public Xcls_FilterListModel15(ValaProjectSettingsPopover _owner )
482             {
483                 _this = _owner;
484                 var child_1 = new Xcls_SortListModel16( _this );
485                 child_1.ref();
486                 new Xcls_vapi_filter( _this );
487                 this.el = new Gtk.FilterListModel( child_1.el, _this.vapi_filter.el );
488
489                 // my vars (dec)
490
491                 // set gobject values
492             }
493
494             // user defined functions
495         }
496         public class Xcls_SortListModel16 : Object
497         {
498             public Gtk.SortListModel el;
499             private ValaProjectSettingsPopover  _this;
500
501
502                 // my vars (def)
503
504             // ctor
505             public Xcls_SortListModel16(ValaProjectSettingsPopover _owner )
506             {
507                 _this = _owner;
508                 new Xcls_vapimodel( _this );
509                 var child_2 = new Xcls_StringSorter18( _this );
510                 child_2.ref();
511                 this.el = new Gtk.SortListModel( _this.vapimodel.el, child_2.el );
512
513                 // my vars (dec)
514
515                 // set gobject values
516             }
517
518             // user defined functions
519         }
520         public class Xcls_vapimodel : Object
521         {
522             public GLib.ListStore el;
523             private ValaProjectSettingsPopover  _this;
524
525
526                 // my vars (def)
527
528             // ctor
529             public Xcls_vapimodel(ValaProjectSettingsPopover _owner )
530             {
531                 _this = _owner;
532                 _this.vapimodel = this;
533                 this.el = new GLib.ListStore( typeof(Project.VapiSelection) );
534
535                 // my vars (dec)
536
537                 // set gobject values
538             }
539
540             // user defined functions
541         }
542
543         public class Xcls_StringSorter18 : Object
544         {
545             public Gtk.StringSorter el;
546             private ValaProjectSettingsPopover  _this;
547
548
549                 // my vars (def)
550
551             // ctor
552             public Xcls_StringSorter18(ValaProjectSettingsPopover _owner )
553             {
554                 _this = _owner;
555                 var child_1 = new Xcls_PropertyExpression19( _this );
556                 child_1.ref();
557                 this.el = new Gtk.StringSorter( child_1.el );
558
559                 // my vars (dec)
560
561                 // set gobject values
562             }
563
564             // user defined functions
565         }
566         public class Xcls_PropertyExpression19 : Object
567         {
568             public Gtk.PropertyExpression el;
569             private ValaProjectSettingsPopover  _this;
570
571
572                 // my vars (def)
573
574             // ctor
575             public Xcls_PropertyExpression19(ValaProjectSettingsPopover _owner )
576             {
577                 _this = _owner;
578                 this.el = new Gtk.PropertyExpression( typeof(Project.VapiSelection), null, "sortkey" );
579
580                 // my vars (dec)
581
582                 // set gobject values
583             }
584
585             // user defined functions
586         }
587
588
589
590         public class Xcls_vapi_filter : Object
591         {
592             public Gtk.StringFilter el;
593             private ValaProjectSettingsPopover  _this;
594
595
596                 // my vars (def)
597
598             // ctor
599             public Xcls_vapi_filter(ValaProjectSettingsPopover _owner )
600             {
601                 _this = _owner;
602                 _this.vapi_filter = this;
603                 var child_1 = new Xcls_PropertyExpression21( _this );
604                 child_1.ref();
605                 this.el = new Gtk.StringFilter( child_1.el );
606
607                 // my vars (dec)
608
609                 // set gobject values
610             }
611
612             // user defined functions
613         }
614         public class Xcls_PropertyExpression21 : Object
615         {
616             public Gtk.PropertyExpression el;
617             private ValaProjectSettingsPopover  _this;
618
619
620                 // my vars (def)
621
622             // ctor
623             public Xcls_PropertyExpression21(ValaProjectSettingsPopover _owner )
624             {
625                 _this = _owner;
626                 this.el = new Gtk.PropertyExpression( typeof(Project.VapiSelection), null, "sortkey" );
627
628                 // my vars (dec)
629
630                 // set gobject values
631             }
632
633             // user defined functions
634         }
635
636
637
638
639         public class Xcls_ColumnViewColumn22 : Object
640         {
641             public Gtk.ColumnViewColumn el;
642             private ValaProjectSettingsPopover  _this;
643
644
645                 // my vars (def)
646
647             // ctor
648             public Xcls_ColumnViewColumn22(ValaProjectSettingsPopover _owner )
649             {
650                 _this = _owner;
651                 var child_1 = new Xcls_SignalListItemFactory23( _this );
652                 child_1.ref();
653                 this.el = new Gtk.ColumnViewColumn( "Vapi Package", child_1.el );
654
655                 // my vars (dec)
656
657                 // set gobject values
658                 this.el.expand = true;
659             }
660
661             // user defined functions
662         }
663         public class Xcls_SignalListItemFactory23 : Object
664         {
665             public Gtk.SignalListItemFactory el;
666             private ValaProjectSettingsPopover  _this;
667
668
669                 // my vars (def)
670
671             // ctor
672             public Xcls_SignalListItemFactory23(ValaProjectSettingsPopover _owner )
673             {
674                 _this = _owner;
675                 this.el = new Gtk.SignalListItemFactory();
676
677                 // my vars (dec)
678
679                 // set gobject values
680
681                 //listeners
682                 this.el.setup.connect( (item) => {
683                         //var j = (JsRender.JsRender) item;
684                         var gi = (Gtk.ListItem)item;
685                          
686                         var lbl = new Gtk.Label("");
687                         lbl.halign = Gtk.Align.START;
688                         gi.set_child(lbl);
689                 
690                 
691                 
692                 });
693                 this.el.bind.connect( (listitem) => {
694                  
695                         var lbl = (Gtk.Box)  ((Gtk.ListItem)listitem).get_child();
696                            
697                         var item = (Project.VapiSelection)  ((Gtk.ListItem)listitem).get_item();
698                 
699                         item.bind_property("name",
700                                 lbl, "label",
701                            GLib.BindingFlags.SYNC_CREATE);
702                 
703                           
704                 });
705             }
706
707             // user defined functions
708         }
709
710
711         public class Xcls_ColumnViewColumn24 : Object
712         {
713             public Gtk.ColumnViewColumn el;
714             private ValaProjectSettingsPopover  _this;
715
716
717                 // my vars (def)
718
719             // ctor
720             public Xcls_ColumnViewColumn24(ValaProjectSettingsPopover _owner )
721             {
722                 _this = _owner;
723                 var child_1 = new Xcls_SignalListItemFactory25( _this );
724                 child_1.ref();
725                 this.el = new Gtk.ColumnViewColumn( "use", child_1.el );
726
727                 // my vars (dec)
728
729                 // set gobject values
730             }
731
732             // user defined functions
733         }
734         public class Xcls_SignalListItemFactory25 : Object
735         {
736             public Gtk.SignalListItemFactory el;
737             private ValaProjectSettingsPopover  _this;
738
739
740                 // my vars (def)
741
742             // ctor
743             public Xcls_SignalListItemFactory25(ValaProjectSettingsPopover _owner )
744             {
745                 _this = _owner;
746                 this.el = new Gtk.SignalListItemFactory();
747
748                 // my vars (dec)
749
750                 // set gobject values
751
752                 //listeners
753                 this.el.setup.connect( (listitem) => {
754                 
755                         var btn = new Gtk.CheckButton();
756                  
757                         ((Gtk.ListItem)listitem).set_child(btn);
758                         
759                         btn.toggled.connect(() =>  {
760                          
761                                 var jr = (Project.VapiSelection) ((Gtk.ListItem)listitem).get_item();
762                                 jr.selected = btn.active;
763                         });
764                 });
765                 this.el.bind.connect( (listitem) => {
766                          //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
767                         
768                         
769                         
770                         //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
771                         var btn = (Gtk.CheckButton)  ((Gtk.ListItem)listitem).get_child();
772                           
773                  
774                         var vs = (Project.VapiSelection)((Gtk.ListItem)listitem).get_item();
775                 
776                         //GLib.debug("change  %s to %s", lbl.label, np.name);
777                 
778                         btn.active = vs.selected; 
779                         
780                         vs.btn = btn;
781                         // bind image...
782                         
783                 });
784             }
785
786             // user defined functions
787         }
788
789
790
791
792         public class Xcls_vapi_search : Object
793         {
794             public Gtk.SearchEntry el;
795             private ValaProjectSettingsPopover  _this;
796
797
798                 // my vars (def)
799
800             // ctor
801             public Xcls_vapi_search(ValaProjectSettingsPopover _owner )
802             {
803                 _this = _owner;
804                 _this.vapi_search = this;
805                 this.el = new Gtk.SearchEntry();
806
807                 // my vars (dec)
808
809                 // set gobject values
810                 this.el.placeholder_text = "Search Libraries (Vapi)";
811                 this.el.search_delay = 500;
812
813                 //listeners
814                 this.el.search_changed.connect( ( ) => {
815                 
816                  _this.vapi_filter.el.set_search(this.el.get_text());
817                  
818                 });
819             }
820
821             // user defined functions
822         }
823
824
825         public class Xcls_Paned27 : Object
826         {
827             public Gtk.Paned el;
828             private ValaProjectSettingsPopover  _this;
829
830
831                 // my vars (def)
832
833             // ctor
834             public Xcls_Paned27(ValaProjectSettingsPopover _owner )
835             {
836                 _this = _owner;
837                 this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
838
839                 // my vars (dec)
840
841                 // set gobject values
842                 this.el.vexpand = true;
843                 this.el.position = 300;
844                 new Xcls_set_vbox( _this );
845                 this.el.set_end_child ( _this.set_vbox.el  );
846                 var child_2 = new Xcls_Box44( _this );
847                 this.el.start_child = child_2.el;
848             }
849
850             // user defined functions
851         }
852         public class Xcls_set_vbox : Object
853         {
854             public Gtk.Box el;
855             private ValaProjectSettingsPopover  _this;
856
857
858                 // my vars (def)
859
860             // ctor
861             public Xcls_set_vbox(ValaProjectSettingsPopover _owner )
862             {
863                 _this = _owner;
864                 _this.set_vbox = this;
865                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
866
867                 // my vars (dec)
868
869                 // set gobject values
870                 this.el.homogeneous = false;
871                 var child_1 = new Xcls_ScrolledWindow29( _this );
872                 child_1.ref();
873                 this.el.append( child_1.el );
874             }
875
876             // user defined functions
877         }
878         public class Xcls_ScrolledWindow29 : Object
879         {
880             public Gtk.ScrolledWindow el;
881             private ValaProjectSettingsPopover  _this;
882
883
884                 // my vars (def)
885
886             // ctor
887             public Xcls_ScrolledWindow29(ValaProjectSettingsPopover _owner )
888             {
889                 _this = _owner;
890                 this.el = new Gtk.ScrolledWindow();
891
892                 // my vars (dec)
893
894                 // set gobject values
895                 this.el.vexpand = true;
896                 new Xcls_treeview( _this );
897                 this.el.child = _this.treeview.el;
898             }
899
900             // user defined functions
901         }
902         public class Xcls_treeview : Object
903         {
904             public Gtk.ColumnView el;
905             private ValaProjectSettingsPopover  _this;
906
907
908                 // my vars (def)
909
910             // ctor
911             public Xcls_treeview(ValaProjectSettingsPopover _owner )
912             {
913                 _this = _owner;
914                 _this.treeview = this;
915                 new Xcls_treeselmodel( _this );
916                 this.el = new Gtk.ColumnView( _this.treeselmodel.el );
917
918                 // my vars (dec)
919
920                 // set gobject values
921                 new Xcls_name( _this );
922                 this.el.append_column ( _this.name.el  );
923                 var child_3 = new Xcls_ColumnViewColumn42( _this );
924                 child_3.ref();
925                 this.el.append_column ( child_3.el  );
926             }
927
928             // user defined functions
929         }
930         public class Xcls_treeselmodel : Object
931         {
932             public Gtk.SingleSelection el;
933             private ValaProjectSettingsPopover  _this;
934
935
936                 // my vars (def)
937
938             // ctor
939             public Xcls_treeselmodel(ValaProjectSettingsPopover _owner )
940             {
941                 _this = _owner;
942                 _this.treeselmodel = this;
943                 var child_1 = new Xcls_FilterListModel32( _this );
944                 child_1.ref();
945                 this.el = new Gtk.SingleSelection( child_1.el );
946
947                 // my vars (dec)
948
949                 // set gobject values
950             }
951
952             // user defined functions
953         }
954         public class Xcls_FilterListModel32 : Object
955         {
956             public Gtk.FilterListModel el;
957             private ValaProjectSettingsPopover  _this;
958
959
960                 // my vars (def)
961
962             // ctor
963             public Xcls_FilterListModel32(ValaProjectSettingsPopover _owner )
964             {
965                 _this = _owner;
966                 new Xcls_treelistsort( _this );
967                 var child_2 = new Xcls_CustomFilter39( _this );
968                 child_2.ref();
969                 this.el = new Gtk.FilterListModel( _this.treelistsort.el, child_2.el );
970
971                 // my vars (dec)
972
973                 // set gobject values
974             }
975
976             // user defined functions
977         }
978         public class Xcls_treelistsort : Object
979         {
980             public Gtk.SortListModel el;
981             private ValaProjectSettingsPopover  _this;
982
983
984                 // my vars (def)
985
986             // ctor
987             public Xcls_treelistsort(ValaProjectSettingsPopover _owner )
988             {
989                 _this = _owner;
990                 _this.treelistsort = this;
991                 new Xcls_treelistmodel( _this );
992                 var child_2 = new Xcls_TreeListRowSorter36( _this );
993                 child_2.ref();
994                 this.el = new Gtk.SortListModel( _this.treelistmodel.el, child_2.el );
995
996                 // my vars (dec)
997
998                 // set gobject values
999
1000                 // init method
1001
1002                 {
1003                         //this.el.set_sorter(new Gtk.TreeListRowSorter(_this.treeview.el.sorter));
1004                 }
1005             }
1006
1007             // user defined functions
1008         }
1009         public class Xcls_treelistmodel : Object
1010         {
1011             public Gtk.TreeListModel el;
1012             private ValaProjectSettingsPopover  _this;
1013
1014
1015                 // my vars (def)
1016
1017             // ctor
1018             public Xcls_treelistmodel(ValaProjectSettingsPopover _owner )
1019             {
1020                 _this = _owner;
1021                 _this.treelistmodel = this;
1022                 new Xcls_treemodel( _this );
1023                 this.el = new Gtk.TreeListModel( _this.treemodel.el, false, true, (item) => {
1024         //GLib.debug("liststore got %s", item.get_type().name());
1025         return ((JsRender.JsRender)item).childfiles;
1026 }  );
1027
1028                 // my vars (dec)
1029
1030                 // set gobject values
1031             }
1032
1033             // user defined functions
1034         }
1035         public class Xcls_treemodel : Object
1036         {
1037             public GLib.ListStore el;
1038             private ValaProjectSettingsPopover  _this;
1039
1040
1041                 // my vars (def)
1042
1043             // ctor
1044             public Xcls_treemodel(ValaProjectSettingsPopover _owner )
1045             {
1046                 _this = _owner;
1047                 _this.treemodel = this;
1048                 this.el = new GLib.ListStore( typeof(JsRender.JsRender) );
1049
1050                 // my vars (dec)
1051
1052                 // set gobject values
1053             }
1054
1055             // user defined functions
1056         }
1057
1058
1059         public class Xcls_TreeListRowSorter36 : Object
1060         {
1061             public Gtk.TreeListRowSorter el;
1062             private ValaProjectSettingsPopover  _this;
1063
1064
1065                 // my vars (def)
1066
1067             // ctor
1068             public Xcls_TreeListRowSorter36(ValaProjectSettingsPopover _owner )
1069             {
1070                 _this = _owner;
1071                 var child_1 = new Xcls_StringSorter37( _this );
1072                 child_1.ref();
1073                 this.el = new Gtk.TreeListRowSorter( child_1.el );
1074
1075                 // my vars (dec)
1076
1077                 // set gobject values
1078             }
1079
1080             // user defined functions
1081         }
1082         public class Xcls_StringSorter37 : Object
1083         {
1084             public Gtk.StringSorter el;
1085             private ValaProjectSettingsPopover  _this;
1086
1087
1088                 // my vars (def)
1089
1090             // ctor
1091             public Xcls_StringSorter37(ValaProjectSettingsPopover _owner )
1092             {
1093                 _this = _owner;
1094                 var child_1 = new Xcls_PropertyExpression38( _this );
1095                 child_1.ref();
1096                 this.el = new Gtk.StringSorter( child_1.el );
1097
1098                 // my vars (dec)
1099
1100                 // set gobject values
1101             }
1102
1103             // user defined functions
1104         }
1105         public class Xcls_PropertyExpression38 : Object
1106         {
1107             public Gtk.PropertyExpression el;
1108             private ValaProjectSettingsPopover  _this;
1109
1110
1111                 // my vars (def)
1112
1113             // ctor
1114             public Xcls_PropertyExpression38(ValaProjectSettingsPopover _owner )
1115             {
1116                 _this = _owner;
1117                 this.el = new Gtk.PropertyExpression( typeof(JsRender.JsRender), null, "name" );
1118
1119                 // my vars (dec)
1120
1121                 // set gobject values
1122             }
1123
1124             // user defined functions
1125         }
1126
1127
1128
1129
1130         public class Xcls_CustomFilter39 : Object
1131         {
1132             public Gtk.CustomFilter el;
1133             private ValaProjectSettingsPopover  _this;
1134
1135
1136                 // my vars (def)
1137
1138             // ctor
1139             public Xcls_CustomFilter39(ValaProjectSettingsPopover _owner )
1140             {
1141                 _this = _owner;
1142                 this.el = new Gtk.CustomFilter( (item) => { 
1143         
1144         var tr = ((Gtk.TreeListRow)item).get_item();
1145         //GLib.debug("filter %s", tr.get_type().name());
1146         var j =  (JsRender.JsRender) tr;
1147         if (j.xtype == "Gtk") {
1148                 return true;
1149         }
1150         if (j.xtype != "Dir") {
1151                 return j.path.has_suffix(".vala") ||  j.path.has_suffix(".c");
1152         }
1153         // dirs..
1154          
1155         for (var i =0 ; i < j.childfiles.n_items; i++) {
1156                 var f = (JsRender.JsRender) j.childfiles.get_item(i);
1157                 if (f.xtype == "Gtk") {
1158                         return true;
1159                 }
1160                 if (f.path.has_suffix(".vala") ||  f.path.has_suffix(".c")) {
1161                         return true;
1162                 }
1163         }
1164         return false;
1165
1166 } );
1167
1168                 // my vars (dec)
1169
1170                 // set gobject values
1171             }
1172
1173             // user defined functions
1174         }
1175
1176
1177
1178         public class Xcls_name : Object
1179         {
1180             public Gtk.ColumnViewColumn el;
1181             private ValaProjectSettingsPopover  _this;
1182
1183
1184                 // my vars (def)
1185
1186             // ctor
1187             public Xcls_name(ValaProjectSettingsPopover _owner )
1188             {
1189                 _this = _owner;
1190                 _this.name = this;
1191                 var child_1 = new Xcls_SignalListItemFactory41( _this );
1192                 child_1.ref();
1193                 this.el = new Gtk.ColumnViewColumn( "Other Files", child_1.el );
1194
1195                 // my vars (dec)
1196
1197                 // set gobject values
1198                 this.el.id = "name";
1199                 this.el.expand = true;
1200                 this.el.resizable = true;
1201
1202                 // init method
1203
1204                 {
1205                          this.el.set_sorter(  new Gtk.StringSorter(
1206                                 new Gtk.PropertyExpression(typeof(JsRender.JsRender), null, "name")
1207                         ));
1208                                 ;
1209                                 
1210                 }
1211             }
1212
1213             // user defined functions
1214         }
1215         public class Xcls_SignalListItemFactory41 : Object
1216         {
1217             public Gtk.SignalListItemFactory el;
1218             private ValaProjectSettingsPopover  _this;
1219
1220
1221                 // my vars (def)
1222
1223             // ctor
1224             public Xcls_SignalListItemFactory41(ValaProjectSettingsPopover _owner )
1225             {
1226                 _this = _owner;
1227                 this.el = new Gtk.SignalListItemFactory();
1228
1229                 // my vars (dec)
1230
1231                 // set gobject values
1232
1233                 //listeners
1234                 this.el.setup.connect( (listitem) => {
1235                         
1236                         var expand = new Gtk.TreeExpander();
1237                          
1238                         expand.set_indent_for_depth(true);
1239                         expand.set_indent_for_icon(true);
1240                          
1241                         var lbl = new Gtk.Label("");
1242                         lbl.use_markup = true;
1243                         
1244                         
1245                         lbl.justify = Gtk.Justification.LEFT;
1246                         lbl.xalign = 0;
1247                 
1248                  
1249                         expand.set_child(lbl);
1250                         ((Gtk.ListItem)listitem).set_child(expand);
1251                         ((Gtk.ListItem)listitem).activatable = false;
1252                 });
1253                 this.el.bind.connect( (listitem) => {
1254                          //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
1255                         
1256                         
1257                         
1258                         //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1259                         var expand = (Gtk.TreeExpander)  ((Gtk.ListItem)listitem).get_child();
1260                           
1261                  
1262                         var lbl = (Gtk.Label) expand.child;
1263                         
1264                          if (lbl.label != "") { // do not update
1265                                 return;
1266                         }
1267                         
1268                 
1269                         var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1270                         var jr = (JsRender.JsRender) lr.get_item();
1271                         //GLib.debug("change  %s to %s", lbl.label, np.name);
1272                         lbl.label = jr.name; // for dir's we could hsow the sub path..
1273                         lbl.tooltip_markup = jr.path;
1274                          
1275                     expand.set_hide_expander(  jr.childfiles.n_items < 1);
1276                         expand.set_list_row(lr);
1277                  
1278                    expand.set_hide_expander(  jr.xtype != "Dir" );
1279                          expand.set_list_row(lr);
1280                  
1281                         // bind image...
1282                         
1283                 });
1284             }
1285
1286             // user defined functions
1287         }
1288
1289
1290         public class Xcls_ColumnViewColumn42 : Object
1291         {
1292             public Gtk.ColumnViewColumn el;
1293             private ValaProjectSettingsPopover  _this;
1294
1295
1296                 // my vars (def)
1297
1298             // ctor
1299             public Xcls_ColumnViewColumn42(ValaProjectSettingsPopover _owner )
1300             {
1301                 _this = _owner;
1302                 var child_1 = new Xcls_SignalListItemFactory43( _this );
1303                 child_1.ref();
1304                 this.el = new Gtk.ColumnViewColumn( "use", child_1.el );
1305
1306                 // my vars (dec)
1307
1308                 // set gobject values
1309             }
1310
1311             // user defined functions
1312         }
1313         public class Xcls_SignalListItemFactory43 : Object
1314         {
1315             public Gtk.SignalListItemFactory el;
1316             private ValaProjectSettingsPopover  _this;
1317
1318
1319                 // my vars (def)
1320
1321             // ctor
1322             public Xcls_SignalListItemFactory43(ValaProjectSettingsPopover _owner )
1323             {
1324                 _this = _owner;
1325                 this.el = new Gtk.SignalListItemFactory();
1326
1327                 // my vars (dec)
1328
1329                 // set gobject values
1330
1331                 //listeners
1332                 this.el.setup.connect( (listitem) => {
1333                 
1334                         var btn = new Gtk.CheckButton();
1335                  
1336                         ((Gtk.ListItem)listitem).set_child(btn);
1337                         
1338                         btn.toggled.connect(() =>  {
1339                          
1340                                 var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1341                                 var jr = (JsRender.JsRender) lr.get_item();
1342                                 jr.compile_group_selected = btn.active;
1343                                 
1344                                 
1345                         });
1346                 });
1347                 this.el.bind.connect( (listitem) => {
1348                          //GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
1349                         
1350                         
1351                         
1352                         //var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
1353                         var btn = (Gtk.CheckButton)  ((Gtk.ListItem)listitem).get_child();
1354                           
1355                  
1356                         var lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();
1357                         var jr = (JsRender.JsRender) lr.get_item();
1358                         //GLib.debug("change  %s to %s", lbl.label, np.name);
1359                 
1360                         
1361                          
1362                         jr.bind_property("compile_group_selected",
1363                                     btn, "active",
1364                                    GLib.BindingFlags.SYNC_CREATE); 
1365                         // bind image...
1366                         
1367                 });
1368             }
1369
1370             // user defined functions
1371         }
1372
1373
1374
1375
1376
1377         public class Xcls_Box44 : Object
1378         {
1379             public Gtk.Box el;
1380             private ValaProjectSettingsPopover  _this;
1381
1382
1383                 // my vars (def)
1384
1385             // ctor
1386             public Xcls_Box44(ValaProjectSettingsPopover _owner )
1387             {
1388                 _this = _owner;
1389                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1390
1391                 // my vars (dec)
1392
1393                 // set gobject values
1394                 var child_1 = new Xcls_Box45( _this );
1395                 child_1.ref();
1396                 this.el.append( child_1.el );
1397                 var child_2 = new Xcls_ScrolledWindow48( _this );
1398                 child_2.ref();
1399                 this.el.append( child_2.el );
1400                 new Xcls_set_vboxb( _this );
1401                 this.el.append( _this.set_vboxb.el );
1402             }
1403
1404             // user defined functions
1405         }
1406         public class Xcls_Box45 : Object
1407         {
1408             public Gtk.Box el;
1409             private ValaProjectSettingsPopover  _this;
1410
1411
1412                 // my vars (def)
1413
1414             // ctor
1415             public Xcls_Box45(ValaProjectSettingsPopover _owner )
1416             {
1417                 _this = _owner;
1418                 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1419
1420                 // my vars (dec)
1421
1422                 // set gobject values
1423                 this.el.hexpand = true;
1424                 var child_1 = new Xcls_Button46( _this );
1425                 child_1.ref();
1426                 this.el.append( child_1.el );
1427                 var child_2 = new Xcls_Button47( _this );
1428                 child_2.ref();
1429                 this.el.append( child_2.el );
1430             }
1431
1432             // user defined functions
1433         }
1434         public class Xcls_Button46 : Object
1435         {
1436             public Gtk.Button el;
1437             private ValaProjectSettingsPopover  _this;
1438
1439
1440                 // my vars (def)
1441
1442             // ctor
1443             public Xcls_Button46(ValaProjectSettingsPopover _owner )
1444             {
1445                 _this = _owner;
1446                 this.el = new Gtk.Button();
1447
1448                 // my vars (dec)
1449
1450                 // set gobject values
1451                 this.el.hexpand = true;
1452                 this.el.label = "Add Compile Target";
1453
1454                 //listeners
1455                 this.el.clicked.connect( ()  => {
1456                     
1457                        if (_this.project.compilegroups.has_key("NEW GROUP")) {
1458                         return;
1459                     }
1460                     var cg = new Project.GtkValaSettings(_this.project, "NEW GROUP");
1461                     _this.project.compilegroups.set(cg.name, cg);
1462                      _this.project.loadTargetsIntoStore(_this.target_model.el);
1463                      //  select it.. ?? should load it??
1464                      for(var i =0;i < _this.target_model.el.n_items; i++) {
1465                         var ncg = (Project.GtkValaSettings) _this.target_model.el.get_item(i);
1466                         if (ncg.name == cg.name) {
1467                                 _this.target_sel.el.selected = i;
1468                                 _this.target_sel.selectTarget(cg);
1469                                 break;
1470                                 }
1471                         } 
1472                         
1473                         
1474                          
1475                 });
1476             }
1477
1478             // user defined functions
1479         }
1480
1481         public class Xcls_Button47 : Object
1482         {
1483             public Gtk.Button el;
1484             private ValaProjectSettingsPopover  _this;
1485
1486
1487                 // my vars (def)
1488
1489             // ctor
1490             public Xcls_Button47(ValaProjectSettingsPopover _owner )
1491             {
1492                 _this = _owner;
1493                 this.el = new Gtk.Button();
1494
1495                 // my vars (dec)
1496
1497                 // set gobject values
1498                 this.el.hexpand = true;
1499                 this.el.label = "Remove Target";
1500
1501                 //listeners
1502                 this.el.clicked.connect( ()  => {
1503                     // load the new values.
1504                         if (_this.target_sel.el.selected == Gtk.INVALID_LIST_POSITION) {
1505                                 GLib.debug("nothing selected");
1506                                 return;
1507                         }
1508                         
1509                          
1510                         // add the directory..
1511                         var cg = (Project.GtkValaSettings) _this.target_model.el.get_item(_this.target_sel.el.selected);
1512                          
1513                          
1514                         GLib.debug("remove: %s\n", cg.name);
1515                         if (!_this.project.compilegroups.unset(cg.name)) {
1516                                 GLib.debug("remove failed");
1517                         }
1518                         _this.project.loadTargetsIntoStore(_this.target_model.el);
1519                 });
1520             }
1521
1522             // user defined functions
1523         }
1524
1525
1526         public class Xcls_ScrolledWindow48 : Object
1527         {
1528             public Gtk.ScrolledWindow el;
1529             private ValaProjectSettingsPopover  _this;
1530
1531
1532                 // my vars (def)
1533
1534             // ctor
1535             public Xcls_ScrolledWindow48(ValaProjectSettingsPopover _owner )
1536             {
1537                 _this = _owner;
1538                 this.el = new Gtk.ScrolledWindow();
1539
1540                 // my vars (dec)
1541
1542                 // set gobject values
1543                 this.el.vexpand = true;
1544                 var child_1 = new Xcls_ColumnView49( _this );
1545                 this.el.child = child_1.el;
1546
1547                 // init method
1548
1549                 {  
1550                 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
1551                 
1552                 }
1553             }
1554
1555             // user defined functions
1556         }
1557         public class Xcls_ColumnView49 : Object
1558         {
1559             public Gtk.ColumnView el;
1560             private ValaProjectSettingsPopover  _this;
1561
1562
1563                 // my vars (def)
1564
1565             // ctor
1566             public Xcls_ColumnView49(ValaProjectSettingsPopover _owner )
1567             {
1568                 _this = _owner;
1569                 new Xcls_target_sel( _this );
1570                 this.el = new Gtk.ColumnView( _this.target_sel.el );
1571
1572                 // my vars (dec)
1573
1574                 // set gobject values
1575                 var child_2 = new Xcls_ColumnViewColumn52( _this );
1576                 child_2.ref();
1577                 this.el.append_column ( child_2.el  );
1578             }
1579
1580             // user defined functions
1581         }
1582         public class Xcls_target_sel : Object
1583         {
1584             public Gtk.SingleSelection el;
1585             private ValaProjectSettingsPopover  _this;
1586
1587
1588                 // my vars (def)
1589
1590             // ctor
1591             public Xcls_target_sel(ValaProjectSettingsPopover _owner )
1592             {
1593                 _this = _owner;
1594                 _this.target_sel = this;
1595                 new Xcls_target_model( _this );
1596                 this.el = new Gtk.SingleSelection( _this.target_model.el );
1597
1598                 // my vars (dec)
1599
1600                 // set gobject values
1601
1602                 //listeners
1603                 this.el.selection_changed.connect( (position, n_items) => {
1604                 
1605                          
1606                         // load the new values.
1607                         if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
1608                                 this.selectTarget(null);
1609                                 return;
1610                         }
1611                         this.selectTarget(null);
1612                         
1613                  
1614                 
1615                         // add the directory..
1616                         var cg = (Project.GtkValaSettings) _this.target_model.el.get_item(this.el.selected);
1617                         
1618                         this.selectTarget(cg);
1619                    
1620                 });
1621             }
1622
1623             // user defined functions
1624             public void selectTarget (Project.GtkValaSettings? cg) {
1625             // load the new values
1626                  _this.selected_target = cg;  
1627                  _this.project.active_cg = cg;
1628                  
1629             
1630                 if (cg == null) {
1631                          
1632                         _this.set_vbox.el.hide();       
1633                         _this.set_vboxb.el.hide();      
1634                         return;
1635                 }
1636                 
1637                 
1638                 _this.set_vbox.el.show();
1639                 _this.set_vboxb.el.show();
1640                 // add the directory..
1641              
1642                  
1643                  GLib.debug("loading dirs into project list");
1644                  cg.loading_ui = true;
1645                  
1646             
1647                   _this.treeview.el.set_model(new Gtk.SingleSelection(null));
1648                   _this.project.loadDirsIntoStore(_this.treemodel.el);
1649                   _this.treeview.el.set_model(_this.treeselmodel.el);
1650                   
1651                  cg.loading_ui = false;
1652                  GLib.debug("Set name to %s", cg.name);
1653                  
1654                 _this.build_name.el.buffer.set_text(cg.name.data);
1655              
1656              
1657                 _this.build_execute_args.el.buffer.set_text(  cg.execute_args.data );
1658             
1659              
1660             }
1661         }
1662         public class Xcls_target_model : Object
1663         {
1664             public GLib.ListStore el;
1665             private ValaProjectSettingsPopover  _this;
1666
1667
1668                 // my vars (def)
1669
1670             // ctor
1671             public Xcls_target_model(ValaProjectSettingsPopover _owner )
1672             {
1673                 _this = _owner;
1674                 _this.target_model = this;
1675                 this.el = new GLib.ListStore( typeof(Project.GtkValaSettings) );
1676
1677                 // my vars (dec)
1678
1679                 // set gobject values
1680             }
1681
1682             // user defined functions
1683         }
1684
1685
1686         public class Xcls_ColumnViewColumn52 : Object
1687         {
1688             public Gtk.ColumnViewColumn el;
1689             private ValaProjectSettingsPopover  _this;
1690
1691
1692                 // my vars (def)
1693
1694             // ctor
1695             public Xcls_ColumnViewColumn52(ValaProjectSettingsPopover _owner )
1696             {
1697                 _this = _owner;
1698                 var child_1 = new Xcls_SignalListItemFactory53( _this );
1699                 child_1.ref();
1700                 this.el = new Gtk.ColumnViewColumn( "Build Target", child_1.el );
1701
1702                 // my vars (dec)
1703
1704                 // set gobject values
1705                 this.el.expand = true;
1706             }
1707
1708             // user defined functions
1709         }
1710         public class Xcls_SignalListItemFactory53 : Object
1711         {
1712             public Gtk.SignalListItemFactory el;
1713             private ValaProjectSettingsPopover  _this;
1714
1715
1716                 // my vars (def)
1717
1718             // ctor
1719             public Xcls_SignalListItemFactory53(ValaProjectSettingsPopover _owner )
1720             {
1721                 _this = _owner;
1722                 this.el = new Gtk.SignalListItemFactory();
1723
1724                 // my vars (dec)
1725
1726                 // set gobject values
1727
1728                 //listeners
1729                 this.el.setup.connect( (item) => {
1730                         //var j = (JsRender.JsRender) item;
1731                         var gi = (Gtk.ListItem)item;
1732                          
1733                         var lbl = new Gtk.Label("");
1734                         lbl.halign = Gtk.Align.START;
1735                         gi.set_child(lbl);
1736                 
1737                 
1738                 
1739                 });
1740                 this.el.bind.connect( (listitem) => {
1741                  
1742                         var lbl = (Gtk.Box)  ((Gtk.ListItem)listitem).get_child();
1743                            
1744                         var item = (Project.GtkValaSettings)  ((Gtk.ListItem)listitem).get_item();
1745                 
1746                         item.bind_property("name",
1747                                 lbl, "label",
1748                            GLib.BindingFlags.SYNC_CREATE);
1749                 
1750                           
1751                 });
1752             }
1753
1754             // user defined functions
1755         }
1756
1757
1758
1759
1760         public class Xcls_set_vboxb : Object
1761         {
1762             public Gtk.Box el;
1763             private ValaProjectSettingsPopover  _this;
1764
1765
1766                 // my vars (def)
1767
1768             // ctor
1769             public Xcls_set_vboxb(ValaProjectSettingsPopover _owner )
1770             {
1771                 _this = _owner;
1772                 _this.set_vboxb = this;
1773                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1774
1775                 // my vars (dec)
1776
1777                 // set gobject values
1778                 var child_1 = new Xcls_Label55( _this );
1779                 child_1.ref();
1780                 this.el.append( child_1.el );
1781                 new Xcls_build_name( _this );
1782                 this.el.append( _this.build_name.el );
1783                 var child_3 = new Xcls_Label57( _this );
1784                 child_3.ref();
1785                 this.el.append( child_3.el );
1786                 new Xcls_build_execute_args( _this );
1787                 this.el.append( _this.build_execute_args.el );
1788             }
1789
1790             // user defined functions
1791         }
1792         public class Xcls_Label55 : Object
1793         {
1794             public Gtk.Label el;
1795             private ValaProjectSettingsPopover  _this;
1796
1797
1798                 // my vars (def)
1799
1800             // ctor
1801             public Xcls_Label55(ValaProjectSettingsPopover _owner )
1802             {
1803                 _this = _owner;
1804                 this.el = new Gtk.Label( "Build Name (executable name)" );
1805
1806                 // my vars (dec)
1807
1808                 // set gobject values
1809             }
1810
1811             // user defined functions
1812         }
1813
1814         public class Xcls_build_name : Object
1815         {
1816             public Gtk.Entry el;
1817             private ValaProjectSettingsPopover  _this;
1818
1819
1820                 // my vars (def)
1821
1822             // ctor
1823             public Xcls_build_name(ValaProjectSettingsPopover _owner )
1824             {
1825                 _this = _owner;
1826                 _this.build_name = this;
1827                 this.el = new Gtk.Entry();
1828
1829                 // my vars (dec)
1830
1831                 // set gobject values
1832
1833                 //listeners
1834                 this.el.changed.connect( ()  => {
1835                         if (_this.selected_target == null) {
1836                                 return;
1837                         }
1838                         var name = this.el.text;
1839                         // name ischanging.. probably always..
1840                         if (_this.selected_target.name != name) {
1841                                 _this.project.compilegroups.unset(_this.selected_target.name);
1842                                 _this.project.compilegroups.set(name, _this.selected_target);
1843                         }
1844                 
1845                         _this.selected_target.name = this.el.buffer.text;
1846                 });
1847             }
1848
1849             // user defined functions
1850         }
1851
1852         public class Xcls_Label57 : Object
1853         {
1854             public Gtk.Label el;
1855             private ValaProjectSettingsPopover  _this;
1856
1857
1858                 // my vars (def)
1859
1860             // ctor
1861             public Xcls_Label57(ValaProjectSettingsPopover _owner )
1862             {
1863                 _this = _owner;
1864                 this.el = new Gtk.Label( "test argments - when run after a build" );
1865
1866                 // my vars (dec)
1867
1868                 // set gobject values
1869             }
1870
1871             // user defined functions
1872         }
1873
1874         public class Xcls_build_execute_args : Object
1875         {
1876             public Gtk.Entry el;
1877             private ValaProjectSettingsPopover  _this;
1878
1879
1880                 // my vars (def)
1881
1882             // ctor
1883             public Xcls_build_execute_args(ValaProjectSettingsPopover _owner )
1884             {
1885                 _this = _owner;
1886                 _this.build_execute_args = this;
1887                 this.el = new Gtk.Entry();
1888
1889                 // my vars (dec)
1890
1891                 // set gobject values
1892                 this.el.placeholder_text = "eg.  -f somefile -g ";
1893
1894                 //listeners
1895                 this.el.changed.connect( () => {
1896                     if (_this.selected_target == null) {
1897                         return;
1898                     }
1899                     _this.selected_target.execute_args = this.el.buffer.text;
1900                     
1901                 });
1902             }
1903
1904             // user defined functions
1905         }
1906
1907
1908
1909
1910
1911         public class Xcls_Box59 : Object
1912         {
1913             public Gtk.Box el;
1914             private ValaProjectSettingsPopover  _this;
1915
1916
1917                 // my vars (def)
1918
1919             // ctor
1920             public Xcls_Box59(ValaProjectSettingsPopover _owner )
1921             {
1922                 _this = _owner;
1923                 this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
1924
1925                 // my vars (dec)
1926
1927                 // set gobject values
1928                 this.el.margin_end = 4;
1929                 this.el.margin_start = 4;
1930                 this.el.hexpand = true;
1931                 this.el.margin_bottom = 4;
1932                 this.el.margin_top = 4;
1933                 var child_1 = new Xcls_Button60( _this );
1934                 child_1.ref();
1935                 this.el.append( child_1.el );
1936                 var child_2 = new Xcls_Label61( _this );
1937                 child_2.ref();
1938                 this.el.append( child_2.el );
1939                 new Xcls_save_btn( _this );
1940                 this.el.append( _this.save_btn.el );
1941             }
1942
1943             // user defined functions
1944         }
1945         public class Xcls_Button60 : Object
1946         {
1947             public Gtk.Button el;
1948             private ValaProjectSettingsPopover  _this;
1949
1950
1951                 // my vars (def)
1952
1953             // ctor
1954             public Xcls_Button60(ValaProjectSettingsPopover _owner )
1955             {
1956                 _this = _owner;
1957                 this.el = new Gtk.Button();
1958
1959                 // my vars (dec)
1960
1961                 // set gobject values
1962                 this.el.label = "Cancel";
1963
1964                 //listeners
1965                 this.el.clicked.connect( () => { 
1966                 
1967                   _this.done = true;
1968                     _this.el.hide(); 
1969                 });
1970             }
1971
1972             // user defined functions
1973         }
1974
1975         public class Xcls_Label61 : Object
1976         {
1977             public Gtk.Label el;
1978             private ValaProjectSettingsPopover  _this;
1979
1980
1981                 // my vars (def)
1982
1983             // ctor
1984             public Xcls_Label61(ValaProjectSettingsPopover _owner )
1985             {
1986                 _this = _owner;
1987                 this.el = new Gtk.Label( "" );
1988
1989                 // my vars (dec)
1990
1991                 // set gobject values
1992                 this.el.hexpand = true;
1993             }
1994
1995             // user defined functions
1996         }
1997
1998         public class Xcls_save_btn : Object
1999         {
2000             public Gtk.Button el;
2001             private ValaProjectSettingsPopover  _this;
2002
2003
2004                 // my vars (def)
2005
2006             // ctor
2007             public Xcls_save_btn(ValaProjectSettingsPopover _owner )
2008             {
2009                 _this = _owner;
2010                 _this.save_btn = this;
2011                 this.el = new Gtk.Button();
2012
2013                 // my vars (dec)
2014
2015                 // set gobject values
2016                 this.el.css_classes = { "suggested-action" };
2017                 this.el.label = "Save";
2018
2019                 //listeners
2020                 this.el.clicked.connect( ( ) =>  { 
2021                 
2022                  
2023                 _this.project.save(); 
2024                  
2025                         // what about .js ?
2026                 _this.done = true;
2027                 _this.el.hide();
2028                 if (_this.doneObj != null) {
2029                         _this.doneObj.call(_this.project);
2030                 }
2031                 // hopefull this will work with bjs files..
2032                         
2033                  
2034                    
2035                 });
2036             }
2037
2038             // user defined functions
2039         }
2040
2041
2042
2043     }