home *** CD-ROM | disk | FTP | other *** search
-
- # Any directory must have 'folder' somewhere in the comment.
- set pathComments(texPath) "TeX application"
- set pathComments(TeXInputs) "TeX Inputs folder"
- set pathComments(bibtexPath) "BibTeX"
- set pathComments(cdPath) "CodeWarrior Debugger"
- set pathSig(cdPath) "cwdSig"
- set pathComments(cwPath) "CodeWarrior Compiler"
- set pathSig(cwPath) "cwSig"
- set pathComments(excaliburPath) "Excalibur Spellchecker"
- set pathComments(macperlPath) "MacPerl"
- set pathComments(perlFilterPath) "MacPerl Text Filters folder"
- set pathComments(perlLib) "MacPerl lib folder"
- set pathComments(referencePath) "Think Reference"
- set pathComments(tassPath) "Toolbox Assistant"
- set pathComments(kodexPath) "Kodex C Pretty Printer"
- set pathComments(enscriptorPath) "Enscriptor Fancy Printer"
- set pathComments(droppsPath) "DropÑPS"
- set pathComments(symPath) "Symantec Project Manager"
- set pathComments(symDbgPath) "Symantec Debugger"
-
-
-
- set tmp {}
- foreach n [array names pathComments] {
- lappend tmp $pathComments($n)
- }
- menu -n appPaths -m -p pathProc [lsort $tmp]
- unset tmp
-
-
- #===============================================================================
-
- proc pathProc {menu comment} {
- global pathComments modifiedVars pathSig
-
- foreach path [array names pathComments] {
- if {$pathComments($path) == $comment} {
- global $path
- if {[info exists $path]} {
- set res [buttonAlert "$pathComments($path):\r[set $path]" OK Change Remove]
- } else {
- set res [buttonAlert "'$path' not set:" OK Set Remove]
- }
- switch $res {
- "Set" "-"
- "Change" { if {[regexp -nocase {.*folder.*} $pathComments($path)]} {
- set $path [get_directory -p "Select $pathComments($path):"]
- } else {
- set $path [getfile "Select $pathComments($path):"]
- }
-
- lappend modifiedVars $path
- if {[info exists pathSig($path)]} {
- global $pathSig($path)
- set $pathSig($path) [getFileSig [set $path]]
- lappend modifiedVars $pathSig($path)
- }
- }
- "Remove" { set $path {} }
- }
- return
- }
- }
- }
-