diff --git a/tcl/startup/hdb.tcl b/tcl/startup/hdb.tcl index 953c397..ec44dfa 100644 --- a/tcl/startup/hdb.tcl +++ b/tcl/startup/hdb.tcl @@ -91,9 +91,13 @@ proc hdbItem {path title} { set buttons [silent "" hgetpropval $path buttons] set val "" if {[string match "run *" $cmd]} { - set val [silent "" hgetpropval $path target] - set cmd2 [string range $cmd 4 end] - set val [silent $val result $cmd2 target] + set cmd2 [string range $cmd 4 end] + if {[silent 0 hgetpropval $path visible] eq "readonly"} { + set val [silent "" hvali $path] + } else { + # set val [silent "" hgetpropval $path target] + set val [silent $val result $cmd2 target] + } clientput "-P" } elseif {$type eq "func"} { clientput "-T$title" @@ -118,10 +122,20 @@ proc hdbItem {path title} { set priv internal clientput "-P" } + set fmtstr [silent "" hgetpropval $path fmtstr] + if {$fmtstr ne ""} { + set val [format $fmtstr $val] + } + if {[silent "" hgetpropval $path visible] eq "readonly"} { + set priv internal + } switch $priv { user - spy { set val [silent $val hgetpropval $path requested] set val [silent $val hgetpropval $path secoprequested] + #if {$fmtstr ne ""} { + # set val [format $fmtstr $val] + #} set enum [silent "" hgetpropval $path enum] if {$enum eq ""} { # experimental @@ -293,6 +307,8 @@ proc nodeVisible {path {key visible}} { set vis [silent true hgetpropval $path $key] if {$vis eq "expert"} { return [info exists shown_groups(expertMode)] + } elseif {$vis eq "readonly"} { + return 1 } return $vis } @@ -306,7 +322,9 @@ proc hdbLayout {path} { # clientput "L $path G $group [nodeVisible $path groupMode]" if {! [string equal 0 $group] && [nodeVisible $path groupMode]} { lassign [split $path /] _ obj - if {![string match *$obj* $group]} { + if {[string tolower $obj] eq $group} { + set group $obj + } elseif {![string match *$obj* $group]} { set group "$group \[$obj\]" } clientput "-T$group"