NewBranch.bjs
[gitlive] / NewBranch.vala
index d4b0e09..18c557b 100644 (file)
@@ -1101,7 +1101,43 @@ public class NewBranch : Object
 
         // user defined functions
         public void load_data () {
+          if (this.running) { // should not happen!!
+               GLib.error("new branch show called, when already being displayed?");
+               }
+               this.running  = true;
+         
+                
+               
+            Timeout.add_seconds(1, () => {
+                        
+                       RooProject? curproj = null;
+                       if (_this.repo != null) {
+                               curproj = RooProject.getProjectByRepo(_this.repo);
+                       }
+                       _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
+                       if (curproj != null) {
+                
+                               
+                               var rt = RooTicket.singleton();
+                               rt.loadProjectOptions(curproj.id);
+                               
+                               _this.msmodel.loadMilestones();
+                               _this.primodel.loadPriorities();
+                               _this.sevmodel.loadSeverities();
+                               _this.clmodel.loadClassifications();    
+                               _this.devmodel.loadDevelopers();        
+                               
+                       }
+                       _this.summary.el.set_text("");
+                       _this.description.el.buffer.text = ""; 
+                       _this.spinner.el.stop();
+                       _this.spinner.el.hide();        
         
+                       this.table.el.show();
+                   _this.summary.el.grab_focus();
+         
+                       return false;
+               });
         }
     }
     public class Xcls_table : Object