Changeset 485
- Timestamp:
- Dec 4, 2009 5:06:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsascmds.tcl
- Property rcs:date changed from 2001/10/31 20:07:41 to 2001/11/07 18:22:57
- Property rcs:lines changed from +22 -30 to +27 -12
- Property rcs:rev changed from 1.40 to 1.41
r479 r485 1337 1337 set file $expnam.O$num 1338 1338 file rename -force $expgui(expfile) $file 1339 exec echo "\n----------------------------------------------" >> $expnam.LST 1340 exec echo " Archiving [file tail $expnam.EXP] as [file tail $file]" >> $expnam.LST 1341 exec echo "----------------------------------------------\n" >> $expnam.LST 1339 set fp [open $expnam.LST a+] 1340 puts $fp "\n----------------------------------------------" 1341 puts $fp " Archiving [file tail $expnam.EXP] as [file tail $file]" 1342 puts $fp "----------------------------------------------\n" 1343 close $fp 1342 1344 } errmsg 1343 1345 if {$errmsg != ""} { … … 1429 1431 } 1430 1432 1433 1434 # rename file current to suggested, 1435 # delete window if supplied 1436 # use parent, if supplied or . 1437 proc RenameAsFile {current suggested "window {}" "parent {}"} { 1438 if {$parent == "" && $window != ""} {set parent $window} 1439 if {$parent == ""} {set parent .} 1440 set newfile [tk_getSaveFile -initialfile $suggested -parent $parent] 1441 if {$newfile == ""} return 1442 file rename -force $current $newfile 1443 if {$window != ""} {destroy $window} 1444 } 1431 1445 1432 1446 # optionally run disagl as a windowless process, w/results in a separate window … … 1481 1495 -command "destroy .disagl; file delete $root.tmp"] \ 1482 1496 -column 3 -row 0 -sticky e 1483 grid [button .disagl.f.rename -text "Close & Save as .DIS" \ 1484 -command "destroy .disagl; file rename -force $root.tmp $root.DIS"] \ 1497 grid [button .disagl.f.rename \ 1498 -command "RenameAsFile $root.tmp $root.DIS .disagl" \ 1499 -text "Close & Save as..."] \ 1485 1500 -column 4 -row 0 -sticky e 1486 1501 # allow font changes on the fly … … 2057 2072 global expmap expgui 2058 2073 for {set i 1} {$i <= $expmap(nhst)} {incr i} { 2059 if {[string range $expmap(htype_$i) 0 0] == "P"} {2074 # if {[string range $expmap(htype_$i) 0 0] == "P"} { 2060 2075 set expgui(useflag_$i) [histinfo $i use] 2061 }2076 # } 2062 2077 } 2063 2078 } … … 2091 2106 } 2092 2107 incr row 2093 if {[string range $expmap(htype_$i) 0 0] == "P"} {2108 # if {[string range $expmap(htype_$i) 0 0] == "P"} { 2094 2109 grid [checkbutton $sbox.$i -text $i -variable expgui(useflag_$i)] -row $row -col 0 2095 2110 set expgui(useflag_$i) [histinfo $i use] 2096 }2111 # } 2097 2112 grid [label $bbox.0$i \ 2098 -text [string range $expmap(htype_$i) 13] \2113 -text [string range $expmap(htype_$i) 0 3] \ 2099 2114 ] -row $row -col 0 -padx $px 2100 2115 grid [label $bbox.1$i -text [histinfo $i bank] \ … … 2115 2130 set prevchages $expgui(changed) 2116 2131 for {set i 1} {$i <= $expmap(nhst)} {incr i} { 2117 if {[string range $expmap(htype_$i) 0 0] == "P"} {2132 # if {[string range $expmap(htype_$i) 0 0] == "P"} { 2118 2133 if {$expgui(useflag_$i) != [histinfo $i use]} { 2119 2134 histinfo $i use set $expgui(useflag_$i) 2120 2135 incr expgui(changed) 2121 2136 } 2122 }2137 # } 2123 2138 } 2124 2139 if {$prevchages != $expgui(changed)} {
Note: See TracChangeset
for help on using the changeset viewer.