Uncommited changes synced
[gitlive] / MergeBranch.vala
1 static MergeBranch  _MergeBranch;
2
3 public class MergeBranch : Object
4 {
5     public Gtk.Dialog el;
6     private MergeBranch  _this;
7
8     public static MergeBranch singleton()
9     {
10         if (_MergeBranch == null) {
11             _MergeBranch= new MergeBranch();
12         }
13         return _MergeBranch;
14     }
15     public Xcls_table table;
16     public Xcls_actionsel actionsel;
17     public Xcls_actioncellrenderer actioncellrenderer;
18     public Xcls_actionmodel actionmodel;
19     public Xcls_ticketsel ticketsel;
20     public Xcls_dbcellrenderer dbcellrenderer;
21     public Xcls_dbmodel dbmodel;
22     public Xcls_name name;
23     public Xcls_label_diff label_diff;
24     public Xcls_label_ticket label_ticket;
25     public Xcls_diff_view diff_view;
26     public Xcls_scrolled_window scrolled_window;
27     public Xcls_view view;
28     public Xcls_spinner spinner;
29
30         // my vars (def)
31     public GitRepo repo;
32     public RooTicket? ticket;
33     public bool running;
34
35     // ctor
36     public MergeBranch()
37     {
38         _this = this;
39         this.el = new Gtk.Dialog();
40
41         // my vars (dec)
42         this.ticket = null;
43         this.running = false;
44
45         // set gobject values
46         this.el.title = "Merge Branch";
47         this.el.default_height = 200;
48         this.el.default_width = 500;
49         this.el.deletable = true;
50         this.el.modal = true;
51         var child_0 = new Xcls_Box2( _this );
52         child_0.ref();
53         this.el.get_content_area().add (  child_0.el  );
54         var child_1 = new Xcls_Button24( _this );
55         child_1.ref();
56         this.el.add_action_widget (  child_1.el , 0 );
57         var child_2 = new Xcls_Button25( _this );
58         child_2.ref();
59         this.el.add_action_widget (  child_2.el , 1 );
60
61         //listeners
62         this.el.delete_event.connect( (self, event) => {
63             this.el.hide();
64             return true; 
65             //test  
66         });
67         this.el.response.connect( (self, response_id) =>  { 
68           
69                 GLib.debug("got %d", (int) response_id);
70                 if (response_id < 1) {
71                     _this.el.hide();    
72                     this.running = false; 
73                 GitMonitor.gitmonitor.start();
74                         return;
75                 }
76                  /*
77                 // have they selected a ticket..
78                 // make that the current active ticket?
79                 // we really need to store locally what ticket is being worked on..
80                 // in theory we could be working on multiple project and not merging..
81                 // -- each repo would have their active ticket (only one per repo)
82                 // -- so we could just store that in there
83                 // -- initial load can check the contents of the ticket files on first scan.
84                 var ticket_id = _this.ticketsel.selectedTicketId();
85                 
86             if (this.repo != null) {
87                 var bn = _this.name.el.get_text();
88                 if (ticket_id != "" ) {
89                                 this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);
90                         } else {
91                                 this.repo.createBranchNamed(bn);
92                         }
93             }
94                 */
95                 
96                 if (this.repo != null) {
97                         repo.doMerge(
98                                 _this.actionsel.selectedAction(), 
99                                 _this.ticketsel.selectedTicketId(),
100                                 _this.name.el.get_text()
101                         );
102                 
103                 } else {
104                         GitRepo.doMerges(
105                                 _this.actionsel.selectedAction(), 
106                                 _this.ticketsel.selectedTicketId(),
107                                 _this.name.el.get_text()
108                         );
109                 }
110                 this.running = false; 
111         
112                  
113                 _this.el.hide();        
114                 GitMonitor.gitmonitor.start();
115         
116                  
117         });
118     }
119
120     // user defined functions
121     public   void show (  RooTicket ticket, GitRepo? repo ) 
122     {
123          // this.el.set_gravity(Gdk.Gravity.NORTH);
124         if (this.running) {
125                 return;
126         }
127         GitMonitor.gitmonitor.stop();
128         
129         _this.el.show_all();
130         
131         _this.table.el.hide();
132         _this.scrolled_window.el.hide();
133         _this.spinner.el.show();
134         _this.spinner.el.start();       
135         this.el.set_keep_above(true);    
136         this.el.move((Gdk.Screen.width() / 2)- 250 ,0);
137                 GLib.debug("Loading tickets"); 
138      
139         
140         this.ticket = ticket;
141         this.repo = repo;
142         
143         
144         Timeout.add_seconds(1, () => {
145             _this.diff_view.el.get_buffer().set_text(repo.previewMerge());              
146                 // if we are not working on a ticket, then we should be able to pick one?
147                 _this.dbmodel.loadTickets();
148                 _this.actionmodel.loadActions();
149                 _this.view.loadTicket(ticket.id);
150                 _this.spinner.el.stop();
151                 _this.spinner.el.hide();        
152     
153                 this.table.el.show();
154                 return false;
155         });
156         
157         this.el.run();
158          
159     }
160     public class Xcls_Box2 : Object
161     {
162         public Gtk.Box el;
163         private MergeBranch  _this;
164
165
166             // my vars (def)
167
168         // ctor
169         public Xcls_Box2(MergeBranch _owner )
170         {
171             _this = _owner;
172             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
173
174             // my vars (dec)
175
176             // set gobject values
177             var child_0 = new Xcls_table( _this );
178             child_0.ref();
179             this.el.pack_start (  child_0.el , false,false,0 );
180             var child_1 = new Xcls_Notebook14( _this );
181             child_1.ref();
182             this.el.add (  child_1.el  );
183             var child_2 = new Xcls_spinner( _this );
184             child_2.ref();
185             this.el.add (  child_2.el  );
186         }
187
188         // user defined functions
189     }
190     public class Xcls_table : Object
191     {
192         public Gtk.Table el;
193         private MergeBranch  _this;
194
195
196             // my vars (def)
197
198         // ctor
199         public Xcls_table(MergeBranch _owner )
200         {
201             _this = _owner;
202             _this.table = this;
203             this.el = new Gtk.Table( 2, 2, false );
204
205             // my vars (dec)
206
207             // set gobject values
208             this.el.margin = 2;
209             this.el.column_spacing = 2;
210             this.el.vexpand = false;
211             var child_0 = new Xcls_Label4( _this );
212             child_0.ref();
213             this.el.attach_defaults (  child_0.el , 0,1,0,1 );
214             var child_1 = new Xcls_actionsel( _this );
215             child_1.ref();
216             this.el.attach_defaults (  child_1.el , 1,2,0,1 );
217             var child_2 = new Xcls_Label8( _this );
218             child_2.ref();
219             this.el.attach_defaults (  child_2.el , 0,1,1,2 );
220             var child_3 = new Xcls_ticketsel( _this );
221             child_3.ref();
222             this.el.attach_defaults (  child_3.el , 1,2,1,2 );
223             var child_4 = new Xcls_Label12( _this );
224             child_4.ref();
225             this.el.attach_defaults (  child_4.el , 0,1,2,3 );
226             var child_5 = new Xcls_name( _this );
227             child_5.ref();
228             this.el.attach_defaults (  child_5.el , 1,2,2,3 );
229         }
230
231         // user defined functions
232     }
233     public class Xcls_Label4 : Object
234     {
235         public Gtk.Label el;
236         private MergeBranch  _this;
237
238
239             // my vars (def)
240
241         // ctor
242         public Xcls_Label4(MergeBranch _owner )
243         {
244             _this = _owner;
245             this.el = new Gtk.Label( "Do what?" );
246
247             // my vars (dec)
248
249             // set gobject values
250             this.el.justify = Gtk.Justification.RIGHT;
251             this.el.xalign = 0.900000f;
252             this.el.visible = true;
253         }
254
255         // user defined functions
256     }
257
258     public class Xcls_actionsel : Object
259     {
260         public Gtk.ComboBox el;
261         private MergeBranch  _this;
262
263
264             // my vars (def)
265         public bool loading;
266
267         // ctor
268         public Xcls_actionsel(MergeBranch _owner )
269         {
270             _this = _owner;
271             _this.actionsel = this;
272             this.el = new Gtk.ComboBox();
273
274             // my vars (dec)
275             this.loading = false;
276
277             // set gobject values
278             var child_0 = new Xcls_actioncellrenderer( _this );
279             child_0.ref();
280             this.el.pack_start (  child_0.el , true );
281             var child_1 = new Xcls_actionmodel( _this );
282             child_1.ref();
283             this.el.set_model (  child_1.el  );
284
285             // init method
286
287             this.el.add_attribute(_this.actioncellrenderer.el , "markup", 1 );
288
289             //listeners
290             this.el.changed.connect( () => {
291                 if (this.loading) {
292                         return;
293                 }
294                 _this.name.updateText();
295                 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
296             });
297         }
298
299         // user defined functions
300         public string selectedAction () {
301                 Gtk.TreeIter iter;
302                 Value val1;
303          
304                 this.el.get_active_iter (out iter);
305                 _this.actionmodel.el.get_value (iter, 0, out val1);
306         
307                 return  (string) val1;
308         }
309     }
310     public class Xcls_actioncellrenderer : Object
311     {
312         public Gtk.CellRendererText el;
313         private MergeBranch  _this;
314
315
316             // my vars (def)
317
318         // ctor
319         public Xcls_actioncellrenderer(MergeBranch _owner )
320         {
321             _this = _owner;
322             _this.actioncellrenderer = this;
323             this.el = new Gtk.CellRendererText();
324
325             // my vars (dec)
326
327             // set gobject values
328         }
329
330         // user defined functions
331     }
332
333     public class Xcls_actionmodel : Object
334     {
335         public Gtk.ListStore el;
336         private MergeBranch  _this;
337
338
339             // my vars (def)
340
341         // ctor
342         public Xcls_actionmodel(MergeBranch _owner )
343         {
344             _this = _owner;
345             _this.actionmodel = this;
346             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
347
348             // my vars (dec)
349
350             // set gobject values
351         }
352
353         // user defined functions
354         public void loadActions () {
355         
356          
357             
358             _this.actionsel.loading = true;
359         
360             this.el.clear();                                    
361             Gtk.TreeIter iter;
362             var el = this.el;
363             
364             el.append(out iter);
365         
366             
367             el.set_value(iter, 0, "");
368             el.set_value(iter, 1, "-- select action  --");
369             
370             _this.actionsel.el.set_active_iter(iter);
371         
372             el.append(out iter);    
373             el.set_value(iter, 0, "CLOSE");
374             el.set_value(iter, 1, "Merge changes to master - and CLOSE ticket");
375                 
376                 
377             el.append(out iter);    
378             el.set_value(iter, 0, "LEAVE");
379             el.set_value(iter, 1, "Merge changes to master - and LEAVE ticket open");
380         
381             el.append(out iter);    
382             el.set_value(iter, 0, "MASTER");
383             el.set_value(iter, 1, "Merge changes FROM master into this branch");    
384             
385             el.append(out iter);    
386             el.set_value(iter, 0, "EXIT");
387             el.set_value(iter, 1, "Switch back to MASTER branch - no merge");    
388             
389             
390             
391             _this.actionsel.loading = false;
392              //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
393                                              
394         }
395     }
396
397
398     public class Xcls_Label8 : Object
399     {
400         public Gtk.Label el;
401         private MergeBranch  _this;
402
403
404             // my vars (def)
405
406         // ctor
407         public Xcls_Label8(MergeBranch _owner )
408         {
409             _this = _owner;
410             this.el = new Gtk.Label( "Select Ticket" );
411
412             // my vars (dec)
413
414             // set gobject values
415             this.el.justify = Gtk.Justification.RIGHT;
416             this.el.xalign = 0.900000f;
417             this.el.visible = true;
418         }
419
420         // user defined functions
421     }
422
423     public class Xcls_ticketsel : Object
424     {
425         public Gtk.ComboBox el;
426         private MergeBranch  _this;
427
428
429             // my vars (def)
430         public bool loading;
431
432         // ctor
433         public Xcls_ticketsel(MergeBranch _owner )
434         {
435             _this = _owner;
436             _this.ticketsel = this;
437             this.el = new Gtk.ComboBox();
438
439             // my vars (dec)
440             this.loading = true;
441
442             // set gobject values
443             var child_0 = new Xcls_dbcellrenderer( _this );
444             child_0.ref();
445             this.el.pack_start (  child_0.el , true );
446             var child_1 = new Xcls_dbmodel( _this );
447             child_1.ref();
448             this.el.set_model (  child_1.el  );
449
450             // init method
451
452             this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
453
454             //listeners
455             this.el.changed.connect( () => {
456                 if (this.loading) {
457                         return;
458                 }
459                 _this.view.loadTicket(this.selectedTicketId());
460                  
461                 _this.name.updateText();
462                 //_this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
463                 
464                 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
465             });
466         }
467
468         // user defined functions
469         public string selectedTicketId () {
470         Gtk.TreeIter iter;
471                 Value val1;
472          
473          
474                 this.el.get_active_iter (out iter);
475                 _this.dbmodel.el.get_value (iter, 0, out val1);
476          
477         
478                 return  (string) val1;
479                 
480                 
481                 
482                 
483         }
484     }
485     public class Xcls_dbcellrenderer : Object
486     {
487         public Gtk.CellRendererText el;
488         private MergeBranch  _this;
489
490
491             // my vars (def)
492
493         // ctor
494         public Xcls_dbcellrenderer(MergeBranch _owner )
495         {
496             _this = _owner;
497             _this.dbcellrenderer = this;
498             this.el = new Gtk.CellRendererText();
499
500             // my vars (dec)
501
502             // set gobject values
503         }
504
505         // user defined functions
506     }
507
508     public class Xcls_dbmodel : Object
509     {
510         public Gtk.ListStore el;
511         private MergeBranch  _this;
512
513
514             // my vars (def)
515
516         // ctor
517         public Xcls_dbmodel(MergeBranch _owner )
518         {
519             _this = _owner;
520             _this.dbmodel = this;
521             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
522
523             // my vars (dec)
524
525             // set gobject values
526         }
527
528         // user defined functions
529         public void loadTickets () {
530         
531             RooTicket.singleton().loadTickets("",RooTicket.Who.ME, RooTicket.Status.ACTIVE);
532             
533             _this.ticketsel.loading = true;
534         
535             this.el.clear();                                    
536             Gtk.TreeIter iter;
537             var el = this.el;
538             
539             el.append(out iter);
540             el.set_value(iter, 0, "");
541             el.set_value(iter, 1, "-- select a ticket --");
542             
543             _this.ticketsel.el.set_active_iter(iter);
544             
545             if (_this.ticket != null &&  _this.ticket.id == "-1") {
546                         el.append(out iter);
547                         el.set_value(iter, 0, "-1");
548                         el.set_value(iter, 1, "Temporary Branch - No ticket specified/relivant");
549                 _this.ticketsel.el.set_active_iter(iter);       
550             }
551             
552             
553             
554             
555             var tickets = RooTicket.singleton().tickets;
556             foreach(var ticket in tickets) {
557             
558                 el.append(out iter);
559         
560                 el.set_value(iter, 0, ticket.id);
561                 el.set_value(iter, 1, "#%s [%s] %s".printf( ticket.id, ticket.project_id_name , ticket.summary));
562                         if (_this.ticket != null && _this.ticket.id == ticket.id) {
563                             _this.ticketsel.el.set_active_iter(iter);
564                     }
565                 
566             }
567             
568             _this.ticketsel.loading = false;
569              //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
570                                              
571         }
572     }
573
574
575     public class Xcls_Label12 : Object
576     {
577         public Gtk.Label el;
578         private MergeBranch  _this;
579
580
581             // my vars (def)
582
583         // ctor
584         public Xcls_Label12(MergeBranch _owner )
585         {
586             _this = _owner;
587             this.el = new Gtk.Label( "Use this commit message" );
588
589             // my vars (dec)
590
591             // set gobject values
592             this.el.justify = Gtk.Justification.RIGHT;
593             this.el.xalign = 0.900000f;
594         }
595
596         // user defined functions
597     }
598
599     public class Xcls_name : Object
600     {
601         public Gtk.Entry el;
602         private MergeBranch  _this;
603
604
605             // my vars (def)
606
607         // ctor
608         public Xcls_name(MergeBranch _owner )
609         {
610             _this = _owner;
611             _this.name = this;
612             this.el = new Gtk.Entry();
613
614             // my vars (dec)
615
616             // set gobject values
617             this.el.visible = true;
618         }
619
620         // user defined functions
621         public void updateText () {
622                 var ticket_id = _this.ticketsel.selectedTicketId();
623                 
624                 RooTicket ticket = null;
625                 if (ticket_id.length > 0){
626                         ticket = RooTicket.singleton().getById(ticket_id);
627                 }
628                 
629                 var name = RooTicket.singleton().usernameLocal();
630                 var action = _this.actionsel.selectedAction();
631                 this.el.set_editable(true); 
632                 switch (action) {
633                         case "CLOSE": // merge changes and close..
634                                 this.el.set_text("Fix #%s - %s".printf(ticket_id, ticket != null ? ticket.summary : ""));
635                                 break;
636                         case "LEAVE": // partial fix    
637                                 this.el.set_text("Partial Fix #%s - %s".printf(ticket_id,   ticket != null ? ticket.summary : ""));
638                                 break;
639                         case "MASTER": // merge master
640                         case "EXIT": // just switch back...             
641                                 this.el.set_editable(false);
642                                 this.el.set_text(""); // not relivant..                         
643                                 break;
644                         default:
645                         
646                                 break; /// don't fix the text value.
647                 }
648            
649         }
650     }
651
652
653     public class Xcls_Notebook14 : Object
654     {
655         public Gtk.Notebook el;
656         private MergeBranch  _this;
657
658
659             // my vars (def)
660
661         // ctor
662         public Xcls_Notebook14(MergeBranch _owner )
663         {
664             _this = _owner;
665             this.el = new Gtk.Notebook();
666
667             // my vars (dec)
668
669             // set gobject values
670             this.el.vexpand = true;
671             var child_0 = new Xcls_label_diff( _this );
672             child_0.ref();
673             var child_1 = new Xcls_label_ticket( _this );
674             child_1.ref();
675             var child_2 = new Xcls_Box17( _this );
676             child_2.ref();
677             this.el.append_page (  child_2.el , _this.label_diff.el );
678             var child_3 = new Xcls_Box20( _this );
679             child_3.ref();
680             this.el.append_page (  child_3.el , _this.label_ticket.el );
681         }
682
683         // user defined functions
684     }
685     public class Xcls_label_diff : Object
686     {
687         public Gtk.Label el;
688         private MergeBranch  _this;
689
690
691             // my vars (def)
692
693         // ctor
694         public Xcls_label_diff(MergeBranch _owner )
695         {
696             _this = _owner;
697             _this.label_diff = this;
698             this.el = new Gtk.Label( "Projected Commit Diff" );
699
700             // my vars (dec)
701
702             // set gobject values
703         }
704
705         // user defined functions
706     }
707
708     public class Xcls_label_ticket : Object
709     {
710         public Gtk.Label el;
711         private MergeBranch  _this;
712
713
714             // my vars (def)
715
716         // ctor
717         public Xcls_label_ticket(MergeBranch _owner )
718         {
719             _this = _owner;
720             _this.label_ticket = this;
721             this.el = new Gtk.Label( "Ticket Details" );
722
723             // my vars (dec)
724
725             // set gobject values
726         }
727
728         // user defined functions
729     }
730
731     public class Xcls_Box17 : Object
732     {
733         public Gtk.Box el;
734         private MergeBranch  _this;
735
736
737             // my vars (def)
738
739         // ctor
740         public Xcls_Box17(MergeBranch _owner )
741         {
742             _this = _owner;
743             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
744
745             // my vars (dec)
746
747             // set gobject values
748             this.el.homogeneous = false;
749             var child_0 = new Xcls_ScrolledWindow18( _this );
750             child_0.ref();
751             this.el.pack_start (  child_0.el , true,true,0 );
752         }
753
754         // user defined functions
755     }
756     public class Xcls_ScrolledWindow18 : Object
757     {
758         public Gtk.ScrolledWindow el;
759         private MergeBranch  _this;
760
761
762             // my vars (def)
763
764         // ctor
765         public Xcls_ScrolledWindow18(MergeBranch _owner )
766         {
767             _this = _owner;
768             this.el = new Gtk.ScrolledWindow( null, null );
769
770             // my vars (dec)
771
772             // set gobject values
773             this.el.height_request = 400;
774             var child_0 = new Xcls_diff_view( _this );
775             child_0.ref();
776             this.el.add (  child_0.el  );
777         }
778
779         // user defined functions
780     }
781     public class Xcls_diff_view : Object
782     {
783         public Gtk.SourceView el;
784         private MergeBranch  _this;
785
786
787             // my vars (def)
788
789         // ctor
790         public Xcls_diff_view(MergeBranch _owner )
791         {
792             _this = _owner;
793             _this.diff_view = this;
794             this.el = new Gtk.SourceView();
795
796             // my vars (dec)
797
798             // init method
799
800             var description =   Pango.FontDescription.from_string("monospace");
801                 description.set_size(9000);
802                 this.el.override_font(description);
803         }
804
805         // user defined functions
806     }
807
808
809
810     public class Xcls_Box20 : Object
811     {
812         public Gtk.Box el;
813         private MergeBranch  _this;
814
815
816             // my vars (def)
817
818         // ctor
819         public Xcls_Box20(MergeBranch _owner )
820         {
821             _this = _owner;
822             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
823
824             // my vars (dec)
825
826             // set gobject values
827             this.el.homogeneous = false;
828             var child_0 = new Xcls_scrolled_window( _this );
829             child_0.ref();
830             this.el.add (  child_0.el  );
831         }
832
833         // user defined functions
834     }
835     public class Xcls_scrolled_window : Object
836     {
837         public Gtk.ScrolledWindow el;
838         private MergeBranch  _this;
839
840
841             // my vars (def)
842
843         // ctor
844         public Xcls_scrolled_window(MergeBranch _owner )
845         {
846             _this = _owner;
847             _this.scrolled_window = this;
848             this.el = new Gtk.ScrolledWindow( null, null );
849
850             // my vars (dec)
851
852             // set gobject values
853             this.el.height_request = 500;
854             this.el.vexpand = true;
855             var child_0 = new Xcls_view( _this );
856             child_0.ref();
857             this.el.add (  child_0.el  );
858
859             // init method
860
861             {
862                 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
863             }
864         }
865
866         // user defined functions
867     }
868     public class Xcls_view : Object
869     {
870         public WebKit.WebView el;
871         private MergeBranch  _this;
872
873
874             // my vars (def)
875
876         // ctor
877         public Xcls_view(MergeBranch _owner )
878         {
879             _this = _owner;
880             _this.view = this;
881             this.el = new WebKit.WebView();
882
883             // my vars (dec)
884
885             // set gobject values
886         }
887
888         // user defined functions
889         public void loadTicket (string tid) {
890                 int h,w;
891                 _this.el.get_size(out w, out h);
892                 
893                 if (tid == "") {
894                         _this.scrolled_window.el.hide();
895                         _this.el.resize(w, 150);
896                 } else {
897                         _this.scrolled_window.el.show();
898                         _this.el.resize(w, 800);
899                 }
900                 
901                 var rs =  RooTicket.singleton();                
902                 var uri = new WebKit.URIRequest("https://roojs.com/admin.php/MTrack/View/" + tid);
903                 var hd = uri.get_http_headers();
904                 var authCode = Base64.encode ("%s:%s".printf(rs.username, rs.password).data);
905                 hd.append("Authorization", "Basic %s".printf(authCode));
906                 
907                  this.el.load_request(uri);
908         }
909     }
910
911
912
913
914     public class Xcls_spinner : Object
915     {
916         public Gtk.Spinner el;
917         private MergeBranch  _this;
918
919
920             // my vars (def)
921
922         // ctor
923         public Xcls_spinner(MergeBranch _owner )
924         {
925             _this = _owner;
926             _this.spinner = this;
927             this.el = new Gtk.Spinner();
928
929             // my vars (dec)
930
931             // set gobject values
932             this.el.hexpand = true;
933             this.el.vexpand = true;
934         }
935
936         // user defined functions
937     }
938
939
940     public class Xcls_Button24 : Object
941     {
942         public Gtk.Button el;
943         private MergeBranch  _this;
944
945
946             // my vars (def)
947
948         // ctor
949         public Xcls_Button24(MergeBranch _owner )
950         {
951             _this = _owner;
952             this.el = new Gtk.Button();
953
954             // my vars (dec)
955
956             // set gobject values
957             this.el.relief = Gtk.ReliefStyle.NONE;
958             this.el.label = "Cancel";
959         }
960
961         // user defined functions
962     }
963
964     public class Xcls_Button25 : Object
965     {
966         public Gtk.Button el;
967         private MergeBranch  _this;
968
969
970             // my vars (def)
971
972         // ctor
973         public Xcls_Button25(MergeBranch _owner )
974         {
975             _this = _owner;
976             this.el = new Gtk.Button();
977
978             // my vars (dec)
979
980             // set gobject values
981             this.el.label = "Do Merge";
982
983             // init method
984
985             {
986                this.el.get_style_context().add_class("suggested-action");
987             }
988         }
989
990         // user defined functions
991     }
992
993 }