X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=NewBranch.vala;h=fbf036ddfc3c091b0f61f3ccf22dc2860518676a;hb=refs%2Fheads%2Fwip_alan_T5725_disable_create_branch_until_ticket;hp=95238c65f9de4ca07b543618ce6075c788cba1eb;hpb=1801038b6159919055bbd74be960a8a9203f316b;p=gitlive diff --git a/NewBranch.vala b/NewBranch.vala index 95238c65..fbf036dd 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -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