sync
[gitlive] / NewBranch.vala
index 146d36b..fbf036d 100644 (file)
@@ -489,7 +489,7 @@ public class NewBranch : Object
                        _this.view.loadTicket("");              
                        
                        this.el.get_child().get_style_context().add_class("warning");
-                       
+                       _this.createbtn.updateState();
                        return;
                }
                
@@ -736,10 +736,17 @@ public class NewBranch : Object
         }
 
         // user defined functions
-        public return_type XXXX updateState() {
-        
-        
+        public void updateState () {
         
+               var ticket_id = _this.ticketsel.selectedTicketId();
+               
+               if (ticket_id == "") {
+                       this.el.set_sensitive(false);
+                       return;
+               }
+         
+               this.el.set_sensitive(true);
+         
         }
     }