080846dadac029af6f6a817671b4732af9c4bcd6
[roobuilder] / src / Builder4 / EditProject.vala
1     static EditProject  _EditProject;
2
3     public class EditProject : Object
4     {
5         public Gtk.Window el;
6         private EditProject  _this;
7
8         public static EditProject singleton()
9         {
10             if (_EditProject == null) {
11                 _EditProject= new EditProject();
12             }
13             return _EditProject;
14         }
15         public Xcls_ok_btn ok_btn;
16         public Xcls_type_lbl type_lbl;
17         public Xcls_type_dd type_dd;
18         public Xcls_parent_lbl parent_lbl;
19         public Xcls_parent_dd parent_dd;
20         public Xcls_folder_lbl folder_lbl;
21         public Xcls_folder_dd folder_dd;
22         public Xcls_name_lbl name_lbl;
23         public Xcls_name_entry name_entry;
24         public Xcls_ptype_lbl ptype_lbl;
25         public Xcls_ptype_dd ptype_dd;
26
27             // my vars (def)
28         public WindowState? windowstate;
29         public signal void canceled ();
30         public signal void selected (Project.Project? proj);
31
32         // ctor
33         public EditProject()
34         {
35             _this = this;
36             this.el = new Gtk.Window();
37
38             // my vars (dec)
39             this.windowstate = null;
40
41             // set gobject values
42             this.el.title = "New Project";
43             this.el.name = "EditProject";
44             this.el.default_width = 600;
45             this.el.deletable = true;
46             this.el.modal = true;
47             var child_1 = new Xcls_HeaderBar2( _this );
48             this.el.titlebar = child_1.el;
49             var child_2 = new Xcls_Box5( _this );
50             this.el.child = child_2.el;
51         }
52
53         // user defined functions
54         public void show () {
55              
56             _this.hideAll(); 
57              // hide stuff..
58              _this.type_dd.el.selected = Gtk.INVALID_LIST_POSITION;
59              _this.folder_dd.el.selected = Gtk.INVALID_LIST_POSITION;
60              _this.ptype_dd.el.selected = Gtk.INVALID_LIST_POSITION;
61              _this.parent_dd.extra_value = "";
62             //[ 'xtype'  ].forEach(function(k) {
63             //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
64             //});
65                 // shouild set path..
66             
67             this.el.show();
68             
69         }
70         public void hideAll () {
71                 _this.parent_lbl.el.hide();
72              _this.parent_dd.el.hide();   
73                 
74                 _this.folder_lbl.el.hide();
75              _this.folder_dd.el.hide();     
76              _this.name_lbl.el.hide();          
77              _this.name_entry.el.hide();     
78              _this.ptype_lbl.el.hide();          
79              _this.ptype_dd.el.hide();          
80               _this.ok_btn.el.hide();   
81             
82         }
83         public class Xcls_HeaderBar2 : Object
84         {
85             public Gtk.HeaderBar el;
86             private EditProject  _this;
87
88
89                 // my vars (def)
90
91             // ctor
92             public Xcls_HeaderBar2(EditProject _owner )
93             {
94                 _this = _owner;
95                 this.el = new Gtk.HeaderBar();
96
97                 // my vars (dec)
98
99                 // set gobject values
100                 this.el.show_title_buttons = false;
101                 var child_1 = new Xcls_Button3( _this );
102                 child_1.ref();
103                 this.el.pack_start ( child_1.el  );
104                 new Xcls_ok_btn( _this );
105                 this.el.pack_end ( _this.ok_btn.el  );
106             }
107
108             // user defined functions
109         }
110         public class Xcls_Button3 : Object
111         {
112             public Gtk.Button el;
113             private EditProject  _this;
114
115
116                 // my vars (def)
117
118             // ctor
119             public Xcls_Button3(EditProject _owner )
120             {
121                 _this = _owner;
122                 this.el = new Gtk.Button();
123
124                 // my vars (dec)
125
126                 // set gobject values
127                 this.el.halign = Gtk.Align.END;
128                 this.el.hexpand = false;
129                 this.el.label = "Cancel";
130
131                 //listeners
132                 this.el.clicked.connect( ( ) => {
133                    
134                     _this.el.hide();
135                         _this.canceled();
136                     
137                 
138                 });
139             }
140
141             // user defined functions
142         }
143
144         public class Xcls_ok_btn : Object
145         {
146             public Gtk.Button el;
147             private EditProject  _this;
148
149
150                 // my vars (def)
151
152             // ctor
153             public Xcls_ok_btn(EditProject _owner )
154             {
155                 _this = _owner;
156                 _this.ok_btn = this;
157                 this.el = new Gtk.Button();
158
159                 // my vars (dec)
160
161                 // set gobject values
162                 this.el.halign = Gtk.Align.START;
163                 this.el.hexpand = false;
164                 this.el.css_classes = { "suggested-action" };
165                 this.el.label = "OK";
166
167                 //listeners
168                 this.el.clicked.connect( ( ) => {
169                    var err_dialog = Xcls_StandardErrorDialog.singleton();
170                    
171                    
172                         if (_this.ptype_dd.getValue().length < 1) {
173                         err_dialog.show(_this.el,"You have to set Project type");             
174                         return;
175                     }
176                    var fn = _this.parent_dd.getValue();
177                    var is_existing = false;
178                    var is_new_folder = false;
179                    switch (_this.type_dd.getValue()) {
180                                 case "Existing Folder":
181                                         if (_this.folder_dd.getValue().length < 1) {
182                                                 err_dialog.show(_this.el,"You have to set Folder");             
183                                                 return;
184                                         }
185                                         fn += "/" + _this.folder_dd.getValue();
186                                         is_existing = true;
187                                         break;
188                                 
189                                 case "New Folder":
190                                         if (_this.name_entry.getValue().length < 1) {
191                                                 err_dialog.show(_this.el,"You have enter a Project Name");             
192                                                 return;
193                                         }
194                                         fn += "/" + _this.name_entry.getValue();           
195                                         
196                                         if (FileUtils.test( fn ,FileTest.EXISTS)) {
197                                                 err_dialog.show(_this.el,"That folder already exists");             
198                                                 return;                 
199                                         }
200                                         var dir = File.new_for_path(fn);
201                                         try {
202                                                 dir.make_directory();   
203                                         } catch (Error e) {
204                                                 GLib.error("Failed to make directory %s", fn);
205                                         } 
206                                         is_new_folder = true;
207                                         break;
208                                         
209                                 default:
210                                         return;
211                                 
212                     }
213                    
214                    
215                   
216                     
217                     _this.el.hide();
218                     
219                     
220                 
221                   
222                     GLib.debug("add %s\n" , fn);
223                     try {
224                                 var project = Project.Project.factory(_this.ptype_dd.getValue(), fn);
225                                 if (is_new_folder) {    
226                                         project.initialize();
227                                         
228                                 } else {
229                                         project.load();
230                                 }
231                                 
232                                 project.save();
233                                  Project.Project.saveProjectList();
234                                 _this.selected(project); // this should trigger a load()
235                                 if (is_new_folder || is_existing) {
236                                  _this.windowstate.projectPopoverShow(_this.el, project);
237                          }
238                                 
239                                 return;
240                         } catch (Error e) {
241                                 GLib.debug("got error? %s" , e.message);
242                         }
243                          
244                 
245                 });
246             }
247
248             // user defined functions
249         }
250
251
252         public class Xcls_Box5 : Object
253         {
254             public Gtk.Box el;
255             private EditProject  _this;
256
257
258                 // my vars (def)
259             public bool expand;
260
261             // ctor
262             public Xcls_Box5(EditProject _owner )
263             {
264                 _this = _owner;
265                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
266
267                 // my vars (dec)
268                 this.expand = true;
269
270                 // set gobject values
271                 this.el.homogeneous = false;
272                 this.el.margin_end = 10;
273                 this.el.margin_start = 10;
274                 this.el.margin_bottom = 10;
275                 this.el.margin_top = 10;
276                 var child_1 = new Xcls_Grid6( _this );
277                 child_1.ref();
278                 this.el.append( child_1.el );
279             }
280
281             // user defined functions
282         }
283         public class Xcls_Grid6 : Object
284         {
285             public Gtk.Grid el;
286             private EditProject  _this;
287
288
289                 // my vars (def)
290
291             // ctor
292             public Xcls_Grid6(EditProject _owner )
293             {
294                 _this = _owner;
295                 this.el = new Gtk.Grid();
296
297                 // my vars (dec)
298
299                 // set gobject values
300                 this.el.column_spacing = 4;
301                 this.el.row_spacing = 4;
302                 this.el.margin_bottom = 20;
303                 new Xcls_type_lbl( _this );
304                 this.el.attach( _this.type_lbl.el, 0, 0, 1, 1 );
305                 new Xcls_type_dd( _this );
306                 this.el.attach( _this.type_dd.el, 1, 0, 1, 1 );
307                 new Xcls_parent_lbl( _this );
308                 this.el.attach( _this.parent_lbl.el, 0, 1, 1, 1 );
309                 new Xcls_parent_dd( _this );
310                 this.el.attach( _this.parent_dd.el, 1, 1, 1, 1 );
311                 new Xcls_folder_lbl( _this );
312                 this.el.attach( _this.folder_lbl.el, 0, 2, 1, 1 );
313                 new Xcls_folder_dd( _this );
314                 this.el.attach( _this.folder_dd.el, 1, 2, 1, 1 );
315                 new Xcls_name_lbl( _this );
316                 this.el.attach( _this.name_lbl.el, 0, 3, 1, 1 );
317                 new Xcls_name_entry( _this );
318                 this.el.attach( _this.name_entry.el, 1, 3, 1, 1 );
319                 new Xcls_ptype_lbl( _this );
320                 this.el.attach( _this.ptype_lbl.el, 0, 4, 1, 1 );
321                 new Xcls_ptype_dd( _this );
322                 this.el.attach( _this.ptype_dd.el, 1, 4, 1, 1 );
323             }
324
325             // user defined functions
326         }
327         public class Xcls_type_lbl : Object
328         {
329             public Gtk.Label el;
330             private EditProject  _this;
331
332
333                 // my vars (def)
334
335             // ctor
336             public Xcls_type_lbl(EditProject _owner )
337             {
338                 _this = _owner;
339                 _this.type_lbl = this;
340                 this.el = new Gtk.Label( "Create a Project from:" );
341
342                 // my vars (dec)
343
344                 // set gobject values
345                 this.el.halign = Gtk.Align.START;
346             }
347
348             // user defined functions
349         }
350
351         public class Xcls_type_dd : Object
352         {
353             public Gtk.DropDown el;
354             private EditProject  _this;
355
356
357                 // my vars (def)
358
359             // ctor
360             public Xcls_type_dd(EditProject _owner )
361             {
362                 _this = _owner;
363                 _this.type_dd = this;
364                 var child_1 = new Xcls_StringList9( _this );
365                 child_1.ref();
366                 this.el = new Gtk.DropDown( child_1.el, null );
367
368                 // my vars (dec)
369
370                 // set gobject values
371                 this.el.hexpand = true;
372                 this.el.selected = Gtk.INVALID_LIST_POSITION;
373
374                 // init method
375
376                 {
377                 
378                 }
379
380                 //listeners
381                 this.el.notify["selected"].connect( ( ) => {
382                          
383                         if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
384                                 return;
385                         }
386                         var m = (Gtk.StringList) this.el.model;
387                         GLib.debug("selected item: %s", m.get_string(this.el.selected));
388                         
389                         _this.hideAll();
390                         _this.parent_lbl.el.show();
391                         _this.parent_dd.el.show();
392                         _this.parent_dd.load();
393                         /*
394                                          break;
395                         
396                         switch (m.get_string(this.el.selected)) {
397                                 case "New Folder":
398                                     _this.name_lbl.el.show();          
399                                 _this.name_entry.el.show();     
400                                          break;
401                                 case "Existing Folder":
402                                         _this.folder_lbl.el.show();
403                                          _this.folder_dd.el.show();             
404                                          break;
405                                          
406                                 case "Checkout from git":
407                                     _this.name_lbl.el.show();          
408                                         _this.name_entry.el.show();  
409                                         break;   
410                                 default:
411                                         _this.hideAll();
412                                         break;
413                 
414                         }       
415                         
416                         */
417                          
418                  
419                               
420                           
421                     
422                                 
423                 });
424             }
425
426             // user defined functions
427             public string getValue () {
428                 var m = (Gtk.StringList) this.el.model;
429                 return  m.get_string(this.el.selected);
430                 
431             }
432         }
433         public class Xcls_StringList9 : Object
434         {
435             public Gtk.StringList el;
436             private EditProject  _this;
437
438
439                 // my vars (def)
440
441             // ctor
442             public Xcls_StringList9(EditProject _owner )
443             {
444                 _this = _owner;
445                 this.el = new Gtk.StringList( {  "New Folder", "Existing Folder" /*,  "Checkout from git"  */ } );
446
447                 // my vars (dec)
448
449                 // set gobject values
450             }
451
452             // user defined functions
453         }
454
455
456         public class Xcls_parent_lbl : Object
457         {
458             public Gtk.Label el;
459             private EditProject  _this;
460
461
462                 // my vars (def)
463
464             // ctor
465             public Xcls_parent_lbl(EditProject _owner )
466             {
467                 _this = _owner;
468                 _this.parent_lbl = this;
469                 this.el = new Gtk.Label( "In Folder:" );
470
471                 // my vars (dec)
472
473                 // set gobject values
474                 this.el.halign = Gtk.Align.START;
475             }
476
477             // user defined functions
478         }
479
480         public class Xcls_parent_dd : Object
481         {
482             public Gtk.DropDown el;
483             private EditProject  _this;
484
485
486                 // my vars (def)
487             public string extra_value;
488
489             // ctor
490             public Xcls_parent_dd(EditProject _owner )
491             {
492                 _this = _owner;
493                 _this.parent_dd = this;
494                 var child_1 = new Xcls_StringList12( _this );
495                 child_1.ref();
496                 this.el = new Gtk.DropDown( child_1.el, null );
497
498                 // my vars (dec)
499
500                 // set gobject values
501                 this.el.hexpand = true;
502
503                 //listeners
504                 this.el.notify["selected"].connect( ( ) => {
505                         if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
506                                 _this.hideAll();
507                                 _this.parent_lbl.el.show();
508                         _this.parent_dd.el.show();   
509                         
510                                 return;
511                         }
512                         
513                         
514                         
515                         if (this.getValue() == "Select Folder") {
516                                 var fd = new Gtk.FileDialog();
517                                 fd.title = "Select Folder";
518                                 fd.modal = true;
519                                 
520                                 fd.select_folder.begin(_this.el, null, (obj, res) => {
521                                         try {
522                                         var f = fd.select_folder.end(res);
523                                                 this.extra_value = f.get_path();
524                                                 var sl = (Gtk.StringList) this.el.model;        
525                                                 
526                                                 sl.remove(sl.get_n_items()-1);
527                                                 
528                                                 sl.append(this.extra_value);
529                                                 sl.append("Select Folder");
530                                                 this.el.selected = sl.get_n_items()-2;
531                                         } catch (GLib.Error e) {
532                                                 // do nothing?
533                                         }
534                                         
535                                 });
536                                 return;
537                 
538                         }
539                         _this.hideAll();
540                         _this.parent_lbl.el.show();
541                         _this.parent_dd.el.show();   
542                         
543                         
544                    _this.ptype_lbl.el.show();          
545                    _this.ptype_dd.el.show();  
546                         // folder selected...
547                         switch(_this.type_dd.getValue()) {
548                                 case "New Folder":
549                                    _this.name_lbl.el.show();          
550                            _this.name_entry.el.show(); 
551                            _this.name_entry.el.text = "";
552                                    _this.ptype_lbl.el.show();          
553                                    _this.ptype_dd.el.show();  
554                            break;
555                            
556                                 case "Existing Folder":
557                                         _this.folder_lbl.el.show();
558                                         _this.folder_dd.el.show();
559                                         _this.folder_dd.load();
560                                    
561                                         break;
562                                         
563                                 case "Checkout from git":
564                                    _this.name_lbl.el.show();          
565                            _this.name_entry.el.show(); 
566                            _this.name_lbl.el.label= "not yet";
567                            _this.name_entry.el.text = "this is not supported yet";
568                                         break;
569                                 default:
570                                         break;
571                         }
572                     
573                         
574                 
575                 });
576             }
577
578             // user defined functions
579             public string getValue () {
580                 var m = (Gtk.StringList) this.el.model;
581                 return  m.get_string(this.el.selected);
582                 
583             }
584             public void load () {
585             
586                 var sl = (Gtk.StringList) this.el.model;        
587                 var hd = GLib.Environment.get_home_dir();
588                 while(sl.get_n_items() > 0)  {
589                         sl.remove(0);
590                 }
591                 if (FileUtils.test(hd + "/gitlive" ,FileTest.IS_DIR)) {
592                         sl.append(hd + "/gitlive");
593                 }
594                 if (FileUtils.test(hd + "/Projects" ,FileTest.IS_DIR)) {
595                         sl.append(hd + "/Projects");
596                 }
597                 if (this.extra_value != "" && FileUtils.test(this.extra_value ,FileTest.IS_DIR)) {
598                         sl.append(this.extra_value);
599                 }
600                 
601                 sl.append("Select Folder");
602                 this.el.selected = Gtk.INVALID_LIST_POSITION;
603                 
604             }
605         }
606         public class Xcls_StringList12 : Object
607         {
608             public Gtk.StringList el;
609             private EditProject  _this;
610
611
612                 // my vars (def)
613
614             // ctor
615             public Xcls_StringList12(EditProject _owner )
616             {
617                 _this = _owner;
618                 this.el = new Gtk.StringList( { "gitlive", "Projects", "Select" } );
619
620                 // my vars (dec)
621
622                 // set gobject values
623             }
624
625             // user defined functions
626         }
627
628
629         public class Xcls_folder_lbl : Object
630         {
631             public Gtk.Label el;
632             private EditProject  _this;
633
634
635                 // my vars (def)
636
637             // ctor
638             public Xcls_folder_lbl(EditProject _owner )
639             {
640                 _this = _owner;
641                 _this.folder_lbl = this;
642                 this.el = new Gtk.Label( "Add Folder" );
643
644                 // my vars (dec)
645
646                 // set gobject values
647                 this.el.halign = Gtk.Align.START;
648             }
649
650             // user defined functions
651         }
652
653         public class Xcls_folder_dd : Object
654         {
655             public Gtk.DropDown el;
656             private EditProject  _this;
657
658
659                 // my vars (def)
660
661             // ctor
662             public Xcls_folder_dd(EditProject _owner )
663             {
664                 _this = _owner;
665                 _this.folder_dd = this;
666                 var child_1 = new Xcls_StringList15( _this );
667                 child_1.ref();
668                 this.el = new Gtk.DropDown( child_1.el, null );
669
670                 // my vars (dec)
671
672                 // set gobject values
673                 this.el.hexpand = true;
674
675                 //listeners
676                 this.el.notify["selected"].connect( () => {
677                         var fn = this.getValue();
678                         if (fn == "") {
679                                 return;
680                         }
681                         var p  = _this.parent_dd.getValue();
682                         if (!FileUtils.test(p  + "/" + fn + "/.roobuilder.jcfg"  , GLib.FileTest.EXISTS)) {
683                                 return;
684                         }
685                         var ty = Project.Project.peekProjectType(p  + "/" + fn + "/.roobuilder.jcfg" );
686                         if (ty == "") {
687                                 return;
688                         }
689                         _this.ptype_dd.setValue(ty);
690                          
691                  });
692             }
693
694             // user defined functions
695             public string getValue () {
696                 var m = (Gtk.StringList) this.el.model;
697                 return this.el.selected  == Gtk.INVALID_LIST_POSITION ?
698                                  "" : m.get_string(this.el.selected);
699                 
700             }
701             public void load () {
702                 var p  = _this.parent_dd.getValue();
703                 var f = File.new_for_path(p);
704                 var sl = (Gtk.StringList) this.el.model;        
705                 while(sl.get_n_items() > 0)  {
706                         sl.remove(0);
707                 }
708                 var gstr = new Gee.ArrayList<string>();
709                 
710                 
711                 try {
712                         var file_enum = f.enumerate_children(
713                                 GLib.FileAttribute.STANDARD_DISPLAY_NAME, 
714                                 GLib.FileQueryInfoFlags.NONE, null);
715                   
716                 
717                         
718                         FileInfo next_file; 
719                          
720                         while ((next_file = file_enum.next_file(null)) != null) {
721                                 var fn = next_file.get_display_name();
722                          
723                                 if (fn[0] == '.') { // skip hidden
724                                         continue;
725                                 }
726                                  
727                                 if (!FileUtils.test(p  + "/" + fn, GLib.FileTest.IS_DIR)) {
728                                         continue;
729                                 }
730                                 if (null != Project.Project.getProjectByPath(p  + "/" + fn)) {
731                                         continue;
732                                 }
733                         
734                                 gstr.add(fn);
735                         }
736                 } catch (GLib.Error e) {
737                         // do nothing.. 
738                 }
739                 gstr.sort((a,b) => {
740                         return Posix.strcmp(a.down(), b.down());
741                 });
742             
743                 foreach(var str in gstr) {
744                         sl.append(str);
745                 }
746                  
747             }
748         }
749         public class Xcls_StringList15 : Object
750         {
751             public Gtk.StringList el;
752             private EditProject  _this;
753
754
755                 // my vars (def)
756
757             // ctor
758             public Xcls_StringList15(EditProject _owner )
759             {
760                 _this = _owner;
761                 this.el = new Gtk.StringList( { "gitlive", "Projects", "Select" } );
762
763                 // my vars (dec)
764
765                 // set gobject values
766             }
767
768             // user defined functions
769         }
770
771
772         public class Xcls_name_lbl : Object
773         {
774             public Gtk.Label el;
775             private EditProject  _this;
776
777
778                 // my vars (def)
779
780             // ctor
781             public Xcls_name_lbl(EditProject _owner )
782             {
783                 _this = _owner;
784                 _this.name_lbl = this;
785                 this.el = new Gtk.Label( "Named (New Folder Name)" );
786
787                 // my vars (dec)
788
789                 // set gobject values
790                 this.el.halign = Gtk.Align.START;
791             }
792
793             // user defined functions
794         }
795
796         public class Xcls_name_entry : Object
797         {
798             public Gtk.Entry el;
799             private EditProject  _this;
800
801
802                 // my vars (def)
803
804             // ctor
805             public Xcls_name_entry(EditProject _owner )
806             {
807                 _this = _owner;
808                 _this.name_entry = this;
809                 this.el = new Gtk.Entry();
810
811                 // my vars (dec)
812
813                 // set gobject values
814                 this.el.hexpand = true;
815             }
816
817             // user defined functions
818             public string getValue () {
819                 return this.el.text;
820             }
821         }
822
823         public class Xcls_ptype_lbl : Object
824         {
825             public Gtk.Label el;
826             private EditProject  _this;
827
828
829                 // my vars (def)
830
831             // ctor
832             public Xcls_ptype_lbl(EditProject _owner )
833             {
834                 _this = _owner;
835                 _this.ptype_lbl = this;
836                 this.el = new Gtk.Label( "Project type :" );
837
838                 // my vars (dec)
839
840                 // set gobject values
841                 this.el.halign = Gtk.Align.START;
842             }
843
844             // user defined functions
845         }
846
847         public class Xcls_ptype_dd : Object
848         {
849             public Gtk.DropDown el;
850             private EditProject  _this;
851
852
853                 // my vars (def)
854
855             // ctor
856             public Xcls_ptype_dd(EditProject _owner )
857             {
858                 _this = _owner;
859                 _this.ptype_dd = this;
860                 var child_1 = new Xcls_StringList20( _this );
861                 child_1.ref();
862                 this.el = new Gtk.DropDown( child_1.el, null );
863
864                 // my vars (dec)
865
866                 // set gobject values
867                 this.el.hexpand = true;
868
869                 //listeners
870                 this.el.notify["selected"].connect( ( ) => {
871                 
872                         _this.ok_btn.el.hide(); 
873                         if (this.getValue() != "") {
874                            _this.ok_btn.el.show();
875                         }
876                 
877                 });
878             }
879
880             // user defined functions
881             public string getValue () {
882                 var m = (Gtk.StringList) this.el.model;
883                 return this.el.selected == Gtk.INVALID_LIST_POSITION ?
884                                  "" : m.get_string(this.el.selected);
885                 
886             }
887             public void setValue (string val) {
888                 var m = (Gtk.StringList) this.el.model;
889                 for(var i = 0; i < m.get_n_items();i++) {
890                         if (m.get_string(i) == val) {
891                                 this.el.selected = i;
892                                 break;
893                         }
894                 }
895                 this.el.selected = Gtk.INVALID_LIST_POSITION;
896             
897             }
898         }
899         public class Xcls_StringList20 : Object
900         {
901             public Gtk.StringList el;
902             private EditProject  _this;
903
904
905                 // my vars (def)
906
907             // ctor
908             public Xcls_StringList20(EditProject _owner )
909             {
910                 _this = _owner;
911                 this.el = new Gtk.StringList( { "Roo", "Gtk" /*, "WrappedGtk", "Flutter" */ } );
912
913                 // my vars (dec)
914
915                 // set gobject values
916             }
917
918             // user defined functions
919         }
920
921
922
923
924     }