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