NewBranch.bjs
[gitlive] / NewBranch.vala
index 00dd30a..f178788 100644 (file)
@@ -476,6 +476,7 @@ public class NewBranch : Object
                
                        var dt = new  DateTime.now_local();
                        _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
+                       _this.view.loadTicket("");              
                        return;
                }
                
@@ -892,16 +893,29 @@ public class NewBranch : Object
             // my vars (dec)
 
             // set gobject values
+
+            //listeners
+            this.el.authenticate.connect( (auth) => {
+               var rs =  RooTicket.singleton();        
+                auth.authenticate(new WebKit.Credential(rs.username, rs.password,WebKit.CredentialPersistence.FOR_SESSION));
+                auth.ref();
+                return true;
+            });
         }
 
         // user defined functions
         public void loadTicket (string tid) {
+               int h,w;
+               _this.el.get_size(out w, out h);
+               
                if (tid == "") {
                        _this.scrolled_window.el.hide();
+                       _this.el.resize(w, 150);
                } else {
                        _this.scrolled_window.el.show();
+                       _this.el.resize(w, 800);
                }
-                this.el.load_uri("http://www.google.com");
+                this.el.load_uri("https://roojs.com/admin.php/MTrack/View/" + tid);
         }
     }