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