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