RepoStatusPopover.bjs
[gitlive] / RepoStatusPopover.vala
1 static RepoStatusPopover  _RepoStatusPopover;
2
3 public class RepoStatusPopover : Object
4 {
5     public Gtk.Popover el;
6     private RepoStatusPopover  _this;
7
8     public static RepoStatusPopover singleton()
9     {
10         if (_RepoStatusPopover == null) {
11             _RepoStatusPopover= new RepoStatusPopover();
12         }
13         return _RepoStatusPopover;
14     }
15     public Xcls_label_status label_status;
16     public Xcls_label_diff label_diff;
17     public Xcls_status_view status_view;
18     public Xcls_diff_view diff_view;
19
20         // my vars (def)
21     public GitRepo repo;
22
23     // ctor
24     public RepoStatusPopover()
25     {
26         _this = this;
27         this.el = new Gtk.Popover( null );
28
29         // my vars (dec)
30
31         // set gobject values
32         this.el.border_width = 0;
33         this.el.modal = true;
34         this.el.position = Gtk.PositionType.RIGHT;
35         var child_0 = new Xcls_Box2( _this );
36         child_0.ref();
37         this.el.add (  child_0.el  );
38     }
39
40     // user defined functions
41     public void show (Gtk.Widget btn, Gdk.Rectangle rect, GitRepo repo) {
42         _this.repo = repo;
43         // get the active project.
44          var lm = Gtk.SourceLanguageManager.get_default();
45                     
46     //    ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(
47       //      lm.get_language("html")
48      //   );
49       
50         //print (project.fn);
51         //project.runhtml = project.runhtml || '';
52         _this.diff_view.el.get_buffer().set_text(repo.git_diff);
53         _this.status_view.el.get_buffer().set_text(repo.git_status);
54            
55                 //console.log('show all');
56         this.el.set_modal(true);
57         this.el.set_relative_to(btn);
58         this.el.set_pointing_to(rect);
59       
60         //this.el.set_position(Gtk.PositionType.RIGHT);
61     
62         // window + header?
63          GLib.debug("SHOWALL - POPIP\n");
64         this.el.show_all();
65         //this.el.set_size_request(800,500);
66     //  this.diff_view.el.grab_focus();
67         
68         //this.el.show_all();
69     }
70     public class Xcls_Box2 : Object
71     {
72         public Gtk.Box el;
73         private RepoStatusPopover  _this;
74
75
76             // my vars (def)
77
78         // ctor
79         public Xcls_Box2(RepoStatusPopover _owner )
80         {
81             _this = _owner;
82             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
83
84             // my vars (dec)
85
86             // set gobject values
87             this.el.homogeneous = false;
88             this.el.border_width = 5;
89             var child_0 = new Xcls_Box3( _this );
90             child_0.ref();
91             this.el.pack_end (  child_0.el , false,false,0 );
92             var child_1 = new Xcls_Notebook12( _this );
93             child_1.ref();
94             this.el.pack_start (  child_1.el , true,true,0 );
95             var child_2 = new Xcls_Box21( _this );
96             child_2.ref();
97             this.el.pack_end (  child_2.el , false,false,0 );
98         }
99
100         // user defined functions
101     }
102     public class Xcls_Box3 : Object
103     {
104         public Gtk.Box el;
105         private RepoStatusPopover  _this;
106
107
108             // my vars (def)
109
110         // ctor
111         public Xcls_Box3(RepoStatusPopover _owner )
112         {
113             _this = _owner;
114             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
115
116             // my vars (dec)
117
118             // set gobject values
119             this.el.homogeneous = true;
120             this.el.expand = false;
121             this.el.vexpand = false;
122             var child_0 = new Xcls_Toolbar4( _this );
123             child_0.ref();
124             this.el.add (  child_0.el  );
125         }
126
127         // user defined functions
128     }
129     public class Xcls_Toolbar4 : Object
130     {
131         public Gtk.Toolbar el;
132         private RepoStatusPopover  _this;
133
134
135             // my vars (def)
136
137         // ctor
138         public Xcls_Toolbar4(RepoStatusPopover _owner )
139         {
140             _this = _owner;
141             this.el = new Gtk.Toolbar();
142
143             // my vars (dec)
144
145             // set gobject values
146             this.el.toolbar_style = Gtk.ToolbarStyle.BOTH_HORIZ;
147             var child_0 = new Xcls_ToolButton5( _this );
148             child_0.ref();
149             this.el.add (  child_0.el  );
150             var child_1 = new Xcls_ToolButton6( _this );
151             child_1.ref();
152             this.el.add (  child_1.el  );
153             var child_2 = new Xcls_ToolButton7( _this );
154             child_2.ref();
155             this.el.add (  child_2.el  );
156             var child_3 = new Xcls_ToolButton8( _this );
157             child_3.ref();
158             this.el.add (  child_3.el  );
159             var child_4 = new Xcls_ToolButton9( _this );
160             child_4.ref();
161             this.el.add (  child_4.el  );
162             var child_5 = new Xcls_ToolButton10( _this );
163             child_5.ref();
164             this.el.add (  child_5.el  );
165             var child_6 = new Xcls_ToolButton11( _this );
166             child_6.ref();
167             this.el.add (  child_6.el  );
168         }
169
170         // user defined functions
171     }
172     public class Xcls_ToolButton5 : Object
173     {
174         public Gtk.ToolButton el;
175         private RepoStatusPopover  _this;
176
177
178             // my vars (def)
179
180         // ctor
181         public Xcls_ToolButton5(RepoStatusPopover _owner )
182         {
183             _this = _owner;
184             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-undo", Gtk.IconSize.SMALL_TOOLBAR), null);;
185
186             // my vars (dec)
187
188             // set gobject values
189             this.el.label = "Stash Changes";
190             this.el.is_important = true;
191
192             //listeners
193             this.el.button_press_event.connect( () => {
194               
195                
196                GitMonitor.gitmonitor.stop();
197                _this.repo.git({ "stash" , "--all" });
198                _this.repo.loadStatus();
199                GitMonitor.gitmonitor.start();
200                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
201                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
202                 Clones.singleton().reposStore.load();
203               
204                _this.el.hide();
205                 return false;
206             });
207         }
208
209         // user defined functions
210     }
211
212     public class Xcls_ToolButton6 : Object
213     {
214         public Gtk.ToolButton el;
215         private RepoStatusPopover  _this;
216
217
218             // my vars (def)
219
220         // ctor
221         public Xcls_ToolButton6(RepoStatusPopover _owner )
222         {
223             _this = _owner;
224             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-save", Gtk.IconSize.SMALL_TOOLBAR), null);;
225
226             // my vars (dec)
227
228             // set gobject values
229             this.el.label = "Commit Changes";
230             this.el.is_important = true;
231
232             //listeners
233             this.el.button_press_event.connect( () => {
234                _this.repo.git({ "commit" , "-a" ,"-m", "Uncommited changes synced" });
235                _this.repo.push();
236                _this.repo.loadStatus();
237                
238                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
239                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
240                 
241                _this.el.hide();
242                Clones.singleton().reposStore.load();
243                
244                 return false;
245             });
246         }
247
248         // user defined functions
249     }
250
251     public class Xcls_ToolButton7 : Object
252     {
253         public Gtk.ToolButton el;
254         private RepoStatusPopover  _this;
255
256
257             // my vars (def)
258
259         // ctor
260         public Xcls_ToolButton7(RepoStatusPopover _owner )
261         {
262             _this = _owner;
263             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-add", Gtk.IconSize.SMALL_TOOLBAR), null);;
264
265             // my vars (dec)
266
267             // set gobject values
268             this.el.label = "Create Branch / Start ticket";
269             this.el.is_important = true;
270
271             //listeners
272             this.el.button_press_event.connect( () => {
273                var oldq = new Gee.ArrayList<GitMonitorQueue>();  
274             
275                 Clones.singleton().el.response(-1);
276                 NewBranch.singleton().show(_this.repo, oldq);
277             
278                 return false;
279             });
280         }
281
282         // user defined functions
283     }
284
285     public class Xcls_ToolButton8 : Object
286     {
287         public Gtk.ToolButton el;
288         private RepoStatusPopover  _this;
289
290
291             // my vars (def)
292
293         // ctor
294         public Xcls_ToolButton8(RepoStatusPopover _owner )
295         {
296             _this = _owner;
297             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-revert-to-saved", Gtk.IconSize.SMALL_TOOLBAR), null);;
298
299             // my vars (dec)
300
301             // set gobject values
302             this.el.label = "Reset / clear changes";
303             this.el.is_important = true;
304
305             //listeners
306             this.el.button_press_event.connect( () => {
307               
308                
309                GitMonitor.gitmonitor.stop();
310                _this.repo.git({ "reset" , "--hard" });
311                _this.repo.loadStatus();
312                GitMonitor.gitmonitor.start();
313                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
314                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
315                 Clones.singleton().reposStore.load();
316               
317                _this.el.hide();
318                 return false;
319             });
320         }
321
322         // user defined functions
323     }
324
325     public class Xcls_ToolButton9 : Object
326     {
327         public Gtk.ToolButton el;
328         private RepoStatusPopover  _this;
329
330
331             // my vars (def)
332
333         // ctor
334         public Xcls_ToolButton9(RepoStatusPopover _owner )
335         {
336             _this = _owner;
337             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-goto-bottom", Gtk.IconSize.SMALL_TOOLBAR), null);;
338
339             // my vars (dec)
340
341             // set gobject values
342             this.el.label = "Pull updates";
343             this.el.is_important = true;
344
345             //listeners
346             this.el.button_press_event.connect( () => {
347               
348                
349                GitMonitor.gitmonitor.stop();
350                _this.repo.git({ "pull" , "--all" });
351                _this.repo.loadStatus();
352                GitMonitor.gitmonitor.start();
353                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
354                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
355                 Clones.singleton().reposStore.load();
356               
357                _this.el.hide();
358                 return false;
359             });
360         }
361
362         // user defined functions
363     }
364
365     public class Xcls_ToolButton10 : Object
366     {
367         public Gtk.ToolButton el;
368         private RepoStatusPopover  _this;
369
370
371             // my vars (def)
372
373         // ctor
374         public Xcls_ToolButton10(RepoStatusPopover _owner )
375         {
376             _this = _owner;
377             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-goto-top", Gtk.IconSize.SMALL_TOOLBAR), null);;
378
379             // my vars (dec)
380
381             // set gobject values
382             this.el.label = "Merge branch/  ticket";
383             this.el.is_important = true;
384
385             //listeners
386             this.el.button_press_event.connect( () => {
387             
388                _this.el.hide();
389                Clones.singleton().el.response(-1);
390                if (_this.repo.activeTicket != null) {
391                    MergeBranch.singleton().show(_this.repo.activeTicket, null);   
392                }
393                 return false;
394             });
395         }
396
397         // user defined functions
398     }
399
400     public class Xcls_ToolButton11 : Object
401     {
402         public Gtk.ToolButton el;
403         private RepoStatusPopover  _this;
404
405
406             // my vars (def)
407
408         // ctor
409         public Xcls_ToolButton11(RepoStatusPopover _owner )
410         {
411             _this = _owner;
412             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-new", Gtk.IconSize.SMALL_TOOLBAR), null);;
413
414             // my vars (dec)
415
416             // set gobject values
417             this.el.label = "Create Ticket";
418             this.el.is_important = true;
419
420             //listeners
421             this.el.button_press_event.connect( () => {
422               
423             
424             
425                   Clones.singleton().el.response(-1);
426               
427                _this.el.hide();
428                Ticket.singleton().show( _this.repo);
429                
430                 return false;
431             });
432         }
433
434         // user defined functions
435     }
436
437
438
439     public class Xcls_Notebook12 : Object
440     {
441         public Gtk.Notebook el;
442         private RepoStatusPopover  _this;
443
444
445             // my vars (def)
446
447         // ctor
448         public Xcls_Notebook12(RepoStatusPopover _owner )
449         {
450             _this = _owner;
451             this.el = new Gtk.Notebook();
452
453             // my vars (dec)
454
455             // set gobject values
456             var child_0 = new Xcls_label_status( _this );
457             child_0.ref();
458             var child_1 = new Xcls_label_diff( _this );
459             child_1.ref();
460             var child_2 = new Xcls_Box15( _this );
461             child_2.ref();
462             this.el.append_page (  child_2.el , _this.label_status.el );
463             var child_3 = new Xcls_Box18( _this );
464             child_3.ref();
465             this.el.append_page (  child_3.el , _this.label_diff.el );
466         }
467
468         // user defined functions
469     }
470     public class Xcls_label_status : Object
471     {
472         public Gtk.Label el;
473         private RepoStatusPopover  _this;
474
475
476             // my vars (def)
477
478         // ctor
479         public Xcls_label_status(RepoStatusPopover _owner )
480         {
481             _this = _owner;
482             _this.label_status = this;
483             this.el = new Gtk.Label( "Status" );
484
485             // my vars (dec)
486
487             // set gobject values
488         }
489
490         // user defined functions
491     }
492
493     public class Xcls_label_diff : Object
494     {
495         public Gtk.Label el;
496         private RepoStatusPopover  _this;
497
498
499             // my vars (def)
500
501         // ctor
502         public Xcls_label_diff(RepoStatusPopover _owner )
503         {
504             _this = _owner;
505             _this.label_diff = this;
506             this.el = new Gtk.Label( "Diff" );
507
508             // my vars (dec)
509
510             // set gobject values
511         }
512
513         // user defined functions
514     }
515
516     public class Xcls_Box15 : Object
517     {
518         public Gtk.Box el;
519         private RepoStatusPopover  _this;
520
521
522             // my vars (def)
523
524         // ctor
525         public Xcls_Box15(RepoStatusPopover _owner )
526         {
527             _this = _owner;
528             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
529
530             // my vars (dec)
531
532             // set gobject values
533             this.el.homogeneous = false;
534             var child_0 = new Xcls_ScrolledWindow16( _this );
535             child_0.ref();
536             this.el.pack_start (  child_0.el , true,true,0 );
537         }
538
539         // user defined functions
540     }
541     public class Xcls_ScrolledWindow16 : Object
542     {
543         public Gtk.ScrolledWindow el;
544         private RepoStatusPopover  _this;
545
546
547             // my vars (def)
548
549         // ctor
550         public Xcls_ScrolledWindow16(RepoStatusPopover _owner )
551         {
552             _this = _owner;
553             this.el = new Gtk.ScrolledWindow( null, null );
554
555             // my vars (dec)
556
557             // set gobject values
558             var child_0 = new Xcls_status_view( _this );
559             child_0.ref();
560             this.el.add (  child_0.el  );
561         }
562
563         // user defined functions
564     }
565     public class Xcls_status_view : Object
566     {
567         public Gtk.SourceView el;
568         private RepoStatusPopover  _this;
569
570
571             // my vars (def)
572
573         // ctor
574         public Xcls_status_view(RepoStatusPopover _owner )
575         {
576             _this = _owner;
577             _this.status_view = this;
578             this.el = new Gtk.SourceView();
579
580             // my vars (dec)
581
582             // init method
583
584             var description =   Pango.FontDescription.from_string("monospace");
585                 description.set_size(9000);
586                 this.el.override_font(description);
587         }
588
589         // user defined functions
590     }
591
592
593
594     public class Xcls_Box18 : Object
595     {
596         public Gtk.Box el;
597         private RepoStatusPopover  _this;
598
599
600             // my vars (def)
601
602         // ctor
603         public Xcls_Box18(RepoStatusPopover _owner )
604         {
605             _this = _owner;
606             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
607
608             // my vars (dec)
609
610             // set gobject values
611             this.el.homogeneous = false;
612             var child_0 = new Xcls_ScrolledWindow19( _this );
613             child_0.ref();
614             this.el.pack_start (  child_0.el , true,true,0 );
615         }
616
617         // user defined functions
618     }
619     public class Xcls_ScrolledWindow19 : Object
620     {
621         public Gtk.ScrolledWindow el;
622         private RepoStatusPopover  _this;
623
624
625             // my vars (def)
626
627         // ctor
628         public Xcls_ScrolledWindow19(RepoStatusPopover _owner )
629         {
630             _this = _owner;
631             this.el = new Gtk.ScrolledWindow( null, null );
632
633             // my vars (dec)
634
635             // set gobject values
636             this.el.height_request = 400;
637             var child_0 = new Xcls_diff_view( _this );
638             child_0.ref();
639             this.el.add (  child_0.el  );
640         }
641
642         // user defined functions
643     }
644     public class Xcls_diff_view : Object
645     {
646         public Gtk.SourceView el;
647         private RepoStatusPopover  _this;
648
649
650             // my vars (def)
651
652         // ctor
653         public Xcls_diff_view(RepoStatusPopover _owner )
654         {
655             _this = _owner;
656             _this.diff_view = this;
657             this.el = new Gtk.SourceView();
658
659             // my vars (dec)
660
661             // init method
662
663             var description =   Pango.FontDescription.from_string("monospace");
664                 description.set_size(9000);
665                 this.el.override_font(description);
666         }
667
668         // user defined functions
669     }
670
671
672
673
674     public class Xcls_Box21 : Object
675     {
676         public Gtk.Box el;
677         private RepoStatusPopover  _this;
678
679
680             // my vars (def)
681
682         // ctor
683         public Xcls_Box21(RepoStatusPopover _owner )
684         {
685             _this = _owner;
686             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
687
688             // my vars (dec)
689
690             // set gobject values
691             this.el.homogeneous = true;
692             this.el.expand = false;
693             this.el.vexpand = false;
694             var child_0 = new Xcls_Toolbar22( _this );
695             child_0.ref();
696             this.el.add (  child_0.el  );
697         }
698
699         // user defined functions
700     }
701     public class Xcls_Toolbar22 : Object
702     {
703         public Gtk.Toolbar el;
704         private RepoStatusPopover  _this;
705
706
707             // my vars (def)
708
709         // ctor
710         public Xcls_Toolbar22(RepoStatusPopover _owner )
711         {
712             _this = _owner;
713             this.el = new Gtk.Toolbar();
714
715             // my vars (dec)
716
717             // set gobject values
718             this.el.toolbar_style = Gtk.ToolbarStyle.BOTH_HORIZ;
719             var child_0 = new Xcls_ToolButton23( _this );
720             child_0.ref();
721             this.el.add (  child_0.el  );
722             var child_1 = new Xcls_ToolButton24( _this );
723             child_1.ref();
724             this.el.add (  child_1.el  );
725             var child_2 = new Xcls_ToolButton25( _this );
726             child_2.ref();
727             this.el.add (  child_2.el  );
728             var child_3 = new Xcls_ToolButton26( _this );
729             child_3.ref();
730             this.el.add (  child_3.el  );
731             var child_4 = new Xcls_ToolButton27( _this );
732             child_4.ref();
733             this.el.add (  child_4.el  );
734             var child_5 = new Xcls_ToolButton28( _this );
735             child_5.ref();
736             this.el.add (  child_5.el  );
737             var child_6 = new Xcls_ToolButton29( _this );
738             child_6.ref();
739             this.el.add (  child_6.el  );
740         }
741
742         // user defined functions
743     }
744     public class Xcls_ToolButton23 : Object
745     {
746         public Gtk.ToolButton el;
747         private RepoStatusPopover  _this;
748
749
750             // my vars (def)
751
752         // ctor
753         public Xcls_ToolButton23(RepoStatusPopover _owner )
754         {
755             _this = _owner;
756             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-undo", Gtk.IconSize.SMALL_TOOLBAR), null);;
757
758             // my vars (dec)
759
760             // set gobject values
761             this.el.label = "Stash Changes";
762             this.el.is_important = true;
763
764             //listeners
765             this.el.button_press_event.connect( () => {
766               
767                
768                GitMonitor.gitmonitor.stop();
769                _this.repo.git({ "stash" , "--all" });
770                _this.repo.loadStatus();
771                GitMonitor.gitmonitor.start();
772                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
773                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
774                 Clones.singleton().reposStore.load();
775               
776                _this.el.hide();
777                 return false;
778             });
779         }
780
781         // user defined functions
782     }
783
784     public class Xcls_ToolButton24 : Object
785     {
786         public Gtk.ToolButton el;
787         private RepoStatusPopover  _this;
788
789
790             // my vars (def)
791
792         // ctor
793         public Xcls_ToolButton24(RepoStatusPopover _owner )
794         {
795             _this = _owner;
796             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-save", Gtk.IconSize.SMALL_TOOLBAR), null);;
797
798             // my vars (dec)
799
800             // set gobject values
801             this.el.label = "Commit Changes";
802             this.el.is_important = true;
803
804             //listeners
805             this.el.button_press_event.connect( () => {
806                _this.repo.git({ "commit" , "-a" ,"-m", "Uncommited changes synced" });
807                _this.repo.push();
808                _this.repo.loadStatus();
809                
810                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
811                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
812                 
813                _this.el.hide();
814                Clones.singleton().reposStore.load();
815                
816                 return false;
817             });
818         }
819
820         // user defined functions
821     }
822
823     public class Xcls_ToolButton25 : Object
824     {
825         public Gtk.ToolButton el;
826         private RepoStatusPopover  _this;
827
828
829             // my vars (def)
830
831         // ctor
832         public Xcls_ToolButton25(RepoStatusPopover _owner )
833         {
834             _this = _owner;
835             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-revert-to-saved", Gtk.IconSize.SMALL_TOOLBAR), null);;
836
837             // my vars (dec)
838
839             // set gobject values
840             this.el.label = "Reset / clear changes";
841             this.el.is_important = true;
842
843             //listeners
844             this.el.button_press_event.connect( () => {
845               
846                
847                GitMonitor.gitmonitor.stop();
848                _this.repo.git({ "reset" , "--hard" });
849                _this.repo.loadStatus();
850                GitMonitor.gitmonitor.start();
851                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
852                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
853                 Clones.singleton().reposStore.load();
854               
855                _this.el.hide();
856                 return false;
857             });
858         }
859
860         // user defined functions
861     }
862
863     public class Xcls_ToolButton26 : Object
864     {
865         public Gtk.ToolButton el;
866         private RepoStatusPopover  _this;
867
868
869             // my vars (def)
870
871         // ctor
872         public Xcls_ToolButton26(RepoStatusPopover _owner )
873         {
874             _this = _owner;
875             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-goto-bottom", Gtk.IconSize.SMALL_TOOLBAR), null);;
876
877             // my vars (dec)
878
879             // set gobject values
880             this.el.label = "Pull updates";
881             this.el.is_important = true;
882
883             //listeners
884             this.el.button_press_event.connect( () => {
885               
886                
887                GitMonitor.gitmonitor.stop();
888                _this.repo.git({ "pull" , "--all" });
889                _this.repo.loadStatus();
890                GitMonitor.gitmonitor.start();
891                 _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
892                 _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
893                 Clones.singleton().reposStore.load();
894               
895                _this.el.hide();
896                 return false;
897             });
898         }
899
900         // user defined functions
901     }
902
903     public class Xcls_ToolButton27 : Object
904     {
905         public Gtk.ToolButton el;
906         private RepoStatusPopover  _this;
907
908
909             // my vars (def)
910
911         // ctor
912         public Xcls_ToolButton27(RepoStatusPopover _owner )
913         {
914             _this = _owner;
915             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-add", Gtk.IconSize.SMALL_TOOLBAR), null);;
916
917             // my vars (dec)
918
919             // set gobject values
920             this.el.label = "Create Branch / Start ticket";
921             this.el.is_important = true;
922
923             //listeners
924             this.el.button_press_event.connect( () => {
925                var oldq = new Gee.ArrayList<GitMonitorQueue>();  
926             
927                 Clones.singleton().el.response(-1);
928                 NewBranch.singleton().show(_this.repo, oldq);
929             
930                 return false;
931             });
932         }
933
934         // user defined functions
935     }
936
937     public class Xcls_ToolButton28 : Object
938     {
939         public Gtk.ToolButton el;
940         private RepoStatusPopover  _this;
941
942
943             // my vars (def)
944
945         // ctor
946         public Xcls_ToolButton28(RepoStatusPopover _owner )
947         {
948             _this = _owner;
949             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-goto-top", Gtk.IconSize.SMALL_TOOLBAR), null);;
950
951             // my vars (dec)
952
953             // set gobject values
954             this.el.label = "Merge branch/  ticket";
955             this.el.is_important = true;
956
957             //listeners
958             this.el.button_press_event.connect( () => {
959             
960                _this.el.hide();
961                Clones.singleton().el.response(-1);
962                if (_this.repo.activeTicket != null) {
963                    MergeBranch.singleton().show(_this.repo.activeTicket, null);   
964                }
965                 return false;
966             });
967         }
968
969         // user defined functions
970     }
971
972     public class Xcls_ToolButton29 : Object
973     {
974         public Gtk.ToolButton el;
975         private RepoStatusPopover  _this;
976
977
978             // my vars (def)
979
980         // ctor
981         public Xcls_ToolButton29(RepoStatusPopover _owner )
982         {
983             _this = _owner;
984             this.el = new Gtk.ToolButton(new Gtk.Image.from_icon_name ("gtk-new", Gtk.IconSize.SMALL_TOOLBAR), null);;
985
986             // my vars (dec)
987
988             // set gobject values
989             this.el.label = "Create Ticket";
990             this.el.is_important = true;
991
992             //listeners
993             this.el.button_press_event.connect( () => {
994               
995             
996             
997                   Clones.singleton().el.response(-1);
998               
999                _this.el.hide();
1000                Ticket.singleton().show( _this.repo);
1001                
1002                 return false;
1003             });
1004         }
1005
1006         // user defined functions
1007     }
1008
1009
1010
1011
1012 }