Changeset 2271 for rat/trunk/ui_audiotool.tcl
- Timestamp:
- 03/07/99 20:54:38 (14 years ago)
- Files:
-
- 1 modified
-
rat/trunk/ui_audiotool.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rat/trunk/ui_audiotool.tcl
r2260 r2271 2023 2023 2024 2024 proc load_setting {attrname field var default} { 2025 global V win32 $var2026 upvar 1 $attrname attr2025 global V win32 $var 2026 upvar 1 $attrname attr 2027 2027 set fail 0 2028 # who has the tcl manual? is the only way to pass arrays thru upvar...2028 # who has the tcl manual? is the only way to pass arrays thru upvar... 2029 2029 if {$win32} { 2030 2030 if {[string first "rtp" "$field"] == -1} { … … 2039 2039 puts "$field $var $tmp" 2040 2040 } 2041 } else {2041 } else { 2042 2042 set tmp [option get . $field rat] 2043 2043 if {$tmp == ""} { 2044 # not in xresources...2044 # not in xresources... 2045 2045 if {[info exists attr($field)]} { 2046 set tmp $attr($field)2046 set tmp $attr($field) 2047 2047 } 2048 2048 } 2049 }2050 if {$tmp == ""} {2049 } 2050 if {$tmp == ""} { 2051 2051 # either not in rtp defaults, or registry... 2052 set tmp $default2053 }2054 set $var $tmp2052 set tmp $default 2053 } 2054 set $var $tmp 2055 2055 } 2056 2056 … … 2074 2074 set f [open $rtpfname] 2075 2075 while {[eof $f] == 0} { 2076 gets $f line2077 set field [string trim [lindex $line 0] "*:"]2078 set value [lrange $line 1 end]2079 set attr($field) "$value"2076 gets $f line 2077 set field [string trim [lindex $line 0] "*:"] 2078 set value [lrange $line 1 end] 2079 set attr($field) "$value" 2080 2080 } 2081 2081 close $f … … 2094 2094 global audio_tool 2095 2095 if {[tool_version $audio_tool] != [tool_version $TOOL($my_cname)]} { 2096 puts "New version of tool ([tool_version $audio_tool]), resetting preferences" 2096 2097 foreach i [array names attr audio*] { 2097 2098 unset attr($i)
