03e56b91e7b42d3292f44002709767f432b0e26d
[gitlive] / NewBranch.vala
1 static NewBranch  _NewBranch;
2
3 public class NewBranch : Object
4 {
5     public Gtk.Dialog el;
6     private NewBranch  _this;
7
8     public static NewBranch singleton()
9     {
10         if (_NewBranch == null) {
11             _NewBranch= new NewBranch();
12         }
13         return _NewBranch;
14     }
15     public Xcls_projectsel projectsel;
16     public Xcls_prcellrenderer prcellrenderer;
17     public Xcls_prmodel prmodel;
18     public Xcls_ticketsel ticketsel;
19     public Xcls_dbcellrenderer dbcellrenderer;
20     public Xcls_dbmodel dbmodel;
21     public Xcls_name name;
22     public Xcls_btn_not_me btn_not_me;
23     public Xcls_btn_closed btn_closed;
24     public Xcls_scrolled_window scrolled_window;
25     public Xcls_view view;
26
27         // my vars (def)
28     public GitRepo? repo;
29     public bool running;
30     public Gee.ArrayList<GitMonitorQueue> queue;
31
32     // ctor
33     public NewBranch()
34     {
35         _this = this;
36         this.el = new Gtk.Dialog();
37
38         // my vars (dec)
39         this.repo = null;
40         this.running = true;
41         this.queue = null;
42
43         // set gobject values
44         this.el.title = "Create a working branch ";
45         this.el.default_height = 500;
46         this.el.default_width = 500;
47         this.el.deletable = true;
48         this.el.modal = true;
49         var child_0 = new Xcls_Box2( _this );
50         child_0.ref();
51         this.el.get_content_area().add (  child_0.el  );
52
53         //listeners
54         this.el.delete_event.connect( (self, event) => {
55             this.el.hide();
56             return true; 
57             //test  
58         });
59         this.el.response.connect( (self, response_id) =>  { 
60           
61                 GLib.debug("got %d", (int) response_id);
62                 
63                 
64                 
65                 
66                 
67                  
68                 // have they selected a ticket..
69                 // make that the current active ticket?
70                 // we really need to store locally what ticket is being worked on..
71                 // in theory we could be working on multiple project and not merging..
72                 // -- each repo would have their active ticket (only one per repo)
73                 // -- so we could just store that in there
74                 // -- initial load can check the contents of the ticket files on first scan.
75                 var ticket_id = _this.ticketsel.selectedTicketId();
76                 
77                 if (ticket_id == "") {
78                         _this.ticketsel.el.get_child().get_style_context().add_class("warning");
79                         return;
80                 }
81                 
82                 
83                 if (response_id < 1) {
84                     _this.el.hide();    
85                     this.running = false; 
86                         return;
87                 }
88                 
89                 
90             if (this.repo != null) {
91                 var bn = _this.name.el.get_text();
92         
93                         var res = this.repo.setActiveTicket(                    
94                                  RooTicket.singleton().getById(ticket_id != "" ? ticket_id : "-1"), bn
95                          );
96                          if (res) {
97                                 // start the monitoring..
98                                  GitMonitor.gitmonitor.start();
99                                  
100                          }
101             }
102             
103         
104             this.running = false; 
105         
106                 this.el.hide();
107                  
108                  
109         
110                  
111         });
112     }
113
114     // user defined functions
115     public   void show ( GitRepo repo, Gee.ArrayList<GitMonitorQueue> queue, string tid = "" ) 
116     {
117          // this.el.set_gravity(Gdk.Gravity.NORTH);
118         if (this.running) { // should not happen!!
119                 GLib.error("new branch show called, when already being displayed?");
120         }
121         this.queue = queue;
122         
123         this.running  = true;
124         GitMonitor.gitmonitor.stop();
125         
126         this.repo = repo;
127         
128          
129         
130         this.el.move((Gdk.Screen.width() / 2)- 250 ,0);
131         this.el.set_default_size( 500,200); // not sure why it grows..
132         GLib.debug("Loading tickets"); 
133          
134     
135         this.el.show_all();
136         this.el.set_keep_above(true);
137        
138         
139         var curproj = RooProject.getProjectByRepo(this.repo);
140          _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
141         
142         _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid);
143         _this.ticketsel.el.get_child().get_style_context().remove_class("warning");
144         if (tid != "") { 
145                 var name = RooTicket.singleton().usernameLocal();
146                 var ticket = RooTicket.singleton().getById(tid);
147                 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
148         } else {
149                 _this.ticketsel.el.get_child().get_style_context().add_class("warning");
150         }
151         _this.view.loadTicket(tid);
152         this.el.run();
153     
154     }
155     public class Xcls_Box2 : Object
156     {
157         public Gtk.Box el;
158         private NewBranch  _this;
159
160
161             // my vars (def)
162
163         // ctor
164         public Xcls_Box2(NewBranch _owner )
165         {
166             _this = _owner;
167             this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
168
169             // my vars (dec)
170
171             // set gobject values
172             var child_0 = new Xcls_Table3( _this );
173             child_0.ref();
174             this.el.pack_start (  child_0.el , false,false,0 );
175             var child_1 = new Xcls_scrolled_window( _this );
176             child_1.ref();
177             this.el.add (  child_1.el  );
178         }
179
180         // user defined functions
181     }
182     public class Xcls_Table3 : Object
183     {
184         public Gtk.Table el;
185         private NewBranch  _this;
186
187
188             // my vars (def)
189
190         // ctor
191         public Xcls_Table3(NewBranch _owner )
192         {
193             _this = _owner;
194             this.el = new Gtk.Table( 5, 5, true );
195
196             // my vars (dec)
197
198             // set gobject values
199             this.el.expand = false;
200             this.el.margin = 2;
201             this.el.column_spacing = 4;
202             this.el.vexpand = false;
203             var child_0 = new Xcls_Label4( _this );
204             child_0.ref();
205             this.el.attach_defaults (  child_0.el , 0,1,0,1 );
206             var child_1 = new Xcls_Label5( _this );
207             child_1.ref();
208             this.el.attach_defaults (  child_1.el , 1,2,0,1 );
209             var child_2 = new Xcls_projectsel( _this );
210             child_2.ref();
211             this.el.attach_defaults (  child_2.el , 0,1,1,2 );
212             var child_3 = new Xcls_ticketsel( _this );
213             child_3.ref();
214             this.el.attach_defaults (  child_3.el , 1,4,1,2 );
215             var child_4 = new Xcls_Button12( _this );
216             child_4.ref();
217             this.el.attach_defaults (  child_4.el , 4,5,1,2 );
218             var child_5 = new Xcls_Label13( _this );
219             child_5.ref();
220             this.el.attach_defaults (  child_5.el , 0,1,3,4 );
221             var child_6 = new Xcls_name( _this );
222             child_6.ref();
223             this.el.attach_defaults (  child_6.el , 0,4,4,5 );
224             var child_7 = new Xcls_Button15( _this );
225             child_7.ref();
226             this.el.attach_defaults (  child_7.el , 4,5,4,5 );
227             var child_8 = new Xcls_Box16( _this );
228             child_8.ref();
229             this.el.attach_defaults (  child_8.el , 0,5,2,3 );
230         }
231
232         // user defined functions
233     }
234     public class Xcls_Label4 : Object
235     {
236         public Gtk.Label el;
237         private NewBranch  _this;
238
239
240             // my vars (def)
241
242         // ctor
243         public Xcls_Label4(NewBranch _owner )
244         {
245             _this = _owner;
246             this.el = new Gtk.Label( "Project" );
247
248             // my vars (dec)
249
250             // set gobject values
251             this.el.halign = Gtk.Align.START;
252             this.el.justify = Gtk.Justification.RIGHT;
253             this.el.visible = true;
254         }
255
256         // user defined functions
257     }
258
259     public class Xcls_Label5 : Object
260     {
261         public Gtk.Label el;
262         private NewBranch  _this;
263
264
265             // my vars (def)
266
267         // ctor
268         public Xcls_Label5(NewBranch _owner )
269         {
270             _this = _owner;
271             this.el = new Gtk.Label( "Ticket" );
272
273             // my vars (dec)
274
275             // set gobject values
276             this.el.halign = Gtk.Align.START;
277             this.el.visible = true;
278         }
279
280         // user defined functions
281     }
282
283     public class Xcls_projectsel : Object
284     {
285         public Gtk.ComboBox el;
286         private NewBranch  _this;
287
288
289             // my vars (def)
290         public bool loading;
291
292         // ctor
293         public Xcls_projectsel(NewBranch _owner )
294         {
295             _this = _owner;
296             _this.projectsel = this;
297             this.el = new Gtk.ComboBox.with_entry();
298
299             // my vars (dec)
300             this.loading = false;
301
302             // set gobject values
303             var child_0 = new Xcls_prcellrenderer( _this );
304             child_0.ref();
305             this.el.pack_start (  child_0.el , true );
306             var child_1 = new Xcls_prmodel( _this );
307             child_1.ref();
308             this.el.set_model (  child_1.el  );
309
310             // init method
311
312             this.el.set_entry_text_column(1);
313
314             //listeners
315             this.el.changed.connect( () => {
316                 if (this.loading) {
317                         return;
318                 }
319                 var project_id = this.selectedProjectId();
320                 _this.dbmodel.loadTickets(project_id);
321                 
322                 
323                 /*if (this.loading) {
324                         return;
325                 }
326                 var ticket_id = this.selectedTicketId();
327                 
328                 var name = RooTicket.singleton().usernameLocal();
329                 
330                 if (ticket_id == "" || ticket_id == null) {
331                 
332                         var dt = new  DateTime.now_local();
333                         _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
334                         return;
335                 }
336                 
337                 
338                 var ticket = RooTicket.singleton().getById(ticket_id);
339                
340                 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
341                 
342                 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
343                 */
344             });
345         }
346
347         // user defined functions
348         public string selectedProjectId () {
349                 Gtk.TreeIter iter;
350                 Value val1;
351          
352          
353                 this.el.get_active_iter (out iter);
354                 _this.prmodel.el.get_value (iter, 0, out val1);
355          
356         
357                 return  (string) val1;
358                 
359                 
360                 
361                 
362         }
363     }
364     public class Xcls_prcellrenderer : Object
365     {
366         public Gtk.CellRendererText el;
367         private NewBranch  _this;
368
369
370             // my vars (def)
371
372         // ctor
373         public Xcls_prcellrenderer(NewBranch _owner )
374         {
375             _this = _owner;
376             _this.prcellrenderer = this;
377             this.el = new Gtk.CellRendererText();
378
379             // my vars (dec)
380
381             // set gobject values
382         }
383
384         // user defined functions
385     }
386
387     public class Xcls_prmodel : Object
388     {
389         public Gtk.ListStore el;
390         private NewBranch  _this;
391
392
393             // my vars (def)
394
395         // ctor
396         public Xcls_prmodel(NewBranch _owner )
397         {
398             _this = _owner;
399             _this.prmodel = this;
400             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
401
402             // my vars (dec)
403
404             // set gobject values
405         }
406
407         // user defined functions
408         public void loadProjects (string id) {
409         
410         
411             
412             _this.projectsel.loading = true;
413         
414             this.el.clear();                                    
415             Gtk.TreeIter iter;
416             var el = this.el;
417             
418             el.append(out iter);
419         
420             
421             el.set_value(iter, 0, "");
422             el.set_value(iter, 1, "-- select a project --");
423             if (id == "") {
424                     _this.projectsel.el.set_active_iter(iter);
425             }
426           
427             foreach(var project in RooProject.projects()) {
428             
429                 el.append(out iter);
430                 
431                 el.set_value(iter, 0, project.id);
432                 el.set_value(iter, 1,  project.name );
433                 if (id == project.id) {
434                            _this.projectsel.el.set_active_iter(iter);
435                     }   
436                 
437             }
438             
439             _this.projectsel.loading = false;
440              //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
441                                              
442         }
443     }
444
445
446     public class Xcls_ticketsel : Object
447     {
448         public Gtk.ComboBox el;
449         private NewBranch  _this;
450
451
452             // my vars (def)
453         public bool loading;
454
455         // ctor
456         public Xcls_ticketsel(NewBranch _owner )
457         {
458             _this = _owner;
459             _this.ticketsel = this;
460             this.el = new Gtk.ComboBox.with_entry();
461
462             // my vars (dec)
463             this.loading = false;
464
465             // set gobject values
466             var child_0 = new Xcls_dbcellrenderer( _this );
467             child_0.ref();
468             this.el.pack_start (  child_0.el , true );
469             var child_1 = new Xcls_dbmodel( _this );
470             child_1.ref();
471             this.el.set_model (  child_1.el  );
472
473             // init method
474
475             //this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
476             this.el.set_entry_text_column(1);
477             this.el.get_child().set_sensitive(false);
478
479             //listeners
480             this.el.changed.connect( () => {
481                 if (this.loading) {
482                         return;
483                 }
484                 var ticket_id = this.selectedTicketId();
485                 
486                 var name = RooTicket.singleton().usernameLocal();
487                 
488                 this.el.get_child().get_style_context().remove_class("warning");
489                 if (ticket_id == "" || ticket_id == null) {
490                 
491                         var dt = new  DateTime.now_local();
492                         _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
493                         _this.view.loadTicket("");              
494                         
495                         this.el.get_child().get_style_context().add_class("warning");
496                         
497                         return;
498                 }
499                 
500                 
501                 var ticket = RooTicket.singleton().getById(ticket_id);
502                
503                 _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
504                 _this.scrolled_window.el.show();
505                  
506                 _this.view.loadTicket(ticket.id);
507                 //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
508             });
509         }
510
511         // user defined functions
512         public string selectedTicketId () {
513         Gtk.TreeIter iter;
514                 Value val1;
515          
516          
517                 this.el.get_active_iter (out iter);
518                 _this.dbmodel.el.get_value (iter, 0, out val1);
519          
520         
521                 return  (string) val1;
522                 
523                 
524                 
525                 
526         }
527     }
528     public class Xcls_dbcellrenderer : Object
529     {
530         public Gtk.CellRendererText el;
531         private NewBranch  _this;
532
533
534             // my vars (def)
535
536         // ctor
537         public Xcls_dbcellrenderer(NewBranch _owner )
538         {
539             _this = _owner;
540             _this.dbcellrenderer = this;
541             this.el = new Gtk.CellRendererText();
542
543             // my vars (dec)
544
545             // set gobject values
546         }
547
548         // user defined functions
549     }
550
551     public class Xcls_dbmodel : Object
552     {
553         public Gtk.ListStore el;
554         private NewBranch  _this;
555
556
557             // my vars (def)
558
559         // ctor
560         public Xcls_dbmodel(NewBranch _owner )
561         {
562             _this = _owner;
563             _this.dbmodel = this;
564             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
565
566             // my vars (dec)
567
568             // set gobject values
569         }
570
571         // user defined functions
572         public void loadTickets (string project_id , string tid = "") {
573         
574         
575             
576             // fixme .. get project id from selection..
577             
578              RooTicket.singleton().loadTickets(
579                                 project_id,
580                                 _this.btn_not_me.el.active ? RooTicket.Who.ANYBODY :  RooTicket.Who.ME,
581                                  _this.btn_closed.el.active ? RooTicket.Status.ALL :  RooTicket.Status.ACTIVE
582                          );
583                 
584             _this.ticketsel.loading = true;
585         
586             this.el.clear();                                    
587             Gtk.TreeIter iter;
588             var el = this.el;
589             
590             el.append(out iter);
591         
592             
593             el.set_value(iter, 0, "");
594             el.set_value(iter, 1, "-- select a ticket --");
595             
596             _this.ticketsel.el.set_active_iter(iter);
597             var tickets = RooTicket.singleton().tickets;
598             foreach(var ticket in tickets) {
599             
600                 el.append(out iter);
601                 
602                 el.set_value(iter, 0, ticket.id);
603                 el.set_value(iter, 1, "#%s %s".printf( ticket.id, ticket.summary));
604                 
605                 if (ticket.id == tid) {
606                             _this.ticketsel.el.set_active_iter(iter);
607                 }
608                 
609             }
610             
611             _this.ticketsel.loading = false;
612              //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
613                                              
614         }
615     }
616
617
618     public class Xcls_Button12 : Object
619     {
620         public Gtk.Button el;
621         private NewBranch  _this;
622
623
624             // my vars (def)
625
626         // ctor
627         public Xcls_Button12(NewBranch _owner )
628         {
629             _this = _owner;
630             this.el = new Gtk.Button();
631
632             // my vars (dec)
633
634             // set gobject values
635             this.el.expand = false;
636             this.el.label = "New Ticket";
637
638             //listeners
639             this.el.clicked.connect( () => {
640                 _this.el.response(-1);
641                 Ticket.singleton().show(_this.repo);
642             
643             });
644         }
645
646         // user defined functions
647     }
648
649     public class Xcls_Label13 : Object
650     {
651         public Gtk.Label el;
652         private NewBranch  _this;
653
654
655             // my vars (def)
656
657         // ctor
658         public Xcls_Label13(NewBranch _owner )
659         {
660             _this = _owner;
661             this.el = new Gtk.Label( "Use this as branch name" );
662
663             // my vars (dec)
664
665             // set gobject values
666             this.el.halign = Gtk.Align.START;
667             this.el.justify = Gtk.Justification.RIGHT;
668             this.el.xalign = 0.900000f;
669         }
670
671         // user defined functions
672     }
673
674     public class Xcls_name : Object
675     {
676         public Gtk.Entry el;
677         private NewBranch  _this;
678
679
680             // my vars (def)
681
682         // ctor
683         public Xcls_name(NewBranch _owner )
684         {
685             _this = _owner;
686             _this.name = this;
687             this.el = new Gtk.Entry();
688
689             // my vars (dec)
690
691             // set gobject values
692             this.el.visible = true;
693         }
694
695         // user defined functions
696     }
697
698     public class Xcls_Button15 : Object
699     {
700         public Gtk.Button el;
701         private NewBranch  _this;
702
703
704             // my vars (def)
705
706         // ctor
707         public Xcls_Button15(NewBranch _owner )
708         {
709             _this = _owner;
710             this.el = new Gtk.Button();
711
712             // my vars (dec)
713
714             // set gobject values
715             this.el.label = "Create Branch";
716
717             // init method
718
719             {
720                this.el.get_style_context().add_class("suggested-action");
721             }
722
723             //listeners
724             this.el.clicked.connect( () => {
725                 GLib.debug("fire response = 1");
726                 _this.el.response(1);
727             });
728         }
729
730         // user defined functions
731     }
732
733     public class Xcls_Box16 : Object
734     {
735         public Gtk.Box el;
736         private NewBranch  _this;
737
738
739             // my vars (def)
740
741         // ctor
742         public Xcls_Box16(NewBranch _owner )
743         {
744             _this = _owner;
745             this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
746
747             // my vars (dec)
748
749             // set gobject values
750             var child_0 = new Xcls_btn_not_me( _this );
751             child_0.ref();
752             this.el.add (  child_0.el  );
753             var child_1 = new Xcls_btn_closed( _this );
754             child_1.ref();
755             this.el.add (  child_1.el  );
756             var child_2 = new Xcls_Label19( _this );
757             child_2.ref();
758             this.el.add (  child_2.el  );
759         }
760
761         // user defined functions
762     }
763     public class Xcls_btn_not_me : Object
764     {
765         public Gtk.CheckButton el;
766         private NewBranch  _this;
767
768
769             // my vars (def)
770
771         // ctor
772         public Xcls_btn_not_me(NewBranch _owner )
773         {
774             _this = _owner;
775             _this.btn_not_me = this;
776             this.el = new Gtk.CheckButton();
777
778             // my vars (dec)
779
780             // set gobject values
781             this.el.label = "Show tickets not assigned to me";
782
783             //listeners
784             this.el.toggled.connect( () => {
785                 var project_id = _this.projectsel.selectedProjectId();
786                 _this.dbmodel.loadTickets(project_id);  
787             });
788         }
789
790         // user defined functions
791     }
792
793     public class Xcls_btn_closed : Object
794     {
795         public Gtk.CheckButton el;
796         private NewBranch  _this;
797
798
799             // my vars (def)
800
801         // ctor
802         public Xcls_btn_closed(NewBranch _owner )
803         {
804             _this = _owner;
805             _this.btn_closed = this;
806             this.el = new Gtk.CheckButton();
807
808             // my vars (dec)
809
810             // set gobject values
811             this.el.label = "Show closed Tickets";
812
813             //listeners
814             this.el.toggled.connect( () => {
815                 var project_id = _this.projectsel.selectedProjectId();
816                 _this.dbmodel.loadTickets(project_id);  
817                  
818             });
819         }
820
821         // user defined functions
822     }
823
824     public class Xcls_Label19 : Object
825     {
826         public Gtk.Label el;
827         private NewBranch  _this;
828
829
830             // my vars (def)
831
832         // ctor
833         public Xcls_Label19(NewBranch _owner )
834         {
835             _this = _owner;
836             this.el = new Gtk.Label( "<a href=\"refresh\">Refresh Ticket list</a>" );
837
838             // my vars (dec)
839
840             // set gobject values
841             this.el.halign = Gtk.Align.END;
842             this.el.hexpand = true;
843             this.el.use_markup = true;
844
845             //listeners
846             this.el.activate_link.connect( (uri) => {
847                 if (uri == "refresh") {
848                         RooProject.reload();
849                         var curproj = RooProject.getProjectByRepo(_this.repo);
850                          _this.prmodel.loadProjects(curproj == null ? "": curproj.id);
851             
852                         _this.dbmodel.loadTickets(curproj == null ? "": curproj.id);            
853                 }
854                 return true;
855             });
856         }
857
858         // user defined functions
859     }
860
861
862
863     public class Xcls_scrolled_window : Object
864     {
865         public Gtk.ScrolledWindow el;
866         private NewBranch  _this;
867
868
869             // my vars (def)
870
871         // ctor
872         public Xcls_scrolled_window(NewBranch _owner )
873         {
874             _this = _owner;
875             _this.scrolled_window = this;
876             this.el = new Gtk.ScrolledWindow( null, null );
877
878             // my vars (dec)
879
880             // set gobject values
881             this.el.height_request = 500;
882             this.el.vexpand = true;
883             var child_0 = new Xcls_view( _this );
884             child_0.ref();
885             this.el.add (  child_0.el  );
886
887             // init method
888
889             {
890                 this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
891             }
892         }
893
894         // user defined functions
895     }
896     public class Xcls_view : Object
897     {
898         public WebKit.WebView el;
899         private NewBranch  _this;
900
901
902             // my vars (def)
903
904         // ctor
905         public Xcls_view(NewBranch _owner )
906         {
907             _this = _owner;
908             _this.view = this;
909             this.el = new WebKit.WebView();
910
911             // my vars (dec)
912
913             // set gobject values
914         }
915
916         // user defined functions
917         public void loadTicket (string tid) {
918                 int h,w;
919                 _this.el.get_size(out w, out h);
920                 
921                 if (tid == "") {
922                         _this.scrolled_window.el.hide();
923                         _this.el.resize(w, 150);
924                 } else {
925                         _this.scrolled_window.el.show();
926                         _this.el.resize(w, 800);
927                 }
928                 
929                 var rs =  RooTicket.singleton();                
930                 var uri = new WebKit.URIRequest("https://roojs.com/admin.php/MTrack/View/" + tid);
931                 var hd = uri.get_http_headers();
932                 var authCode = Base64.encode ("%s:%s".printf(rs.username, rs.password).data);
933                 hd.append("Authorization", "Basic %s".printf(authCode));
934                 
935                  this.el.load_request(uri);
936         }
937     }
938
939
940
941 }