sync
[gitlive] / NewBranch.vala
index 95238c6..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,6 +736,18 @@ public class NewBranch : Object
         }
 
         // user defined functions
+        public void updateState () {
+        
+               var ticket_id = _this.ticketsel.selectedTicketId();
+               
+               if (ticket_id == "") {
+                       this.el.set_sensitive(false);
+                       return;
+               }
+         
+               this.el.set_sensitive(true);
+         
+        }
     }
 
     public class Xcls_Box16 : Object