Clones.bjs
[gitlive] / Clones.vala
1 static Clones  _Clones;
2
3 public class Clones : Object
4 {
5     public Gtk.Dialog el;
6     private Clones  _this;
7
8     public static Clones singleton()
9     {
10         if (_Clones == null) {
11             _Clones= new Clones();
12         }
13         return _Clones;
14     }
15     public Xcls_reposView reposView;
16     public Xcls_reposStore reposStore;
17     public Xcls_tv_autocommit tv_autocommit;
18     public Xcls_cr_autocommit cr_autocommit;
19     public Xcls_tv_autopush tv_autopush;
20     public Xcls_cr_autopush cr_autopush;
21     public Xcls_tv_autobranch tv_autobranch;
22     public Xcls_cr_autobranch cr_autobranch;
23     public Xcls_tv_repo tv_repo;
24     public Xcls_cr_repo cr_repo;
25     public Xcls_tv_active_ticket tv_active_ticket;
26     public Xcls_cr_active_ticket cr_active_ticket;
27     public Xcls_tv_current_branch tv_current_branch;
28     public Xcls_cr_current_branch cr_current_branch;
29     public Xcls_tv_last_updated tv_last_updated;
30     public Xcls_cr_last_updated cr_last_updated;
31     public Xcls_tv_all_branches tv_all_branches;
32     public Xcls_cr_all_branches cr_all_branches;
33
34         // my vars (def)
35
36     // ctor
37     public Clones()
38     {
39         _this = this;
40         this.el = new Gtk.Dialog();
41
42         // my vars (dec)
43
44         // set gobject values
45         this.el.title = "Manage Clones";
46         this.el.border_width = 3;
47         this.el.default_height = 500;
48         this.el.default_width = 1024;
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
55         //listeners
56         this.el.delete_event.connect( (self, event) => {
57             this.el.hide();
58             return true; 
59             //test  
60         });
61         this.el.response.connect( (self, response_id) =>  { 
62          
63                 this.el.hide();
64           
65         });
66     }
67
68     // user defined functions
69     public void show ()    {
70     
71         
72         this.el.set_deletable(true);
73         this.el.set_gravity(Gdk.Gravity.NORTH);
74         this.el.move((Gdk.Screen.width() / 2 ) -400 ,0);
75         
76         this.el.set_default_size(
77                         int.min(1024,Gdk.Screen.width()),
78                         int.max(500,Gdk.Screen.width() - 300)
79         );
80         
81         this.el.show_all();
82         _this.reposStore.load();
83         this.el.set_keep_above(true);
84         this.el.run();
85         // load clones..
86     //     this.get('/reposStore').load();
87         
88         //this.get('/ok_button').el.set_sensitive(false);
89         
90         // block until we return.
91     //    var run_ret = this.el.run();
92     //    if (run_ret < 1 ) {
93     //        return  "DONE";
94     //    }
95     //    print("RUN RETURN : " + run_ret);
96     //    return "DONE";
97         //print(JSON.stringify(this.get('bug').getValue()));
98        // return this.get('bug').getValue();
99         //this.success = c.success;
100     }
101     public class Xcls_Box2 : Object
102     {
103         public Gtk.Box el;
104         private Clones  _this;
105
106
107             // my vars (def)
108
109         // ctor
110         public Xcls_Box2(Clones _owner )
111         {
112             _this = _owner;
113             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
114
115             // my vars (dec)
116
117             // set gobject values
118             var child_0 = new Xcls_Box3( _this );
119             child_0.ref();
120             this.el.pack_start (  child_0.el , false,false,0 );
121             var child_1 = new Xcls_ScrolledWindow9( _this );
122             child_1.ref();
123             this.el.pack_end (  child_1.el , true,true,0 );
124         }
125
126         // user defined functions
127     }
128     public class Xcls_Box3 : Object
129     {
130         public Gtk.Box el;
131         private Clones  _this;
132
133
134             // my vars (def)
135
136         // ctor
137         public Xcls_Box3(Clones _owner )
138         {
139             _this = _owner;
140             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
141
142             // my vars (dec)
143
144             // set gobject values
145             this.el.homogeneous = true;
146             var child_0 = new Xcls_Button4( _this );
147             child_0.ref();
148             this.el.add (  child_0.el  );
149             var child_1 = new Xcls_Button5( _this );
150             child_1.ref();
151             this.el.add (  child_1.el  );
152             var child_2 = new Xcls_Button6( _this );
153             child_2.ref();
154             this.el.add (  child_2.el  );
155             var child_3 = new Xcls_Button7( _this );
156             child_3.ref();
157             this.el.add (  child_3.el  );
158             var child_4 = new Xcls_Button8( _this );
159             child_4.ref();
160             this.el.add (  child_4.el  );
161         }
162
163         // user defined functions
164     }
165     public class Xcls_Button4 : Object
166     {
167         public Gtk.Button el;
168         private Clones  _this;
169
170
171             // my vars (def)
172
173         // ctor
174         public Xcls_Button4(Clones _owner )
175         {
176             _this = _owner;
177             this.el = new Gtk.Button();
178
179             // my vars (dec)
180
181             // set gobject values
182             this.el.label = "Add Repository";
183
184             //listeners
185             this.el.clicked.connect( () => {
186             
187             /*    var rv = this.get('/reposView');
188                 var rs = this.get('/reposStore');
189                 if (rv.el.get_selection().count_selected_rows() != 1) {
190                     //nothing?
191                     // error condition.
192                     return;
193                 }
194                 var Remotes =     imports.Remotes.Remotes;
195                 
196              
197                 var ret = {};       
198                 var s = rv.el.get_selection();
199                 var path = '';
200                 s.selected_foreach(function(model,p,iter) {
201                                                                 
202                    path = model.get_value(iter, 6).value.get_string();
203                  
204                 }); 
205             
206                 var repo = false;
207                 rs.repos.forEach(function(r) {
208                     if (r.repopath == path) {
209                         repo = r;
210                     
211                     }
212                 
213                 });
214                 Remotes.repo = repo;
215                 Remotes.el.set_transient_for(Clones.el);
216                 Clones.el.set_title("Manage Clones - " + repo.repopath);
217                 Remotes.show();
218                 Clones.el.set_title("Manage Clones");
219             
220               */   
221                 
222                  
223             
224                    
225                 
226                 
227             });
228         }
229
230         // user defined functions
231     }
232
233     public class Xcls_Button5 : Object
234     {
235         public Gtk.Button el;
236         private Clones  _this;
237
238
239             // my vars (def)
240
241         // ctor
242         public Xcls_Button5(Clones _owner )
243         {
244             _this = _owner;
245             this.el = new Gtk.Button();
246
247             // my vars (dec)
248
249             // set gobject values
250             this.el.label = "Branches";
251             this.el.visible = false;
252
253             //listeners
254             this.el.clicked.connect( () => {
255             // 
256             
257                 //NewBranch.singleton().show();
258             
259             /*
260                 var rv = this.get('/reposView');
261                 var rs = this.get('/reposStore');
262                 if (rv.el.get_selection().count_selected_rows() != 1) {
263                     //nothing?
264                     // error condition.
265                     return;
266                 }
267                 var Branches =     imports.Branches.Branches;
268                 
269              
270                 var ret = {};       
271                 var s = rv.el.get_selection();
272                 var path = '';
273                 s.selected_foreach(function(model,p,iter) {
274                                                                 
275                    path = model.get_value(iter, 6).value.get_string();
276                  
277                 }); 
278             
279                 var repo = false;
280                 rs.repos.forEach(function(r) {
281                     if (r.repopath == path) {
282                         repo = r;
283                     
284                     }
285                 
286                 });
287                 Branches.repo = repo;
288                 Branches.el.set_transient_for(Clones.el);
289                 Clones.el.set_title("Manage Clones - " + repo.repopath);
290                 Branches.show();
291                 Clones.el.set_title("Manage Clones");
292             
293                  
294                 
295                 
296                 
297             
298                    
299              */   
300                 
301             });
302         }
303
304         // user defined functions
305     }
306
307     public class Xcls_Button6 : Object
308     {
309         public Gtk.Button el;
310         private Clones  _this;
311
312
313             // my vars (def)
314
315         // ctor
316         public Xcls_Button6(Clones _owner )
317         {
318             _this = _owner;
319             this.el = new Gtk.Button();
320
321             // my vars (dec)
322
323             // set gobject values
324             this.el.label = "Merge";
325
326             //listeners
327             this.el.clicked.connect( () =>  {
328             
329                 var rv = _this.reposView;
330                 var rs = _this.reposStore;
331                 var s =rv.el.get_selection();
332                 if (s.count_selected_rows() != 1) {
333                         return;
334                 }
335                 Gtk.TreeIter iter;
336                 Gtk.TreeModel tm;
337                 s.get_selected(out tm, out iter);
338                 GLib.Value val;
339                 tm.get_value(iter, 6, out val);
340                 var git_working_dir = (string)val;
341                 
342                 var repo = GitRepo.singleton().get(git_working_dir);
343                 
344                 // if you hit merge.... in master..
345                 // ignore..
346                 if (repo.currentBranch.name == "master") {
347                         return;
348                 }
349                 MergeBranch.singleton().show(repo.activeTicket, repo);
350                 _this.reposStore.load();
351                 
352              
353                 
354             });
355         }
356
357         // user defined functions
358     }
359
360     public class Xcls_Button7 : Object
361     {
362         public Gtk.Button el;
363         private Clones  _this;
364
365
366             // my vars (def)
367
368         // ctor
369         public Xcls_Button7(Clones _owner )
370         {
371             _this = _owner;
372             this.el = new Gtk.Button();
373
374             // my vars (dec)
375
376             // set gobject values
377             this.el.label = "Switch Branch";
378             this.el.visible = false;
379
380             //listeners
381             this.el.clicked.connect( () => {
382                 
383                 
384              
385                    
386                 
387                 
388             });
389         }
390
391         // user defined functions
392     }
393
394     public class Xcls_Button8 : Object
395     {
396         public Gtk.Button el;
397         private Clones  _this;
398
399
400             // my vars (def)
401
402         // ctor
403         public Xcls_Button8(Clones _owner )
404         {
405             _this = _owner;
406             this.el = new Gtk.Button();
407
408             // my vars (dec)
409
410             // set gobject values
411             this.el.label = "Pull";
412
413             //listeners
414             this.el.clicked.connect( () => {
415                 
416                 
417              
418                    
419                 
420                 
421             });
422         }
423
424         // user defined functions
425     }
426
427
428     public class Xcls_ScrolledWindow9 : Object
429     {
430         public Gtk.ScrolledWindow el;
431         private Clones  _this;
432
433
434             // my vars (def)
435
436         // ctor
437         public Xcls_ScrolledWindow9(Clones _owner )
438         {
439             _this = _owner;
440             this.el = new Gtk.ScrolledWindow( null, null );
441
442             // my vars (dec)
443
444             // set gobject values
445             this.el.expand = true;
446             this.el.hexpand = true;
447             this.el.shadow_type = Gtk.ShadowType.IN;
448             var child_0 = new Xcls_reposView( _this );
449             child_0.ref();
450             this.el.add (  child_0.el  );
451
452             // init method
453
454             {
455               
456                this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
457             }
458         }
459
460         // user defined functions
461     }
462     public class Xcls_reposView : Object
463     {
464         public Gtk.TreeView el;
465         private Clones  _this;
466
467
468             // my vars (def)
469
470         // ctor
471         public Xcls_reposView(Clones _owner )
472         {
473             _this = _owner;
474             _this.reposView = this;
475             this.el = new Gtk.TreeView();
476
477             // my vars (dec)
478
479             // set gobject values
480             this.el.search_column = 0;
481             this.el.enable_grid_lines = Gtk.TreeViewGridLines.HORIZONTAL;
482             var child_0 = new Xcls_reposStore( _this );
483             child_0.ref();
484             this.el.set_model (  child_0.el  );
485             var child_1 = new Xcls_tv_autocommit( _this );
486             child_1.ref();
487             this.el.append_column (  child_1.el  );
488             var child_2 = new Xcls_tv_autopush( _this );
489             child_2.ref();
490             this.el.append_column (  child_2.el  );
491             var child_3 = new Xcls_tv_autobranch( _this );
492             child_3.ref();
493             this.el.append_column (  child_3.el  );
494             var child_4 = new Xcls_tv_repo( _this );
495             child_4.ref();
496             this.el.append_column (  child_4.el  );
497             var child_5 = new Xcls_tv_active_ticket( _this );
498             child_5.ref();
499             this.el.append_column (  child_5.el  );
500             var child_6 = new Xcls_tv_current_branch( _this );
501             child_6.ref();
502             this.el.append_column (  child_6.el  );
503             var child_7 = new Xcls_tv_last_updated( _this );
504             child_7.ref();
505             this.el.append_column (  child_7.el  );
506             var child_8 = new Xcls_tv_all_branches( _this );
507             child_8.ref();
508             this.el.append_column (  child_8.el  );
509
510             // init method
511
512             {
513                 var selection = this.el.get_selection();
514                 selection.set_mode( Gtk.SelectionMode.SINGLE);
515             
516             
517                 var description = new Pango.FontDescription();
518                 description.set_size(10000);
519                 this.el.override_font(description);
520              
521             }
522
523             //listeners
524             this.el.row_activated.connect( (path, col)  =>  {
525             
526                 if (col.title != "Active Ticket") {
527                         return;
528                 }
529                 
530                 //
531                 
532                 Gtk.TreeIter iter;
533                 _this.reposStore.el.get_iter(out iter, path);
534                 GLib.Value val;
535                 tm.get_value(iter, 6, out val);
536                 var git_working_dir = (string)val;
537                 
538                 var repo = GitRepo.singleton().get(git_working_dir);
539                 
540                 Gdk.Rectangle rect;
541                 _this.reposView.el.get_cell_area(path, col, out rect);
542                 Xcls_RepoStatusPopover.singleton().show(widget, rect, repos);
543                 
544                  
545                 
546             });
547             this.el.cursor_changed.connect( ()  => {
548               // SEE SELECTION.CHANGED
549               /*
550               
551               return;
552               
553                 if (this.el.get_selection().count_selected_rows() < 1) {
554                     //nothing? - clea it?
555                     return;
556                 }
557                     var ret = {};         
558                 var model = this.get('/changedFilesStore');
559             
560                  var s = this.el.get_selection();
561                  var files = [];
562                 s.selected_foreach(function(model,p,iter) {
563                 
564                    files.push( model.get_value(iter, 0).value.get_string());
565                  
566                 });
567                 this.get('/patchview').showDiff(files); 
568                 //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();
569                  //print("OUT?" + value);// id..
570                 // load the list in the right grid..
571                  
572                 return true;
573             */
574             });
575         }
576
577         // user defined functions
578     }
579     public class Xcls_reposStore : Object
580     {
581         public Gtk.ListStore el;
582         private Clones  _this;
583
584
585             // my vars (def)
586
587         // ctor
588         public Xcls_reposStore(Clones _owner )
589         {
590             _this = _owner;
591             _this.reposStore = this;
592             this.el = new Gtk.ListStore( 10,      typeof(string),  // 0 repo
593      typeof(string),  // 1 current branch
594      typeof(string),  // 2 all branch
595      typeof(string),  // 3 updated
596      typeof(bool),   // 4 auto commit
597      typeof(bool),   // 5 auto push
598      typeof(string),   // 6 repopath
599       typeof(string),   // 7 color highlighting?
600        typeof(bool),   // 8 auto branch,
601       typeof(string)   // 9 active Ticket
602        );
603
604             // my vars (dec)
605
606             // set gobject values
607         }
608
609         // user defined functions
610         public void load ()
611         {
612             //this.insert(citer,iter,0);
613             print("getting list");
614             var tr = GitRepo.list();
615             
616             this.el.clear();
617             
618             // fixme .. sort by last updated ...
619             
620             
621             for(var i =0 ; i < tr.length; i++) {
622                     var repo = tr.index(i);
623                     // this is done before we display stuff...
624                     //repo.loadBranches();
625                     //repo.loadStatus();
626                     
627                     Gtk.TreeIter iter;
628                     this.el.append(out iter);
629              
630                 //print(JSON.stringify(ret,null,4));
631                  //tr[i].getBranches();
632                  //tr[i].getStatus();
633                  //var hi;
634                  //try {
635                      //tr[i].debug=1;
636                  //     hi = tr[i].history('/', 1, 'branch', tr[i].currentBranch.name );
637         //             print(JSON.stringify(hi,null,4));
638                 // } catch(e) { print(e);}
639                   
640                 this.el.set_value(iter, 0,   repo.name );
641                 this.el.set_value( iter, 1, repo.currentBranch.name   );
642                 this.el.set_value( iter, 2,  repo.branchesToString()   );
643         //        this.el.set_value(ret.iter, 2, '' + repo.branches.map(
644         //                        function(e) { return e.name; 
645         //                    }).join(', ') 
646          //        );
647         //        this.el.set_value(iter, 3, '' +  (!hi  ? '??' : hi[0].changed_raw));        
648                 this.el.set_value(iter, 4, repo.is_autocommit() );                
649                 this.el.set_value(iter, 5, repo.is_autopush() );                        
650                 this.el.set_value(iter, 6,  repo.git_working_dir );  
651                 // highlight color.
652                 var cb = repo.currentBranch;
653                 //print(JSON.stringify(cb,null,4));
654                 var col = "#ffffff";
655                 
656                 if (cb.lastrev != cb.remoterev) {
657                     col =  "#f2dede";
658                     this.el.set_value( iter, 1, repo.currentBranch.name +"\nRemote != Local"   );
659                 }
660                 if (repo.has_local_changes) {
661                     col =  "#d9edf7";
662                     this.el.set_value( iter, 1, repo.currentBranch.name +"\nHas uncommitted changes"   );
663                 }
664                 if  ((cb.lastrev != cb.remoterev) && (repo.has_local_changes)) {
665                     col =  "#fcf8e3";
666                     this.el.set_value( iter, 1, repo.currentBranch.name +"\nRemote != Local\nHas uncommitted changes"   );            
667                 }
668                 
669                 this.el.set_value(iter, 7, col  );      
670                 var ticket = repo.activeTicket;
671                 
672                 this.el.set_value(iter, 8, repo.is_auto_branch()  );      
673                 this.el.set_value(iter, 9, ticket == null ? "" : ticket.id  );      
674                 
675                 
676             }     
677             this.el.set_sort_column_id (0, Gtk.SortType.ASCENDING);
678         }
679     }
680
681     public class Xcls_tv_autocommit : Object
682     {
683         public Gtk.TreeViewColumn el;
684         private Clones  _this;
685
686
687             // my vars (def)
688
689         // ctor
690         public Xcls_tv_autocommit(Clones _owner )
691         {
692             _this = _owner;
693             _this.tv_autocommit = this;
694             this.el = new Gtk.TreeViewColumn();
695
696             // my vars (dec)
697
698             // set gobject values
699             this.el.title = "Auto Commit";
700             this.el.min_width = 50;
701             var child_0 = new Xcls_cr_autocommit( _this );
702             child_0.ref();
703             this.el.pack_start (  child_0.el , false );
704
705             // init method
706
707             //    this.items[0].el.set_activatable(true);
708              this.el.add_attribute(_this.cr_autocommit.el , "active", 4 );
709         }
710
711         // user defined functions
712     }
713     public class Xcls_cr_autocommit : Object
714     {
715         public Gtk.CellRendererToggle el;
716         private Clones  _this;
717
718
719             // my vars (def)
720
721         // ctor
722         public Xcls_cr_autocommit(Clones _owner )
723         {
724             _this = _owner;
725             _this.cr_autocommit = this;
726             this.el = new Gtk.CellRendererToggle();
727
728             // my vars (dec)
729
730             // set gobject values
731             this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
732
733             //listeners
734             this.el.toggled.connect( (self, path)  => {
735               
736                 Gtk.TreeIter iter;
737                 _this.reposStore.el.get_iter_from_string(out iter, path);
738                 
739                 GLib.Value val;
740                 GLib.Value rval;
741                 _this.reposStore.el.get_value(iter, 4, out val);
742                 _this.reposStore.el.get_value(iter, 6, out rval);
743                 
744                 var repopath = (string)rval;
745                 var bval = (bool)val;
746                 _this.reposStore.el.set_value(iter, 4, !bval);
747                 GLib.debug("got repopath? %s", repopath);
748                 
749                 var repo = GitRepo.get(repopath);
750                 repo.set_autocommit(!bval);
751                 
752                 
753                 
754               
755             });
756         }
757
758         // user defined functions
759     }
760
761
762     public class Xcls_tv_autopush : Object
763     {
764         public Gtk.TreeViewColumn el;
765         private Clones  _this;
766
767
768             // my vars (def)
769
770         // ctor
771         public Xcls_tv_autopush(Clones _owner )
772         {
773             _this = _owner;
774             _this.tv_autopush = this;
775             this.el = new Gtk.TreeViewColumn();
776
777             // my vars (dec)
778
779             // set gobject values
780             this.el.title = "Auto Push";
781             this.el.min_width = 50;
782             var child_0 = new Xcls_cr_autopush( _this );
783             child_0.ref();
784             this.el.pack_start (  child_0.el , false );
785
786             // init method
787
788             this.el.add_attribute(_this.cr_autopush.el , "active", 5 );
789             //      this.items[0].el.set_activatable(true);
790         }
791
792         // user defined functions
793     }
794     public class Xcls_cr_autopush : Object
795     {
796         public Gtk.CellRendererToggle el;
797         private Clones  _this;
798
799
800             // my vars (def)
801
802         // ctor
803         public Xcls_cr_autopush(Clones _owner )
804         {
805             _this = _owner;
806             _this.cr_autopush = this;
807             this.el = new Gtk.CellRendererToggle();
808
809             // my vars (dec)
810
811             // set gobject values
812             this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
813
814             //listeners
815             this.el.toggled.connect( (self, path)  => {
816               
817                 Gtk.TreeIter iter;
818                 _this.reposStore.el.get_iter_from_string(out iter, path);
819                 
820                 GLib.Value val;
821                 GLib.Value rval;
822                 _this.reposStore.el.get_value(iter, 5, out val);
823                 _this.reposStore.el.get_value(iter, 6, out rval);
824                 
825                 var repopath = (string)rval;
826                 var bval = (bool)val;
827                 _this.reposStore.el.set_value(iter, 5, !bval);
828                 var repo = GitRepo.get(repopath);
829                 repo.set_autopush(!bval);
830                 
831                 
832                 
833               
834             });
835         }
836
837         // user defined functions
838     }
839
840
841     public class Xcls_tv_autobranch : Object
842     {
843         public Gtk.TreeViewColumn el;
844         private Clones  _this;
845
846
847             // my vars (def)
848
849         // ctor
850         public Xcls_tv_autobranch(Clones _owner )
851         {
852             _this = _owner;
853             _this.tv_autobranch = this;
854             this.el = new Gtk.TreeViewColumn();
855
856             // my vars (dec)
857
858             // set gobject values
859             this.el.title = "Auto Branch";
860             this.el.min_width = 50;
861             var child_0 = new Xcls_cr_autobranch( _this );
862             child_0.ref();
863             this.el.pack_start (  child_0.el , false );
864
865             // init method
866
867             this.el.add_attribute(_this.cr_autobranch.el , "active", 8 );
868             //      this.items[0].el.set_activatable(true);
869         }
870
871         // user defined functions
872     }
873     public class Xcls_cr_autobranch : Object
874     {
875         public Gtk.CellRendererToggle el;
876         private Clones  _this;
877
878
879             // my vars (def)
880
881         // ctor
882         public Xcls_cr_autobranch(Clones _owner )
883         {
884             _this = _owner;
885             _this.cr_autobranch = this;
886             this.el = new Gtk.CellRendererToggle();
887
888             // my vars (dec)
889
890             // set gobject values
891             this.el.mode = Gtk.CellRendererMode.ACTIVATABLE;
892
893             //listeners
894             this.el.toggled.connect( (self, path)  => {
895               
896                 Gtk.TreeIter iter;
897                 _this.reposStore.el.get_iter_from_string(out iter, path);
898                 
899                 GLib.Value val;
900                 GLib.Value rval;
901                 _this.reposStore.el.get_value(iter, 8, out val);
902                 _this.reposStore.el.get_value(iter, 6, out rval);
903                 
904                 var repopath = (string)rval;
905                 var bval = (bool)val;
906                 _this.reposStore.el.set_value(iter, 8, !bval);
907                 var repo = GitRepo.get(repopath);
908                 repo.set_auto_branch(!bval);
909                 
910                 
911                 
912               
913             });
914         }
915
916         // user defined functions
917     }
918
919
920     public class Xcls_tv_repo : Object
921     {
922         public Gtk.TreeViewColumn el;
923         private Clones  _this;
924
925
926             // my vars (def)
927
928         // ctor
929         public Xcls_tv_repo(Clones _owner )
930         {
931             _this = _owner;
932             _this.tv_repo = this;
933             this.el = new Gtk.TreeViewColumn();
934
935             // my vars (dec)
936
937             // set gobject values
938             this.el.sort_column_id = 0;
939             this.el.title = "Repo";
940             this.el.min_width = 200;
941             this.el.sort_order = Gtk.SortType.ASCENDING;
942             this.el.resizable = true;
943             var child_0 = new Xcls_cr_repo( _this );
944             child_0.ref();
945             this.el.pack_start (  child_0.el , false );
946
947             // init method
948
949             this.el.add_attribute(_this.cr_repo.el , "markup", 0 );
950         }
951
952         // user defined functions
953     }
954     public class Xcls_cr_repo : Object
955     {
956         public Gtk.CellRendererText el;
957         private Clones  _this;
958
959
960             // my vars (def)
961
962         // ctor
963         public Xcls_cr_repo(Clones _owner )
964         {
965             _this = _owner;
966             _this.cr_repo = this;
967             this.el = new Gtk.CellRendererText();
968
969             // my vars (dec)
970
971             // set gobject values
972         }
973
974         // user defined functions
975     }
976
977
978     public class Xcls_tv_active_ticket : Object
979     {
980         public Gtk.TreeViewColumn el;
981         private Clones  _this;
982
983
984             // my vars (def)
985
986         // ctor
987         public Xcls_tv_active_ticket(Clones _owner )
988         {
989             _this = _owner;
990             _this.tv_active_ticket = this;
991             this.el = new Gtk.TreeViewColumn();
992
993             // my vars (dec)
994
995             // set gobject values
996             this.el.title = "Active Ticket";
997             this.el.min_width = 50;
998             var child_0 = new Xcls_cr_active_ticket( _this );
999             child_0.ref();
1000             this.el.pack_start (  child_0.el , false );
1001
1002             // init method
1003
1004             this.el.add_attribute(_this.cr_active_ticket.el , "markup", 9 );
1005         }
1006
1007         // user defined functions
1008     }
1009     public class Xcls_cr_active_ticket : Object
1010     {
1011         public Gtk.CellRendererText el;
1012         private Clones  _this;
1013
1014
1015             // my vars (def)
1016
1017         // ctor
1018         public Xcls_cr_active_ticket(Clones _owner )
1019         {
1020             _this = _owner;
1021             _this.cr_active_ticket = this;
1022             this.el = new Gtk.CellRendererText();
1023
1024             // my vars (dec)
1025
1026             // set gobject values
1027         }
1028
1029         // user defined functions
1030     }
1031
1032
1033     public class Xcls_tv_current_branch : Object
1034     {
1035         public Gtk.TreeViewColumn el;
1036         private Clones  _this;
1037
1038
1039             // my vars (def)
1040
1041         // ctor
1042         public Xcls_tv_current_branch(Clones _owner )
1043         {
1044             _this = _owner;
1045             _this.tv_current_branch = this;
1046             this.el = new Gtk.TreeViewColumn();
1047
1048             // my vars (dec)
1049
1050             // set gobject values
1051             this.el.title = "Current Branch";
1052             this.el.min_width = 50;
1053             var child_0 = new Xcls_cr_current_branch( _this );
1054             child_0.ref();
1055             this.el.pack_start (  child_0.el , false );
1056
1057             // init method
1058
1059             this.el.add_attribute(_this.cr_current_branch.el , "markup", 1 );
1060                  this.el.add_attribute(_this.cr_current_branch.el, "cell-background", 7 );
1061         }
1062
1063         // user defined functions
1064     }
1065     public class Xcls_cr_current_branch : Object
1066     {
1067         public Gtk.CellRendererText el;
1068         private Clones  _this;
1069
1070
1071             // my vars (def)
1072
1073         // ctor
1074         public Xcls_cr_current_branch(Clones _owner )
1075         {
1076             _this = _owner;
1077             _this.cr_current_branch = this;
1078             this.el = new Gtk.CellRendererText();
1079
1080             // my vars (dec)
1081
1082             // set gobject values
1083         }
1084
1085         // user defined functions
1086     }
1087
1088
1089     public class Xcls_tv_last_updated : Object
1090     {
1091         public Gtk.TreeViewColumn el;
1092         private Clones  _this;
1093
1094
1095             // my vars (def)
1096
1097         // ctor
1098         public Xcls_tv_last_updated(Clones _owner )
1099         {
1100             _this = _owner;
1101             _this.tv_last_updated = this;
1102             this.el = new Gtk.TreeViewColumn();
1103
1104             // my vars (dec)
1105
1106             // set gobject values
1107             this.el.title = "Last updated";
1108             this.el.min_width = 50;
1109             var child_0 = new Xcls_cr_last_updated( _this );
1110             child_0.ref();
1111             this.el.pack_start (  child_0.el , false );
1112
1113             // init method
1114
1115             this.el.add_attribute(_this.cr_last_updated.el , "markup", 3 );
1116         }
1117
1118         // user defined functions
1119     }
1120     public class Xcls_cr_last_updated : Object
1121     {
1122         public Gtk.CellRendererText el;
1123         private Clones  _this;
1124
1125
1126             // my vars (def)
1127
1128         // ctor
1129         public Xcls_cr_last_updated(Clones _owner )
1130         {
1131             _this = _owner;
1132             _this.cr_last_updated = this;
1133             this.el = new Gtk.CellRendererText();
1134
1135             // my vars (dec)
1136
1137             // set gobject values
1138         }
1139
1140         // user defined functions
1141     }
1142
1143
1144     public class Xcls_tv_all_branches : Object
1145     {
1146         public Gtk.TreeViewColumn el;
1147         private Clones  _this;
1148
1149
1150             // my vars (def)
1151
1152         // ctor
1153         public Xcls_tv_all_branches(Clones _owner )
1154         {
1155             _this = _owner;
1156             _this.tv_all_branches = this;
1157             this.el = new Gtk.TreeViewColumn();
1158
1159             // my vars (dec)
1160
1161             // set gobject values
1162             this.el.title = "All Branches";
1163             this.el.min_width = 50;
1164             this.el.resizable = false;
1165             var child_0 = new Xcls_cr_all_branches( _this );
1166             child_0.ref();
1167             this.el.pack_start (  child_0.el , false );
1168
1169             // init method
1170
1171             this.el.add_attribute(_this.cr_all_branches.el , "markup", 2 );
1172         }
1173
1174         // user defined functions
1175     }
1176     public class Xcls_cr_all_branches : Object
1177     {
1178         public Gtk.CellRendererText el;
1179         private Clones  _this;
1180
1181
1182             // my vars (def)
1183
1184         // ctor
1185         public Xcls_cr_all_branches(Clones _owner )
1186         {
1187             _this = _owner;
1188             _this.cr_all_branches = this;
1189             this.el = new Gtk.CellRendererText();
1190
1191             // my vars (dec)
1192
1193             // set gobject values
1194         }
1195
1196         // user defined functions
1197     }
1198
1199
1200
1201
1202
1203 }