1
0
Fork 0

- allow to hide views from this dialog by setting <hide type="bool">true</hide>

- deal better with (broken!) nameless views
This commit is contained in:
mfranz 2007-12-13 13:57:23 +00:00
parent 92fdbe3f1b
commit 961e91520d

View file

@ -20,6 +20,8 @@
group.removeChildren("text");
var mode = 0;
foreach (var v; view.views) {
if ((var hide = v.getNode("hide")) != nil and hide.getBoolValue())
continue;
var index = v.getIndex();
if (index >= 200) {
if (mode != 2) {
@ -44,7 +46,8 @@
var target = group.getChild("checkbox", index, 1);
props.copy(group.getNode("checkbox-template"), target);
target.getNode("label").setValue(v.getNode("name").getValue());
var name = v.getNode("name");
target.getNode("label").setValue(name != nil ? name.getValue() : ("** unnamed view " ~ index ~ " **"));
target.getNode("property").setValue(v.getPath() ~ "/enabled");
}
</open>