Changeset 388


Ignore:
Timestamp:
Dec 4, 2009 5:05:20 PM (14 years ago)
Author:
toby
Message:

# on 2001/05/11 16:10:22, toby did:
button to display gzip'ed input files on Unix (on expnam)
change in location of PGPLOT font file in Windows
GSAS env var for UNIX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsascmds.tcl

    • Property rcs:date changed from 2001/04/17 22:49:47 to 2001/05/11 16:10:22
    • Property rcs:lines changed from +20 -223 to +27 -7
    • Property rcs:rev changed from 1.31 to 1.32
    r384 r388  
    16681668#------------------------------------------------------------------------------
    16691669proc getExpFileName {mode} {
    1670     global expgui
     1670    global expgui tcl_platform
    16711671    set frm .file
    16721672    catch {destroy $frm}
     
    16851685    pack [radiobutton $frmC.0 -text "Mod. Date" -value 0 \
    16861686            -variable expgui(filesort) -command "ChooseExpFil $frmA"] -side top
     1687
     1688    set expgui(includearchived) 0
     1689    if {$tcl_platform(platform) == "unix" && $mode == "old"} {
     1690        pack [checkbutton $frmC.ar -text "Include Archived Files" \
     1691                -variable expgui(includearchived) \
     1692                -command "ChooseExpFil $frmA"] -side top -pady 10
     1693    }
    16871694    pack [button $frmC.b -text Read \
    16881695            -command "valid_exp_file $frmA $mode"] -side bottom
     
    17411748        append expgui(FileMenuEXPNAM) ".EXP"
    17421749    }
    1743     # flag files that end in something other than .EXP .exp or .Exp...
    1744     if {[string toupper [file extension $expgui(FileMenuEXPNAM)]] != ".EXP"} {
     1750    # check for archive files
     1751    if {([string match {*.EXP.[0-9][0-9][0-9].gz} $expgui(FileMenuEXPNAM)] || \
     1752            [string match {*.EXP.[0-9][0-9][0-9]} $expgui(FileMenuEXPNAM)]) && \
     1753            $tcl_platform(platform) == "unix" && \
     1754            $mode == "old" && [file exists $expgui(FileMenuEXPNAM)]} {
     1755        destroy .file
     1756        return
     1757    } elseif {[string toupper [file extension $expgui(FileMenuEXPNAM)]] != ".EXP"} {
     1758        # check for files that end in something other than .EXP .exp or .Exp...
    17451759        MyMessageBox -parent . -title "File Open Error" \
    17461760                -message "File [file tail $expgui(FileMenuEXPNAM)] is not a valid name. Experiment files must end in \".EXP\"" \
     
    17581772        ]
    17591773        if {[string tolower $ans] == "overwrite"} {destroy .file}
    1760 #       if $ans {destroy .file}
    17611774        return
    17621775    }
     
    19151928            set modified [file mtime $file]
    19161929            lappend pairlist [list $file $modified]
     1930        } elseif {![file isdirectory $file] && $expgui(includearchived) && \
     1931                ([string match {*.EXP.[0-9][0-9][0-9].gz} $file] ||\
     1932                [string match {*.EXP.[0-9][0-9][0-9]} $file])} {
     1933            set modified [file mtime $file]
     1934            lappend pairlist [list $file $modified]
    19171935        }
    19181936    }
     
    19872005        set env(GSAS) [file nativename $expgui(gsasdir)]
    19882006        # PGPLOT_FONT is needed by PGPLOT
    1989         set env(PGPLOT_FONT) [file nativename [file join $expgui(gsasdir) fonts grfont.dat]]
     2007        set env(PGPLOT_FONT) [file nativename [file join $expgui(gsasdir) pgl grfont.dat]]
    19902008        # this is the number of lines/page in the .LST (etc.) file
    19912009        set env(LENPAGE) 60
     
    20512069        set env(GSAS) [file nativename $expgui(gsasdir)]
    20522070        # PGPLOT_FONT is needed by PGPLOT
    2053         set env(PGPLOT_FONT) [file nativename [file join $expgui(gsasdir) fonts grfont.dat]]
     2071        set env(PGPLOT_FONT) [file nativename [file join $expgui(gsasdir) pgl grfont.dat]]
    20542072        # this is the number of lines/page in the .LST (etc.) file
    20552073        set env(LENPAGE) 60
     
    20962114        global env expgui
    20972115        # UNIX environment variables
     2116        set env(GSAS) [file nativename $expgui(gsasdir)]
     2117        set env(gsas) [file nativename $expgui(gsasdir)]
    20982118        set env(GSASEXE) $expgui(gsasexe)
    20992119        set env(ATOMDATA) [file join $expgui(gsasdir) data atmdata.dat]
Note: See TracChangeset for help on using the changeset viewer.