NewBranch.bjs
[gitlive] / Ticket.vala
index 4ab9edc..9857b7f 100644 (file)
@@ -67,8 +67,22 @@ public class Ticket : Object
                        return;
                }
                 
-               return; 
                 
+               var tid = RooTicket.singleton().createTicket(
+               
+                       _this.project_id.selectedProjectId(),
+               
+                       _this.milestone_id.selectedMilestoneId(),
+                       _this.priority_id.selectedPriorityId() ,
+                       _this.classification_id.selectedClassificationId() ,
+                       _this.developer_id.selectedDeveloperId(),
+                       _this.summary.el.get_text() ,
+                       _this.description.el.buffer.text 
+               );
+               
+               if (this.repo != null) {
+                       NewBranch.singleton().show(this.repo, new Gee.ArrayList<GitMonitorQueue>(), tid);
+               }
                 
         
                 
@@ -938,7 +952,7 @@ public class Ticket : Object
          
          
                this.el.get_active_iter (out iter);
-               _this.prmodel.el.get_value (iter, 0, out val1);
+               _this.clmodel.el.get_value (iter, 0, out val1);
          
         
                return  (string) val1;
@@ -1166,33 +1180,33 @@ public class Ticket : Object
                var invalid = false;
                
                // validate first...
-               _this.project_id.el.get_style_context().remove_class("warning");        
+               _this.project_id.el.get_child().get_style_context().remove_class("warning");    
                if (_this.project_id.selectedProjectId() == "") {
-                       _this.project_id.el.get_style_context().add_class("warning");
+                       _this.project_id.el.get_child().get_style_context().add_class("warning");
                        invalid = true;
                }
                
-               _this.milestone_id.el.get_style_context().remove_class("warning");      
+               _this.milestone_id.el.get_child().get_style_context().remove_class("warning");  
                if (_this.milestone_id.selectedMilestoneId() == "") {
-                       _this.milestone_id.el.get_style_context().add_class("warning");
+                       _this.milestone_id.el.get_child().get_style_context().add_class("warning");
                        invalid = true;
                }
             
-               _this.priority_id.el.get_style_context().remove_class("warning");       
+               _this.priority_id.el.get_child().get_style_context().remove_class("warning");   
                if (_this.priority_id.selectedPriorityId() == "") {
-                       _this.priority_id.el.get_style_context().add_class("warning");
+                       _this.priority_id.el.get_child().get_style_context().add_class("warning");
                        invalid = true;
                }
                
-               _this.classification_id.el.get_style_context().remove_class("warning"); 
+               _this.classification_id.el.get_child().get_style_context().remove_class("warning");     
                if (_this.classification_id.selectedClassificationId() == "") {
-                       _this.classification_id.el.get_style_context().add_class("warning");
+                       _this.classification_id.el.get_child().get_style_context().add_class("warning");
                        invalid = true;
                }
                
-               _this.developer_id.el.get_style_context().remove_class("warning");      
+               _this.developer_id.el.get_child().get_style_context().remove_class("warning");  
                if (_this.developer_id.selectedDeveloperId() == "") {
-                       _this.developer_id.el.get_style_context().add_class("warning");
+                       _this.developer_id.el.get_child().get_style_context().add_class("warning");
                        invalid = true;
                }
                
@@ -1202,9 +1216,9 @@ public class Ticket : Object
                        invalid = true;
                }
                
-               _this.summary.el.get_style_context().remove_class("warning");   
-               if (_this.summary.el.buffer.text == "") {
-                       _this.summary.el.get_style_context().add_class("warning");
+               _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;
                }
                
@@ -1212,6 +1226,7 @@ public class Ticket : Object
                if (invalid) {
                        return;
                }
+               GLib.debug("for is valid");
                
                _this.el.response(1);
             });