projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4078296
)
NewBranch.bjs
author
Alan Knowles
<alan@roojs.com>
Wed, 13 Feb 2019 06:27:04 +0000
(14:27 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 13 Feb 2019 06:27:04 +0000
(14:27 +0800)
NewBranch.vala
NewBranch.bjs
patch
|
blob
|
history
NewBranch.vala
patch
|
blob
|
history
diff --git
a/NewBranch.bjs
b/NewBranch.bjs
index
d70e8dd
..
a247699
100644
(file)
--- a/
NewBranch.bjs
+++ b/
NewBranch.bjs
@@
-154,7
+154,7
@@
},
"label" : "Create Branch",
"id" : "createbtn",
},
"label" : "Create Branch",
"id" : "createbtn",
- "| void updateState" : "() {\n\n\
nif (_this.actionsel.selectedAction() == \"\") {\n\t\t// need to select an action..\n\t\tthis.el.set_sensitive(false);\n\t\treturn;\n\t\n\t\n\t}\n\t\tthis.el.set_sensitive(true);\n\t\treturn;
\n}\n",
+ "| void updateState" : "() {\n\n\
tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\n\tif (ticket_id == \"\") {\n\t\tthis.el.set_sensitive(false);\n\t\treturn;\n\t}\n \n\tthis.el.set_sensitive(true);\n
\n}\n",
"* init" : "{\n this.el.get_style_context().add_class(\"suggested-action\");\n}\n",
"xtype" : "Button",
"* pack" : "attach_defaults,4,5,4,5",
"* init" : "{\n this.el.get_style_context().add_class(\"suggested-action\");\n}\n",
"xtype" : "Button",
"* pack" : "attach_defaults,4,5,4,5",
diff --git
a/NewBranch.vala
b/NewBranch.vala
index
16ba8ca
..
0391249
100644
(file)
--- a/
NewBranch.vala
+++ b/
NewBranch.vala
@@
-738,16
+738,15
@@
public class NewBranch : Object
// user defined functions
public void updateState () {
// user defined functions
public void updateState () {
-
- if (_this.actionsel.selectedAction() == "") {
- // need to select an action..
+ var ticket_id = _this.ticketsel.selectedTicketId();
+
+ if (ticket_id == "") {
this.el.set_sensitive(false);
return;
this.el.set_sensitive(false);
return;
-
-
}
}
- this.el.set_sensitive(true);
- return;
+
+ this.el.set_sensitive(true);
+
}
}
}
}