1
0
Fork 0

from the cosmetics department ...

This commit is contained in:
mfranz 2006-05-25 18:12:52 +00:00
parent ae4ac0ea2d
commit d01ec5042b

View file

@ -44,7 +44,7 @@
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script>selected()</script> <script>select()</script>
</binding> </binding>
</property-list> </property-list>
@ -52,6 +52,8 @@
<layout>hbox</layout> <layout>hbox</layout>
<default-padding>2</default-padding> <default-padding>2</default-padding>
<empty><whatever/></empty>
<text> <text>
<label>--</label> <label>--</label>
<live>true</live> <live>true</live>
@ -90,6 +92,8 @@
var node = nil; # selected node entry (props.Node) var node = nil; # selected node entry (props.Node)
var dir = nil; # current directory (string) var dir = nil; # current directory (string)
var update_interval = 2; var update_interval = 2;
var root_title = "Internal Properties";
var no_selection = "[none]";
update = func(w) { update = func(w) {
fgcommand("dialog-update", props.Node.new({"object-name": w, fgcommand("dialog-update", props.Node.new({"object-name": w,
@ -105,7 +109,7 @@
return l ~ "..." ~ r; return l ~ "..." ~ r;
} }
selected = func { select = func {
var lst = list.getValue(); var lst = list.getValue();
node = props.globals.getNode(lst); node = props.globals.getNode(lst);
if (node == nil) { if (node == nil) {
@ -113,9 +117,9 @@
} }
if (size(node.getChildren())) { if (size(node.getChildren())) {
dir = node.getPath(); dir = node.getPath();
title.setValue(node.getPath() == "" ? "Internal Properties" : lst); title.setValue(node.getPath() == "" ? root_title : lst);
node = nil; node = nil;
label.setValue(" --"); label.setValue(no_selection);
input.setValue(""); input.setValue("");
} else { } else {
var name = node.getName(); var name = node.getName();
@ -158,7 +162,7 @@
dir = dlg.getNode("last") != nil ? dlg.getNode("last").getValue() : "/"; dir = dlg.getNode("last") != nil ? dlg.getNode("last").getValue() : "/";
list.setValue(dir); list.setValue(dir);
selected(); select();
auto_update(); auto_update();
</open> </open>