MergeBranch.bjs
[gitlive] / Ticket.vala
index eb97279..12eb468 100644 (file)
@@ -99,7 +99,7 @@ public class Ticket : Object
         if (this.running) { // should not happen!!
                GLib.error("new branch show called, when already being displayed?");
        }
-     
+       this.running  = true;
      
        _this.el.show_all();
        
@@ -107,52 +107,61 @@ public class Ticket : Object
     
        _this.spinner.el.show();
        _this.spinner.el.start();       
-       
-     
-       
-       this.running  = true;
-       //GitMonitor.gitmonitor.stop();
-       
-        this.repo = repo;
-        
-        
-        
-        this.el.set_keep_above(true);    
+       this.el.set_keep_above(true);    
        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"); 
-         
-    
+       
+       GLib.debug("Showing dialog?"); 
+        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) {
-     
+               //GitMonitor.gitmonitor.stop();
                
-               var rt = RooTicket.singleton();
-               rt.loadProjectOptions(curproj.id);
+               this.repo = repo;
                
-               _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 = ""
-        
+               
+               
+       //    GLib.debug("Loading tickets")
+                
     
-        this.el.table.el.show();
-        this.el.table.el.hide();
     
-       
+               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();
+        
+    
+          
+    
+        
+               
+               return false;
+       });
        this.el.run();
+       
     
     }
     public class Xcls_Box2 : Object