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