Clones.bjs
[gitlive] / Clones.vala
1 static Clones  _Clones;
2
3 public class Clones : Object
4 {
5     public Gtk.Dialog el;
6     private Clones  _this;
7
8     public static Clones singleton()
9     {
10         if (_Clones == null) {
11             _Clones= new Clones();
12         }
13         return _Clones;
14     }
15     public Xcls_Clones Clones;
16     public Xcls_reposView reposView;
17     public Xcls_reposStore reposStore;
18     public Xcls_ok_button ok_button;
19
20         // my vars (def)
21
22     // ctor
23     public Clones()
24     {
25         _this = this;
26         this.el = new Gtk.Dialog();
27
28         // my vars (dec)
29
30         // set gobject values
31         this.el.title = "Manage Clones";
32         this.el.border_width = 3;
33         this.el.default_height = 500;
34         this.el.default_width = 600;
35         this.el.deletable = true;
36         this.el.modal = true;
37         var child_0 = new Xcls_Clones( _this );
38         child_0.ref();
39         this.el.function(p (  child_0.el , e) {
40         p.el.get_content_area().pack_start(e.el,true,true,0)
41     }
42  );
43         var child_1 = new Xcls_ok_button( _this );
44         child_1.ref();
45         this.el.add_action_widget (  child_1.el , 1  );
46
47         //listeners
48         this.el.delete_event.connect( (self, event) => {
49             this.el.hide();
50             return true; 
51             //test  
52         });
53         this.el.response.connect( (self, response_id) =>  { 
54          
55                 this.el.hide();
56           
57         });
58     }
59
60     // user defined functions
61     public void show () =>  {
62     
63         
64         this.el.set_deletable(false);
65         this.el.show_all();
66         // load clones..
67     //     this.get('/reposStore').load();
68         
69         //this.get('/ok_button').el.set_sensitive(false);
70         
71         // block until we return.
72     //    var run_ret = this.el.run();
73     //    if (run_ret < 1 ) {
74     //        return  "DONE";
75     //    }
76     //    print("RUN RETURN : " + run_ret);
77     //    return "DONE";
78         //print(JSON.stringify(this.get('bug').getValue()));
79        // return this.get('bug').getValue();
80         //this.success = c.success;
81     }
82     public class Xcls_Clones : Object
83     {
84         public Gtk.VBox el;
85         private Clones  _this;
86
87
88             // my vars (def)
89
90         // ctor
91         public Xcls_Clones(Clones _owner )
92         {
93             _this = _owner;
94             _this.Clones = this;
95             this.el = new Gtk.VBox( true, 0 );
96
97             // my vars (dec)
98
99             // set gobject values
100             var child_0 = new Xcls_HBox3( _this );
101             child_0.ref();
102             this.el.pack_start (  child_0.el , false,true );
103             var child_1 = new Xcls_ScrolledWindow9( _this );
104             child_1.ref();
105         }
106
107         // user defined functions
108     }
109     public class Xcls_HBox3 : Object
110     {
111         public Gtk.HBox el;
112         private Clones  _this;
113
114
115             // my vars (def)
116
117         // ctor
118         public Xcls_HBox3(Clones _owner )
119         {
120             _this = _owner;
121             this.el = new Gtk.HBox( true, 0 );
122
123             // my vars (dec)
124
125             // set gobject values
126             var child_0 = new Xcls_Button4( _this );
127             child_0.ref();
128             this.el.add (  child_0.el  );
129             var child_1 = new Xcls_Button5( _this );
130             child_1.ref();
131             this.el.add (  child_1.el  );
132             var child_2 = new Xcls_Button6( _this );
133             child_2.ref();
134             this.el.add (  child_2.el  );
135             var child_3 = new Xcls_Button7( _this );
136             child_3.ref();
137             this.el.add (  child_3.el  );
138             var child_4 = new Xcls_Button8( _this );
139             child_4.ref();
140             this.el.add (  child_4.el  );
141         }
142
143         // user defined functions
144     }
145     public class Xcls_Button4 : Object
146     {
147         public Gtk.Button el;
148         private Clones  _this;
149
150
151             // my vars (def)
152
153         // ctor
154         public Xcls_Button4(Clones _owner )
155         {
156             _this = _owner;
157             this.el = new Gtk.Button();
158
159             // my vars (dec)
160
161             // set gobject values
162             this.el.label = "Remotes / Clones";
163
164             //listeners
165             this.el.clicked.connect( function (self) {
166             
167                 var rv = this.get('/reposView');
168                 var rs = this.get('/reposStore');
169                 if (rv.el.get_selection().count_selected_rows() != 1) {
170                     //nothing?
171                     // error condition.
172                     return;
173                 }
174                 var Remotes =     imports.Remotes.Remotes;
175                 
176              
177                 var ret = {};       
178                 var s = rv.el.get_selection();
179                 var path = '';
180                 s.selected_foreach(function(model,p,iter) {
181                                                                 
182                    path = model.get_value(iter, 6).value.get_string();
183                  
184                 }); 
185             
186                 var repo = false;
187                 rs.repos.forEach(function(r) {
188                     if (r.repopath == path) {
189                         repo = r;
190                     
191                     }
192                 
193                 });
194                 Remotes.repo = repo;
195                 Remotes.el.set_transient_for(Clones.el);
196                 Clones.el.set_title("Manage Clones - " + repo.repopath);
197                 Remotes.show();
198                 Clones.el.set_title("Manage Clones");
199             
200                  
201                 
202                 
203                 
204             
205                    
206                 
207                 
208             });
209         }
210
211         // user defined functions
212     }
213
214     public class Xcls_Button5 : Object
215     {
216         public Gtk.Button el;
217         private Clones  _this;
218
219
220             // my vars (def)
221
222         // ctor
223         public Xcls_Button5(Clones _owner )
224         {
225             _this = _owner;
226             this.el = new Gtk.Button();
227
228             // my vars (dec)
229
230             // set gobject values
231             this.el.label = "Branches";
232
233             //listeners
234             this.el.clicked.connect( function (self) {
235             
236                 var rv = this.get('/reposView');
237                 var rs = this.get('/reposStore');
238                 if (rv.el.get_selection().count_selected_rows() != 1) {
239                     //nothing?
240                     // error condition.
241                     return;
242                 }
243                 var Branches =     imports.Branches.Branches;
244                 
245              
246                 var ret = {};       
247                 var s = rv.el.get_selection();
248                 var path = '';
249                 s.selected_foreach(function(model,p,iter) {
250                                                                 
251                    path = model.get_value(iter, 6).value.get_string();
252                  
253                 }); 
254             
255                 var repo = false;
256                 rs.repos.forEach(function(r) {
257                     if (r.repopath == path) {
258                         repo = r;
259                     
260                     }
261                 
262                 });
263                 Branches.repo = repo;
264                 Branches.el.set_transient_for(Clones.el);
265                 Clones.el.set_title("Manage Clones - " + repo.repopath);
266                 Branches.show();
267                 Clones.el.set_title("Manage Clones");
268             
269                  
270                 
271                 
272                 
273             
274                    
275                 
276                 
277             });
278         }
279
280         // user defined functions
281     }
282
283     public class Xcls_Button6 : Object
284     {
285         public Gtk.Button el;
286         private Clones  _this;
287
288
289             // my vars (def)
290
291         // ctor
292         public Xcls_Button6(Clones _owner )
293         {
294             _this = _owner;
295             this.el = new Gtk.Button();
296
297             // my vars (dec)
298
299             // set gobject values
300             this.el.label = "Merge";
301
302             //listeners
303             this.el.clicked.connect( function (self) {
304             
305                 var rv = this.get('/reposView');
306                 var rs = this.get('/reposStore');
307                 if (rv.el.get_selection().count_selected_rows() != 1) {
308                     //nothing?
309                     // error condition.
310                     return;
311                 }
312                 var Merger =     imports.Merger.Merger;
313                 
314              
315                 var ret = {};       
316                 var s = rv.el.get_selection();
317                 var path = '';
318                 s.selected_foreach(function(model,p,iter) {
319                                                                 
320                    path = model.get_value(iter, 6).value.get_string();
321                  
322                 }); 
323             
324                 var repo = false;
325                 rs.repos.forEach(function(r) {
326                     if (r.repopath == path) {
327                         repo = r;
328                     
329                     }
330                 
331                 });
332                 Merger.repo = repo;
333                 Merger.el.set_transient_for(Clones.el);
334                 Clones.el.set_title("Manage Clones - " + repo.repopath);
335                 Merger.show();
336                 Clones.el.set_title("Manage Clones");
337             
338                 
339                 
340             
341                 
342             
343                 
344                 
345                 
346                 
347             
348                    
349                 
350                 
351             });
352         }
353
354         // user defined functions
355     }
356
357     public class Xcls_Button7 : Object
358     {
359         public Gtk.Button el;
360         private Clones  _this;
361
362
363             // my vars (def)
364
365         // ctor
366         public Xcls_Button7(Clones _owner )
367         {
368             _this = _owner;
369             this.el = new Gtk.Button();
370
371             // my vars (dec)
372
373             // set gobject values
374             this.el.label = "Switch Branch";
375
376             //listeners
377             this.el.clicked.connect( function (self) {
378                 
379                 
380              
381                    
382                 
383                 
384             });
385         }
386
387         // user defined functions
388     }
389
390     public class Xcls_Button8 : Object
391     {
392         public Gtk.Button el;
393         private Clones  _this;
394
395
396             // my vars (def)
397
398         // ctor
399         public Xcls_Button8(Clones _owner )
400         {
401             _this = _owner;
402             this.el = new Gtk.Button();
403
404             // my vars (dec)
405
406             // set gobject values
407             this.el.label = "Pull";
408
409             //listeners
410             this.el.clicked.connect( function (self) {
411                 
412                 
413              
414                    
415                 
416                 
417             });
418         }
419
420         // user defined functions
421     }
422
423
424     public class Xcls_ScrolledWindow9 : Object
425     {
426         public Gtk.ScrolledWindow el;
427         private Clones  _this;
428
429
430             // my vars (def)
431
432         // ctor
433         public Xcls_ScrolledWindow9(Clones _owner )
434         {
435             _this = _owner;
436             this.el = new Gtk.ScrolledWindow( null, null );
437
438             // my vars (dec)
439
440             // set gobject values
441             var child_0 = new Xcls_reposView( _this );
442             child_0.ref();
443             this.el.add (  child_0.el  );
444             var child_1 = new Xcls_TreeView24( _this );
445             child_1.ref();
446
447             // init method
448
449             function() {
450                 XObject.prototype.init.call(this);
451                   this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
452             }
453         }
454
455         // user defined functions
456     }
457     public class Xcls_reposView : Object
458     {
459         public Gtk.TreeView el;
460         private Clones  _this;
461
462
463             // my vars (def)
464
465         // ctor
466         public Xcls_reposView(Clones _owner )
467         {
468             _this = _owner;
469             _this.reposView = this;
470             this.el = new Gtk.TreeView();
471
472             // my vars (dec)
473
474             // set gobject values
475             var child_0 = new Xcls_reposStore( _this );
476             child_0.ref();
477             this.el.set_model (  child_0.el  );
478             var child_1 = new Xcls_TreeViewColumn12( _this );
479             child_1.ref();
480             this.el.append_column (  child_1.el  );
481             var child_2 = new Xcls_TreeViewColumn14( _this );
482             child_2.ref();
483             this.el.append_column (  child_2.el  );
484             var child_3 = new Xcls_TreeViewColumn16( _this );
485             child_3.ref();
486             this.el.append_column (  child_3.el  );
487             var child_4 = new Xcls_TreeViewColumn18( _this );
488             child_4.ref();
489             this.el.append_column (  child_4.el  );
490             var child_5 = new Xcls_TreeViewColumn20( _this );
491             child_5.ref();
492             this.el.append_column (  child_5.el  );
493             var child_6 = new Xcls_TreeViewColumn22( _this );
494             child_6.ref();
495             this.el.append_column (  child_6.el  );
496
497             // init method
498
499             function() {
500                 XObject.prototype.init.call(this);
501                     var description = new Pango.FontDescription.c_new();
502                description.set_size(10000);
503                  this.el.modify_font(description);
504             
505                  this.selection = this.el.get_selection();
506                   this.selection.set_mode( Gtk.SelectionMode.MULTIPLE);
507                 var _this = this;
508                 
509                 
510               this.selection.signal['changed'].connect(function() {
511                  _this.listeners.cursor_changed.apply(
512                       _this, [ _this, '']
513                    );
514                          });
515               }
516
517             //listeners
518             this.el.cursor_changed.connect( function (self) {
519               // SEE SELECTION.CHANGED
520               
521               
522               return;
523               
524                 if (this.el.get_selection().count_selected_rows() < 1) {
525                     //nothing? - clea it?
526                     return;
527                 }
528                     var ret = {};         
529                 var model = this.get('/changedFilesStore');
530             
531                  var s = this.el.get_selection();
532                  var files = [];
533                 s.selected_foreach(function(model,p,iter) {
534                 
535                    files.push( model.get_value(iter, 0).value.get_string());
536                  
537                 });
538                 this.get('/patchview').showDiff(files); 
539                 //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();
540                  //print("OUT?" + value);// id..
541                 // load the list in the right grid..
542                  
543                 return true;
544             
545             });
546         }
547
548         // user defined functions
549     }
550     public class Xcls_reposStore : Object
551     {
552         public Gtk.ListStore el;
553         private Clones  _this;
554
555
556             // my vars (def)
557
558         // ctor
559         public Xcls_reposStore(Clones _owner )
560         {
561             _this = _owner;
562             _this.reposStore = this;
563             this.el = new Gtk.ListStore( 0, null );
564
565             // my vars (dec)
566
567             // set gobject values
568
569             // init method
570
571             function() {
572                 XObject.prototype.init.call(this);
573                 this.el.set_column_types ( 8, [
574                    GObject.TYPE_STRING, // repo  
575                   GObject.TYPE_STRING, // current branch
576                   GObject.TYPE_STRING, // all branch      
577                   GObject.TYPE_STRING, // updated
578                    GObject.TYPE_BOOLEAN, // auto-commit
579                     GObject.TYPE_BOOLEAN, // auto-push
580                        GObject.TYPE_STRING, // repopath
581                        GObject.TYPE_STRING // color highighling 
582               ] );
583             }
584         }
585
586         // user defined functions
587     }
588
589     public class Xcls_TreeViewColumn12 : Object
590     {
591         public Gtk.TreeViewColumn el;
592         private Clones  _this;
593
594
595             // my vars (def)
596
597         // ctor
598         public Xcls_TreeViewColumn12(Clones _owner )
599         {
600             _this = _owner;
601             this.el = new Gtk.TreeViewColumn();
602
603             // my vars (dec)
604
605             // set gobject values
606             this.el.title = "Auto Commit";
607             this.el.min_width = 50;
608             var child_0 = new Xcls_CellRendererToggle13( _this );
609             child_0.ref();
610             this.el.pack_start (  child_0.el  );
611
612             // init method
613
614             function() {
615                 XObject.prototype.init.call(this);
616                 this.el.add_attribute(this.items[0].el , 'active', 4 );
617                 this.items[0].el.set_activatable(true);
618             
619             }
620         }
621
622         // user defined functions
623     }
624     public class Xcls_CellRendererToggle13 : Object
625     {
626         public Gtk.CellRendererToggle el;
627         private Clones  _this;
628
629
630             // my vars (def)
631
632         // ctor
633         public Xcls_CellRendererToggle13(Clones _owner )
634         {
635             _this = _owner;
636             this.el = new Gtk.CellRendererToggle();
637
638             // my vars (dec)
639
640             // set gobject values
641             this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
642
643             //listeners
644             this.el.toggled.connect( function (self, path) {
645                 var ret ={} ;
646                 var store = this.get('/reposStore');
647                 store.el.get_iter_from_string(ret, path);
648                                                                              
649                 var value =   store.el.get_value(ret.iter,4).value.get_boolean();
650                                                                              
651                 //print(JSON.stringify(value));
652                 store.el.set_value(ret.iter,4, !value);
653                 
654                  var path =  store.el.get_value(ret.iter, 6).value.get_string();
655                  var repo = imports.Scm.Repo.Repo.get(path);
656                  repo.autocommit(!value);
657                  
658                 
659                 
660             });
661         }
662
663         // user defined functions
664     }
665
666
667     public class Xcls_TreeViewColumn14 : Object
668     {
669         public Gtk.TreeViewColumn el;
670         private Clones  _this;
671
672
673             // my vars (def)
674
675         // ctor
676         public Xcls_TreeViewColumn14(Clones _owner )
677         {
678             _this = _owner;
679             this.el = new Gtk.TreeViewColumn();
680
681             // my vars (dec)
682
683             // set gobject values
684             this.el.title = "Auto Push";
685             this.el.min_width = 50;
686             var child_0 = new Xcls_CellRendererToggle15( _this );
687             child_0.ref();
688             this.el.pack_start (  child_0.el  );
689
690             // init method
691
692             function() {
693                 XObject.prototype.init.call(this);
694                 this.el.add_attribute(this.items[0].el , 'active', 5 );
695                   this.items[0].el.set_activatable(true);
696             }
697         }
698
699         // user defined functions
700     }
701     public class Xcls_CellRendererToggle15 : Object
702     {
703         public Gtk.CellRendererToggle el;
704         private Clones  _this;
705
706
707             // my vars (def)
708
709         // ctor
710         public Xcls_CellRendererToggle15(Clones _owner )
711         {
712             _this = _owner;
713             this.el = new Gtk.CellRendererToggle();
714
715             // my vars (dec)
716
717             // set gobject values
718             this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
719
720             //listeners
721             this.el.toggled.connect( function (self, path) {
722                 var ret ={} ;
723                 var store = this.get('/reposStore');
724                 store.el.get_iter_from_string(ret, path);
725                                                                              
726                 var value =   store.el.get_value(ret.iter,5).value.get_boolean();
727                                                                              
728                 //print(JSON.stringify(value));
729                 store.el.set_value(ret.iter,5, !value);
730                   var path =  store.el.get_value(ret.iter, 6).value.get_string();
731                  var repo = imports.Scm.Repo.Repo.get(path);
732                  repo.autopush(!value);
733                  
734             });
735         }
736
737         // user defined functions
738     }
739
740
741     public class Xcls_TreeViewColumn16 : Object
742     {
743         public Gtk.TreeViewColumn el;
744         private Clones  _this;
745
746
747             // my vars (def)
748
749         // ctor
750         public Xcls_TreeViewColumn16(Clones _owner )
751         {
752             _this = _owner;
753             this.el = new Gtk.TreeViewColumn();
754
755             // my vars (dec)
756
757             // set gobject values
758             this.el.title = "Repo";
759             this.el.min_width = 200;
760             this.el.resizable = true;
761             var child_0 = new Xcls_CellRendererText17( _this );
762             child_0.ref();
763             this.el.pack_start (  child_0.el  );
764
765             // init method
766
767             function() {
768                 XObject.prototype.init.call(this);
769                 this.el.add_attribute(this.items[0].el , 'markup', 0 );
770             
771             }
772         }
773
774         // user defined functions
775     }
776     public class Xcls_CellRendererText17 : Object
777     {
778         public Gtk.CellRendererText el;
779         private Clones  _this;
780
781
782             // my vars (def)
783
784         // ctor
785         public Xcls_CellRendererText17(Clones _owner )
786         {
787             _this = _owner;
788             this.el = new Gtk.CellRendererText();
789
790             // my vars (dec)
791
792             // set gobject values
793         }
794
795         // user defined functions
796     }
797
798
799     public class Xcls_TreeViewColumn18 : Object
800     {
801         public Gtk.TreeViewColumn el;
802         private Clones  _this;
803
804
805             // my vars (def)
806
807         // ctor
808         public Xcls_TreeViewColumn18(Clones _owner )
809         {
810             _this = _owner;
811             this.el = new Gtk.TreeViewColumn();
812
813             // my vars (dec)
814
815             // set gobject values
816             this.el.title = "Current Branch";
817             this.el.min_width = 50;
818             var child_0 = new Xcls_CellRendererText19( _this );
819             child_0.ref();
820             this.el.pack_start (  child_0.el  );
821
822             // init method
823
824             function() {
825                 XObject.prototype.init.call(this);
826                 this.el.add_attribute(this.items[0].el , 'markup', 1 );
827                  this.el.add_attribute(this.items[0].el , 'cell-background', 7 );
828             
829             }
830         }
831
832         // user defined functions
833     }
834     public class Xcls_CellRendererText19 : Object
835     {
836         public Gtk.CellRendererText el;
837         private Clones  _this;
838
839
840             // my vars (def)
841
842         // ctor
843         public Xcls_CellRendererText19(Clones _owner )
844         {
845             _this = _owner;
846             this.el = new Gtk.CellRendererText();
847
848             // my vars (dec)
849
850             // set gobject values
851         }
852
853         // user defined functions
854     }
855
856
857     public class Xcls_TreeViewColumn20 : Object
858     {
859         public Gtk.TreeViewColumn el;
860         private Clones  _this;
861
862
863             // my vars (def)
864
865         // ctor
866         public Xcls_TreeViewColumn20(Clones _owner )
867         {
868             _this = _owner;
869             this.el = new Gtk.TreeViewColumn();
870
871             // my vars (dec)
872
873             // set gobject values
874             this.el.title = "Last updated";
875             this.el.min_width = 50;
876             var child_0 = new Xcls_CellRendererText21( _this );
877             child_0.ref();
878             this.el.pack_start (  child_0.el  );
879
880             // init method
881
882             function() {
883                 XObject.prototype.init.call(this);
884                 this.el.add_attribute(this.items[0].el , 'markup', 3 );
885             
886             }
887         }
888
889         // user defined functions
890     }
891     public class Xcls_CellRendererText21 : Object
892     {
893         public Gtk.CellRendererText el;
894         private Clones  _this;
895
896
897             // my vars (def)
898
899         // ctor
900         public Xcls_CellRendererText21(Clones _owner )
901         {
902             _this = _owner;
903             this.el = new Gtk.CellRendererText();
904
905             // my vars (dec)
906
907             // set gobject values
908         }
909
910         // user defined functions
911     }
912
913
914     public class Xcls_TreeViewColumn22 : Object
915     {
916         public Gtk.TreeViewColumn el;
917         private Clones  _this;
918
919
920             // my vars (def)
921
922         // ctor
923         public Xcls_TreeViewColumn22(Clones _owner )
924         {
925             _this = _owner;
926             this.el = new Gtk.TreeViewColumn();
927
928             // my vars (dec)
929
930             // set gobject values
931             this.el.title = "All Branches";
932             this.el.min_width = 50;
933             this.el.resizable = false;
934             var child_0 = new Xcls_CellRendererText23( _this );
935             child_0.ref();
936             this.el.pack_start (  child_0.el  );
937
938             // init method
939
940             function() {
941                 XObject.prototype.init.call(this);
942                 this.el.add_attribute(this.items[0].el , 'markup', 2 );
943             
944             }
945         }
946
947         // user defined functions
948     }
949     public class Xcls_CellRendererText23 : Object
950     {
951         public Gtk.CellRendererText el;
952         private Clones  _this;
953
954
955             // my vars (def)
956
957         // ctor
958         public Xcls_CellRendererText23(Clones _owner )
959         {
960             _this = _owner;
961             this.el = new Gtk.CellRendererText();
962
963             // my vars (dec)
964
965             // set gobject values
966         }
967
968         // user defined functions
969     }
970
971
972
973     public class Xcls_TreeView24 : Object
974     {
975         public Gtk.TreeView el;
976         private Clones  _this;
977
978
979             // my vars (def)
980
981         // ctor
982         public Xcls_TreeView24(Clones _owner )
983         {
984             _this = _owner;
985             this.el = new Gtk.TreeView();
986
987             // my vars (dec)
988
989             // set gobject values
990             var child_0 = new Xcls_ListStore25( _this );
991             child_0.ref();
992         }
993
994         // user defined functions
995     }
996     public class Xcls_ListStore25 : Object
997     {
998         public Gtk.ListStore el;
999         private Clones  _this;
1000
1001
1002             // my vars (def)
1003
1004         // ctor
1005         public Xcls_ListStore25(Clones _owner )
1006         {
1007             _this = _owner;
1008             this.el = new Gtk.ListStore( 0, null );
1009
1010             // my vars (dec)
1011
1012             // set gobject values
1013         }
1014
1015         // user defined functions
1016     }
1017
1018
1019
1020
1021     public class Xcls_ok_button : Object
1022     {
1023         public Gtk.Button el;
1024         private Clones  _this;
1025
1026
1027             // my vars (def)
1028
1029         // ctor
1030         public Xcls_ok_button(Clones _owner )
1031         {
1032             _this = _owner;
1033             _this.ok_button = this;
1034             this.el = new Gtk.Button();
1035
1036             // my vars (dec)
1037
1038             // set gobject values
1039             this.el.label = "Close";
1040         }
1041
1042         // user defined functions
1043     }
1044
1045 }