revert code that did not affect memory
[gitlive] / Ticket.vala
index 8d15130..8154ad7 100644 (file)
@@ -110,25 +110,17 @@ public class Ticket : Object
        _this.spinner.el.start();       
        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..
+       this.el.set_default_size( 500,100); // not sure why it grows..
        
        GLib.debug("Showing dialog?"); 
         Timeout.add_seconds(1, () => {
                
-               
-               
-    
+                
                //GitMonitor.gitmonitor.stop();
                
                this.repo = repo;
                
-               
-               
-               
-       //    GLib.debug("Loading tickets"); 
                 
-    
-    
                RooProject? curproj = null;
                if (this.repo != null) {
                        curproj = RooProject.getProjectByRepo(this.repo);
@@ -153,12 +145,8 @@ public class Ticket : Object
                _this.spinner.el.hide();        
     
                this.table.el.show();
-        
-    
-          
-    
-        
-               
+           _this.summary.el.grab_focus();
+     
                return false;
        });
        this.el.run();
@@ -1169,17 +1157,16 @@ public class Ticket : Object
                    _this.developer_id.el.set_active_iter(iter);
            // }
             
-            var projects = rt.developers;
-            foreach(var project in projects) {
+            var peps = rt.developers;
+            foreach(var p in peps) {
             
                 el.append(out iter);
                 
-                el.set_value(iter, 0, project.id);
-                el.set_value(iter, 1,  project.display_name );
-        //        if (id == project.id) {
-               //         _this.projectsel.el.set_active_iter(iter);
-        //         }   
-                
+                el.set_value(iter, 0, p.id);
+                el.set_value(iter, 1,  p.display_name );
+                if (rt.authuser_id == p.id) {
+                          _this.developer_id.el.set_active_iter(iter);
+                   }   
             }
          
             _this.developer_id.loading = false;
@@ -1229,10 +1216,6 @@ public class Ticket : Object
                }
                
                _this.milestone_id.el.get_child().get_style_context().remove_class("warning");  
-               if (_this.milestone_id.selectedMilestoneId() == "") {
-                       _this.milestone_id.el.get_child().get_style_context().add_class("warning");
-                       invalid = true;
-               }
             
                _this.priority_id.el.get_child().get_style_context().remove_class("warning");   
                if (_this.priority_id.selectedPriorityId() == "") {
@@ -1259,12 +1242,7 @@ public class Ticket : Object
                }
                
                _this.description.el.get_style_context().remove_class("warning");       
-               if (_this.description.el.buffer.text == "") {
-                       _this.description.el.get_style_context().add_class("warning");
-                       invalid = true;
-               }
-               
-               
+             
                if (invalid) {
                        return;
                }