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