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