NewBranch.bjs
[gitlive] / NewBranch.vala
index dac5d5c..cb191c5 100644 (file)
@@ -135,41 +135,30 @@ public class NewBranch : Object
         if (this.running) { // should not happen!!
                GLib.error("new branch show called, when already being displayed?");
        }
-       this.queue = queue;
        
+       
+       this.queue = queue;
        this.running  = true;
        GitMonitor.gitmonitor.stop();
        
+       
         this.repo = repo;
-        
-         
-        
        this.el.move((Gdk.Screen.width() / 2)- 250 ,0);
        this.el.set_default_size( 500,200); // not sure why it grows..
-        GLib.debug("Loading tickets"); 
+       
+       
+       
+       
          
     
         this.el.show_all();
         this.el.set_keep_above(true);
+       
+       _this.select_ticket_tab.load_data();
+       _this.create_ticket_tab.load_data();
+       _this.quick_commit_tab.load_data();
+       
        
-        
-        var curproj = RooProject.getProjectByRepo(this.repo);
-         _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
-        
-       _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid);
-       _this.createbtn.updateState();
-       
-       _this.ticketsel.el.get_child().get_style_context().remove_class("warning");
-       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()));
-       } else {
-               _this.ticketsel.el.get_child().get_style_context().add_class("warning");
-       }
-        _this.view.loadTicket(tid);
-        
-        
         
         
         
@@ -314,6 +303,25 @@ public class NewBranch : Object
         // user defined functions
         public void load_data () {
         
+            GLib.debug("Loading tickets"); 
+            
+            var curproj = RooProject.getProjectByRepo(this.repo);
+             _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
+            
+               _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid);
+               _this.createbtn.updateState();
+               
+               _this.ticketsel.el.get_child().get_style_context().remove_class("warning");
+               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()));
+               } else {
+                       _this.ticketsel.el.get_child().get_style_context().add_class("warning");
+               }
+            _this.view.loadTicket(tid);
+            
+            
         }
     }
     public class Xcls_Table7 : Object