Uncommited changes synced
[gitlive] / NewBranch.vala
index f6c79bd..cce2256 100644 (file)
@@ -21,6 +21,8 @@ public class NewBranch : Object
     public Xcls_name name;
     public Xcls_btn_not_me btn_not_me;
     public Xcls_btn_closed btn_closed;
+    public Xcls_scrolled_window scrolled_window;
+    public Xcls_view view;
 
         // my vars (def)
     public GitRepo? repo;
@@ -40,7 +42,7 @@ public class NewBranch : Object
 
         // set gobject values
         this.el.title = "Create a working branch ";
-        this.el.default_height = 200;
+        this.el.default_height = 500;
         this.el.default_width = 500;
         this.el.deletable = true;
         this.el.modal = true;
@@ -125,10 +127,13 @@ public class NewBranch : Object
          _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
         
        _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid);
+       _this.scrolled_window.el.hide();
        if (tid != "") {
                var name = RooTicket.singleton().usernameLocal();
                var ticket = RooTicket.singleton().getById(tid);
                _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
+               _this.scrolled_window.el.show();
+               _this.view.loadTicket(tid);
        }
     
        this.el.run();
@@ -154,6 +159,9 @@ public class NewBranch : Object
             var child_0 = new Xcls_Table3( _this );
             child_0.ref();
             this.el.pack_start (  child_0.el , false,false,0 );
+            var child_1 = new Xcls_scrolled_window( _this );
+            child_1.ref();
+            this.el.add (  child_1.el  );
         }
 
         // user defined functions
@@ -475,7 +483,7 @@ public class NewBranch : Object
                var ticket = RooTicket.singleton().getById(ticket_id);
                
                _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
-               
+               _this.view.loadTicket(ticket.id);
                //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
             });
         }
@@ -831,5 +839,64 @@ public class NewBranch : Object
 
 
 
+    public class Xcls_scrolled_window : Object
+    {
+        public Gtk.ScrolledWindow el;
+        private NewBranch  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_scrolled_window(NewBranch _owner )
+        {
+            _this = _owner;
+            _this.scrolled_window = this;
+            this.el = new Gtk.ScrolledWindow( null, null );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.vexpand = true;
+            var child_0 = new Xcls_view( _this );
+            child_0.ref();
+            this.el.add (  child_0.el  );
+
+            // init method
+
+            {
+               this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+            }
+        }
+
+        // user defined functions
+    }
+    public class Xcls_view : Object
+    {
+        public WebKit.WebView el;
+        private NewBranch  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_view(NewBranch _owner )
+        {
+            _this = _owner;
+            _this.view = this;
+            this.el = new WebKit.WebView();
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadTicket (string tid) {
+                this.el.load_uri("http://www.google.com");
+        }
+    }
+
+
 
 }