Changeset 485


Ignore:
Timestamp:
Dec 4, 2009 5:06:57 PM (11 years ago)
Author:
toby
Message:

# on 2001/11/07 18:22:57, toby did:
remove echo in archive
add get file name for DISAGL/save
support histogram flags for all types of histograms

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  
    13371337        set file $expnam.O$num
    13381338        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
    13421344    } errmsg
    13431345    if {$errmsg != ""} {
     
    14291431}
    14301432
     1433
     1434# rename file current to suggested,
     1435#   delete window if supplied
     1436#   use parent, if supplied or .
     1437proc 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}
    14311445
    14321446# optionally run disagl as a windowless process, w/results in a separate window
     
    14811495                -command "destroy .disagl; file delete $root.tmp"] \
    14821496                -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..."] \
    14851500                -column 4 -row 0 -sticky e
    14861501        # allow font changes on the fly
     
    20572072    global expmap expgui
    20582073    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"} {
    20602075            set expgui(useflag_$i) [histinfo $i use]
    2061         }
     2076#       }
    20622077    }
    20632078}
     
    20912106        }
    20922107        incr row
    2093         if {[string range $expmap(htype_$i) 0 0] == "P"} {
     2108#       if {[string range $expmap(htype_$i) 0 0] == "P"} {
    20942109            grid [checkbutton $sbox.$i -text $i -variable expgui(useflag_$i)] -row $row -col 0
    20952110            set expgui(useflag_$i) [histinfo $i use]
    2096         }
     2111#       }
    20972112        grid [label $bbox.0$i \
    2098                 -text [string range $expmap(htype_$i) 1 3] \
     2113                -text [string range $expmap(htype_$i) 0 3] \
    20992114                ] -row $row -col 0 -padx $px
    21002115        grid [label $bbox.1$i -text [histinfo $i bank] \
     
    21152130    set prevchages $expgui(changed)
    21162131    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"} {
    21182133            if {$expgui(useflag_$i) != [histinfo $i use]} {
    21192134                histinfo $i use set $expgui(useflag_$i)
    21202135                incr expgui(changed)
    21212136            }
    2122         }
     2137#       }
    21232138    }
    21242139    if {$prevchages != $expgui(changed)} {
Note: See TracChangeset for help on using the changeset viewer.