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