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