src/Builder4/RooProjectSettings.bjs
[roobuilder] / src / Builder4 / RooProjectSettings.vala
1 static Xcls_ProjectSettings  _ProjectSettings;
2
3 public class Xcls_ProjectSettings : Object
4 {
5     public Gtk.Popover el;
6     private Xcls_ProjectSettings  _this;
7
8     public static Xcls_ProjectSettings singleton()
9     {
10         if (_ProjectSettings == null) {
11             _ProjectSettings= new Xcls_ProjectSettings();
12         }
13         return _ProjectSettings;
14     }
15     public Xcls_label_global label_global;
16     public Xcls_label_database label_database;
17     public Xcls_path path;
18     public Xcls_base_template base_template;
19     public Xcls_rootURL rootURL;
20     public Xcls_view view;
21     public Xcls_database_DBTYPE database_DBTYPE;
22     public Xcls_database_DBNAME database_DBNAME;
23     public Xcls_database_DBUSERNAME database_DBUSERNAME;
24     public Xcls_database_DBPASSWORD database_DBPASSWORD;
25     public Xcls_database_ERROR database_ERROR;
26
27         // my vars (def)
28     public signal void buttonPressed (string btn);
29     public Project.Project project;
30
31     // ctor
32     public Xcls_ProjectSettings()
33     {
34         _this = this;
35         this.el = new Gtk.Popover( null );
36
37         // my vars (dec)
38
39         // set gobject values
40         this.el.border_width = 0;
41         this.el.modal = true;
42         this.el.position = Gtk.PositionType.RIGHT;
43         var child_0 = new Xcls_Box2( _this );
44         child_0.ref();
45         this.el.add (  child_0.el  );
46     }
47
48     // user defined functions
49     public void show (Gtk.Widget btn, Project.Project project) {
50         _this.project = project;
51         _this.path.el.label = project.firstPath();
52         // get the active project.
53          var lm = Gtk.SourceLanguageManager.get_default();
54                     
55         ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
56         
57             lm.get_language("html"));
58       
59         //print (project.fn);
60         //project.runhtml = project.runhtml || '';
61         _this.view.el.get_buffer().set_text(project.runhtml);
62         
63            
64         _this.rootURL.el.set_text( _this.project.rootURL );
65         _this.base_template.el.set_text(_this.project.base_template);    
66          var js = _this.project;
67         _this.database_DBTYPE.el.set_text(     js.get_string_member("DBTYPE") );
68         _this.database_DBNAME.el.set_text(    js.get_string_member("DBNAME") );
69         _this.database_DBUSERNAME.el.set_text(    js.get_string_member("DBUSERNAME") );
70         _this.database_DBPASSWORD.el.set_text(    js.get_string_member("DBPASSWORD") );
71         
72                 //console.log('show all');
73         this.el.set_modal(true);
74         this.el.set_relative_to(btn);
75     
76         this.el.set_position(Gtk.PositionType.RIGHT);
77     
78         // window + header?
79          print("SHOWALL - POPIP\n");
80         this.el.show_all();
81         this.kname.el.grab_focus();
82     
83         
84         //this.el.show_all();
85     }
86     public void save () {
87        var buf =    _this.view.el.get_buffer();
88        Gtk.TextIter s;
89          Gtk.TextIter e;
90         buf.get_start_iter(out s);
91         buf.get_end_iter(out e);
92           _this.project.runhtml = buf.get_text(s,e,true);
93           
94         _this.project.rootURL = _this.rootURL.el.get_text();
95         _this.project.base_template = _this.base_template.el.get_text();    
96         
97         var js = _this.project.json_project_data;
98         js.set_string_member("DBTYPE", _this.database_DBTYPE.el.get_text());
99        js.set_string_member("DBNAME", _this.database_DBNAME.el.get_text());
100         js.set_string_member("DBUSERNAME", _this.database_DBUSERNAME.el.get_text());
101         js.set_string_member("DBPASSWORD", _this.database_DBPASSWORD.el.get_text());
102     //    _this.project.set_string_member("DBHOST", _this.DBTYPE.el.get_text());    
103         
104         // need to re-init the database 
105         
106         _this.project.initRooDatabase();
107          
108         
109     }
110     public class Xcls_Box2 : Object
111     {
112         public Gtk.Box el;
113         private Xcls_ProjectSettings  _this;
114
115
116             // my vars (def)
117
118         // ctor
119         public Xcls_Box2(Xcls_ProjectSettings _owner )
120         {
121             _this = _owner;
122             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
123
124             // my vars (dec)
125
126             // set gobject values
127             this.el.homogeneous = false;
128             this.el.border_width = 5;
129             var child_0 = new Xcls_Notebook3( _this );
130             child_0.ref();
131             this.el.pack_start (  child_0.el , false,false,0 );
132             var child_1 = new Xcls_Box28( _this );
133             child_1.ref();
134             this.el.pack_end (  child_1.el , true,true,0 );
135         }
136
137         // user defined functions
138     }
139     public class Xcls_Notebook3 : Object
140     {
141         public Gtk.Notebook el;
142         private Xcls_ProjectSettings  _this;
143
144
145             // my vars (def)
146
147         // ctor
148         public Xcls_Notebook3(Xcls_ProjectSettings _owner )
149         {
150             _this = _owner;
151             this.el = new Gtk.Notebook();
152
153             // my vars (dec)
154
155             // set gobject values
156             var child_0 = new Xcls_label_global( _this );
157             child_0.ref();
158             var child_1 = new Xcls_label_database( _this );
159             child_1.ref();
160             var child_2 = new Xcls_Box6( _this );
161             child_2.ref();
162             this.el.append_page (  child_2.el , _this.label_global.el );
163             var child_3 = new Xcls_Box17( _this );
164             child_3.ref();
165             this.el.append_page (  child_3.el , _this.label_database.el );
166         }
167
168         // user defined functions
169     }
170     public class Xcls_label_global : Object
171     {
172         public Gtk.Label el;
173         private Xcls_ProjectSettings  _this;
174
175
176             // my vars (def)
177
178         // ctor
179         public Xcls_label_global(Xcls_ProjectSettings _owner )
180         {
181             _this = _owner;
182             _this.label_global = this;
183             this.el = new Gtk.Label( "Global" );
184
185             // my vars (dec)
186
187             // set gobject values
188         }
189
190         // user defined functions
191     }
192
193     public class Xcls_label_database : Object
194     {
195         public Gtk.Label el;
196         private Xcls_ProjectSettings  _this;
197
198
199             // my vars (def)
200
201         // ctor
202         public Xcls_label_database(Xcls_ProjectSettings _owner )
203         {
204             _this = _owner;
205             _this.label_database = this;
206             this.el = new Gtk.Label( "Database" );
207
208             // my vars (dec)
209
210             // set gobject values
211         }
212
213         // user defined functions
214     }
215
216     public class Xcls_Box6 : Object
217     {
218         public Gtk.Box el;
219         private Xcls_ProjectSettings  _this;
220
221
222             // my vars (def)
223
224         // ctor
225         public Xcls_Box6(Xcls_ProjectSettings _owner )
226         {
227             _this = _owner;
228             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
229
230             // my vars (dec)
231
232             // set gobject values
233             this.el.homogeneous = false;
234             var child_0 = new Xcls_path( _this );
235             child_0.ref();
236             this.el.pack_start (  child_0.el , false,false,0 );
237             var child_1 = new Xcls_Box8( _this );
238             child_1.ref();
239             this.el.pack_start (  child_1.el , false,false,0 );
240             var child_2 = new Xcls_Box11( _this );
241             child_2.ref();
242             this.el.pack_start (  child_2.el , false,false,0 );
243             var child_3 = new Xcls_Label14( _this );
244             child_3.ref();
245             this.el.pack_start (  child_3.el , false,false,0 );
246             var child_4 = new Xcls_ScrolledWindow15( _this );
247             child_4.ref();
248             this.el.pack_start (  child_4.el , true,true,0 );
249         }
250
251         // user defined functions
252     }
253     public class Xcls_path : Object
254     {
255         public Gtk.Label el;
256         private Xcls_ProjectSettings  _this;
257
258
259             // my vars (def)
260
261         // ctor
262         public Xcls_path(Xcls_ProjectSettings _owner )
263         {
264             _this = _owner;
265             _this.path = this;
266             this.el = new Gtk.Label( "filename" );
267
268             // my vars (dec)
269
270             // set gobject values
271             this.el.margin = 3;
272             this.el.xalign = 0f;
273         }
274
275         // user defined functions
276     }
277
278     public class Xcls_Box8 : Object
279     {
280         public Gtk.Box el;
281         private Xcls_ProjectSettings  _this;
282
283
284             // my vars (def)
285
286         // ctor
287         public Xcls_Box8(Xcls_ProjectSettings _owner )
288         {
289             _this = _owner;
290             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
291
292             // my vars (dec)
293
294             // set gobject values
295             this.el.homogeneous = false;
296             this.el.expand = false;
297             var child_0 = new Xcls_Label9( _this );
298             child_0.ref();
299             this.el.pack_start (  child_0.el , false,false,0 );
300             var child_1 = new Xcls_base_template( _this );
301             child_1.ref();
302             this.el.add (  child_1.el  );
303         }
304
305         // user defined functions
306     }
307     public class Xcls_Label9 : Object
308     {
309         public Gtk.Label el;
310         private Xcls_ProjectSettings  _this;
311
312
313             // my vars (def)
314
315         // ctor
316         public Xcls_Label9(Xcls_ProjectSettings _owner )
317         {
318             _this = _owner;
319             this.el = new Gtk.Label( "HTML template file" );
320
321             // my vars (dec)
322
323             // set gobject values
324             this.el.margin = 3;
325         }
326
327         // user defined functions
328     }
329
330     public class Xcls_base_template : Object
331     {
332         public Gtk.Entry el;
333         private Xcls_ProjectSettings  _this;
334
335
336             // my vars (def)
337
338         // ctor
339         public Xcls_base_template(Xcls_ProjectSettings _owner )
340         {
341             _this = _owner;
342             _this.base_template = this;
343             this.el = new Gtk.Entry();
344
345             // my vars (dec)
346
347             // set gobject values
348         }
349
350         // user defined functions
351     }
352
353
354     public class Xcls_Box11 : Object
355     {
356         public Gtk.Box el;
357         private Xcls_ProjectSettings  _this;
358
359
360             // my vars (def)
361
362         // ctor
363         public Xcls_Box11(Xcls_ProjectSettings _owner )
364         {
365             _this = _owner;
366             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
367
368             // my vars (dec)
369
370             // set gobject values
371             this.el.homogeneous = false;
372             this.el.expand = false;
373             var child_0 = new Xcls_Label12( _this );
374             child_0.ref();
375             this.el.pack_start (  child_0.el , false,false,0 );
376             var child_1 = new Xcls_rootURL( _this );
377             child_1.ref();
378             this.el.add (  child_1.el  );
379         }
380
381         // user defined functions
382     }
383     public class Xcls_Label12 : Object
384     {
385         public Gtk.Label el;
386         private Xcls_ProjectSettings  _this;
387
388
389             // my vars (def)
390
391         // ctor
392         public Xcls_Label12(Xcls_ProjectSettings _owner )
393         {
394             _this = _owner;
395             this.el = new Gtk.Label( "root URL" );
396
397             // my vars (dec)
398
399             // set gobject values
400             this.el.margin = 3;
401         }
402
403         // user defined functions
404     }
405
406     public class Xcls_rootURL : Object
407     {
408         public Gtk.Entry el;
409         private Xcls_ProjectSettings  _this;
410
411
412             // my vars (def)
413
414         // ctor
415         public Xcls_rootURL(Xcls_ProjectSettings _owner )
416         {
417             _this = _owner;
418             _this.rootURL = this;
419             this.el = new Gtk.Entry();
420
421             // my vars (dec)
422
423             // set gobject values
424         }
425
426         // user defined functions
427     }
428
429
430     public class Xcls_Label14 : Object
431     {
432         public Gtk.Label el;
433         private Xcls_ProjectSettings  _this;
434
435
436             // my vars (def)
437
438         // ctor
439         public Xcls_Label14(Xcls_ProjectSettings _owner )
440         {
441             _this = _owner;
442             this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
443
444             // my vars (dec)
445
446             // set gobject values
447         }
448
449         // user defined functions
450     }
451
452     public class Xcls_ScrolledWindow15 : Object
453     {
454         public Gtk.ScrolledWindow el;
455         private Xcls_ProjectSettings  _this;
456
457
458             // my vars (def)
459
460         // ctor
461         public Xcls_ScrolledWindow15(Xcls_ProjectSettings _owner )
462         {
463             _this = _owner;
464             this.el = new Gtk.ScrolledWindow( null, null );
465
466             // my vars (dec)
467
468             // set gobject values
469             var child_0 = new Xcls_view( _this );
470             child_0.ref();
471             this.el.add (  child_0.el  );
472         }
473
474         // user defined functions
475     }
476     public class Xcls_view : Object
477     {
478         public Gtk.SourceView el;
479         private Xcls_ProjectSettings  _this;
480
481
482             // my vars (def)
483
484         // ctor
485         public Xcls_view(Xcls_ProjectSettings _owner )
486         {
487             _this = _owner;
488             _this.view = this;
489             this.el = new Gtk.SourceView();
490
491             // my vars (dec)
492
493             // init method
494
495             var description =   Pango.FontDescription.from_string("monospace");
496                 description.set_size(9000);
497                 this.el.override_font(description);
498
499             //listeners
500             this.el.key_release_event.connect( ( event) =>{
501                 if (event.keyval != 115) {
502                     return false;
503                      
504                 }
505                 if   ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {
506                     return false;
507                 }
508                  var buf =    this.el.get_buffer();
509                 Gtk.TextIter s;
510                 Gtk.TextIter e;
511                 buf.get_start_iter(out s);
512                 buf.get_end_iter(out e);
513                 _this.project.runhtml = buf.get_text(s,e,true);
514                 
515                       
516                 _this.buttonPressed("save");
517                  
518                 return false;
519                      
520             });
521         }
522
523         // user defined functions
524     }
525
526
527
528     public class Xcls_Box17 : Object
529     {
530         public Gtk.Box el;
531         private Xcls_ProjectSettings  _this;
532
533
534             // my vars (def)
535
536         // ctor
537         public Xcls_Box17(Xcls_ProjectSettings _owner )
538         {
539             _this = _owner;
540             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
541
542             // my vars (dec)
543
544             // set gobject values
545             this.el.homogeneous = false;
546             var child_0 = new Xcls_Label18( _this );
547             child_0.ref();
548             this.el.pack_start (  child_0.el , false,false,0 );
549             var child_1 = new Xcls_database_DBTYPE( _this );
550             child_1.ref();
551             this.el.pack_start (  child_1.el , false,false,0 );
552             var child_2 = new Xcls_Label20( _this );
553             child_2.ref();
554             this.el.pack_start (  child_2.el , false,false,0 );
555             var child_3 = new Xcls_database_DBNAME( _this );
556             child_3.ref();
557             this.el.pack_start (  child_3.el , false,false,0 );
558             var child_4 = new Xcls_Label22( _this );
559             child_4.ref();
560             this.el.pack_start (  child_4.el , false,false,0 );
561             var child_5 = new Xcls_database_DBUSERNAME( _this );
562             child_5.ref();
563             this.el.pack_start (  child_5.el , false,false,0 );
564             var child_6 = new Xcls_Label24( _this );
565             child_6.ref();
566             this.el.pack_start (  child_6.el , false,false,0 );
567             var child_7 = new Xcls_database_DBPASSWORD( _this );
568             child_7.ref();
569             this.el.pack_start (  child_7.el , false,false,0 );
570             var child_8 = new Xcls_Button26( _this );
571             child_8.ref();
572             this.el.pack_start (  child_8.el , false,false,0 );
573             var child_9 = new Xcls_database_ERROR( _this );
574             child_9.ref();
575             this.el.pack_start (  child_9.el , false,false,0 );
576         }
577
578         // user defined functions
579     }
580     public class Xcls_Label18 : Object
581     {
582         public Gtk.Label el;
583         private Xcls_ProjectSettings  _this;
584
585
586             // my vars (def)
587
588         // ctor
589         public Xcls_Label18(Xcls_ProjectSettings _owner )
590         {
591             _this = _owner;
592             this.el = new Gtk.Label( "Type (eg. MySQL or PostgreSQL)" );
593
594             // my vars (dec)
595
596             // set gobject values
597             this.el.xalign = 0f;
598         }
599
600         // user defined functions
601     }
602
603     public class Xcls_database_DBTYPE : Object
604     {
605         public Gtk.Entry el;
606         private Xcls_ProjectSettings  _this;
607
608
609             // my vars (def)
610
611         // ctor
612         public Xcls_database_DBTYPE(Xcls_ProjectSettings _owner )
613         {
614             _this = _owner;
615             _this.database_DBTYPE = this;
616             this.el = new Gtk.Entry();
617
618             // my vars (dec)
619
620             // set gobject values
621
622             //listeners
623             this.el.key_press_event.connect( (ev) => {
624             
625                 if (ev.keyval == Gdk.Key.Tab) {
626                     _this.database_DBNAME.el.grab_focus();
627                     return true;
628                 }
629             
630             
631                 return false;
632             });
633         }
634
635         // user defined functions
636     }
637
638     public class Xcls_Label20 : Object
639     {
640         public Gtk.Label el;
641         private Xcls_ProjectSettings  _this;
642
643
644             // my vars (def)
645
646         // ctor
647         public Xcls_Label20(Xcls_ProjectSettings _owner )
648         {
649             _this = _owner;
650             this.el = new Gtk.Label( "Name" );
651
652             // my vars (dec)
653
654             // set gobject values
655             this.el.xalign = 0f;
656         }
657
658         // user defined functions
659     }
660
661     public class Xcls_database_DBNAME : Object
662     {
663         public Gtk.Entry el;
664         private Xcls_ProjectSettings  _this;
665
666
667             // my vars (def)
668
669         // ctor
670         public Xcls_database_DBNAME(Xcls_ProjectSettings _owner )
671         {
672             _this = _owner;
673             _this.database_DBNAME = this;
674             this.el = new Gtk.Entry();
675
676             // my vars (dec)
677
678             // set gobject values
679
680             //listeners
681             this.el.key_press_event.connect( (ev) => {
682             
683                 if (ev.keyval == Gdk.Key.Tab) {
684                     _this.database_DBUSERNAME.el.grab_focus();
685                     return true;
686                 }
687             
688             
689                 return false;
690             });
691         }
692
693         // user defined functions
694     }
695
696     public class Xcls_Label22 : Object
697     {
698         public Gtk.Label el;
699         private Xcls_ProjectSettings  _this;
700
701
702             // my vars (def)
703
704         // ctor
705         public Xcls_Label22(Xcls_ProjectSettings _owner )
706         {
707             _this = _owner;
708             this.el = new Gtk.Label( "Username" );
709
710             // my vars (dec)
711
712             // set gobject values
713             this.el.xalign = 0f;
714         }
715
716         // user defined functions
717     }
718
719     public class Xcls_database_DBUSERNAME : Object
720     {
721         public Gtk.Entry el;
722         private Xcls_ProjectSettings  _this;
723
724
725             // my vars (def)
726
727         // ctor
728         public Xcls_database_DBUSERNAME(Xcls_ProjectSettings _owner )
729         {
730             _this = _owner;
731             _this.database_DBUSERNAME = this;
732             this.el = new Gtk.Entry();
733
734             // my vars (dec)
735
736             // set gobject values
737
738             //listeners
739             this.el.key_press_event.connect( (ev) => {
740             
741                 if (ev.keyval == Gdk.Key.Tab) {
742                     _this.database_DBPASSWORD.el.grab_focus();
743                     return true;
744                 }
745             
746             
747                 return false;
748             });
749         }
750
751         // user defined functions
752     }
753
754     public class Xcls_Label24 : Object
755     {
756         public Gtk.Label el;
757         private Xcls_ProjectSettings  _this;
758
759
760             // my vars (def)
761
762         // ctor
763         public Xcls_Label24(Xcls_ProjectSettings _owner )
764         {
765             _this = _owner;
766             this.el = new Gtk.Label( "Password" );
767
768             // my vars (dec)
769
770             // set gobject values
771             this.el.xalign = 0f;
772         }
773
774         // user defined functions
775     }
776
777     public class Xcls_database_DBPASSWORD : Object
778     {
779         public Gtk.Entry el;
780         private Xcls_ProjectSettings  _this;
781
782
783             // my vars (def)
784
785         // ctor
786         public Xcls_database_DBPASSWORD(Xcls_ProjectSettings _owner )
787         {
788             _this = _owner;
789             _this.database_DBPASSWORD = this;
790             this.el = new Gtk.Entry();
791
792             // my vars (dec)
793
794             // set gobject values
795         }
796
797         // user defined functions
798     }
799
800     public class Xcls_Button26 : Object
801     {
802         public Gtk.Button el;
803         private Xcls_ProjectSettings  _this;
804
805
806             // my vars (def)
807
808         // ctor
809         public Xcls_Button26(Xcls_ProjectSettings _owner )
810         {
811             _this = _owner;
812             this.el = new Gtk.Button();
813
814             // my vars (dec)
815
816             // set gobject values
817             this.el.label = "Check Connection";
818
819             //listeners
820             this.el.clicked.connect( () => {
821             
822             
823               _this.database_ERROR.el.label    = "";
824                 Gda.Connection cnc;
825                 try {
826                     // assumes localhost...
827                      cnc = Gda.Connection.open_from_string (
828                                 _this.database_DBTYPE.el.get_text(),
829                                 "DB_NAME=" + _this.database_DBNAME.el.get_text(), 
830                                 "USERNAME=" + _this.database_DBUSERNAME.el.get_text() + 
831                                 ";PASSWORD=" + _this.database_DBPASSWORD.el.get_text(),
832                                 Gda.ConnectionOptions.NONE
833                         );
834                //} catch (Gda.ConnectionError ce) { 
835                //   _this.database_ERROR.el.label = ce.message;        
836                } catch(Gda.ConnectionError ue) {
837                   _this.database_ERROR.el.label = ue.message;
838                     return;
839                }  catch(Gda.ConfigError ue) {
840                   _this.database_ERROR.el.label = ue.message;
841                     return;
842                }
843               _this.database_ERROR.el.label = "Connection Succeeded";
844                cnc.close();
845             });
846         }
847
848         // user defined functions
849     }
850
851     public class Xcls_database_ERROR : Object
852     {
853         public Gtk.Label el;
854         private Xcls_ProjectSettings  _this;
855
856
857             // my vars (def)
858
859         // ctor
860         public Xcls_database_ERROR(Xcls_ProjectSettings _owner )
861         {
862             _this = _owner;
863             _this.database_ERROR = this;
864             this.el = new Gtk.Label( " " );
865
866             // my vars (dec)
867
868             // set gobject values
869             this.el.margin = 3;
870             this.el.xalign = 0f;
871         }
872
873         // user defined functions
874     }
875
876
877
878     public class Xcls_Box28 : Object
879     {
880         public Gtk.Box el;
881         private Xcls_ProjectSettings  _this;
882
883
884             // my vars (def)
885
886         // ctor
887         public Xcls_Box28(Xcls_ProjectSettings _owner )
888         {
889             _this = _owner;
890             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
891
892             // my vars (dec)
893
894             // set gobject values
895             this.el.homogeneous = true;
896             this.el.expand = false;
897             this.el.vexpand = false;
898             var child_0 = new Xcls_Button29( _this );
899             child_0.ref();
900             this.el.add (  child_0.el  );
901             var child_1 = new Xcls_Button30( _this );
902             child_1.ref();
903             this.el.add (  child_1.el  );
904         }
905
906         // user defined functions
907     }
908     public class Xcls_Button29 : Object
909     {
910         public Gtk.Button el;
911         private Xcls_ProjectSettings  _this;
912
913
914             // my vars (def)
915
916         // ctor
917         public Xcls_Button29(Xcls_ProjectSettings _owner )
918         {
919             _this = _owner;
920             this.el = new Gtk.Button();
921
922             // my vars (dec)
923
924             // set gobject values
925             this.el.label = "Apply";
926
927             //listeners
928             this.el.button_press_event.connect( () => {
929                 _this.save();
930                       
931                 _this.buttonPressed("apply");
932                     return false;
933             });
934         }
935
936         // user defined functions
937     }
938
939     public class Xcls_Button30 : Object
940     {
941         public Gtk.Button el;
942         private Xcls_ProjectSettings  _this;
943
944
945             // my vars (def)
946
947         // ctor
948         public Xcls_Button30(Xcls_ProjectSettings _owner )
949         {
950             _this = _owner;
951             this.el = new Gtk.Button();
952
953             // my vars (dec)
954
955             // set gobject values
956             this.el.label = "Save";
957
958             //listeners
959             this.el.button_press_event.connect( () => {
960                    _this.save();
961                       
962                 _this.buttonPressed("save");
963                     return false;
964             });
965         }
966
967         // user defined functions
968     }
969
970
971
972 }