Changeset 838
- Timestamp:
- Dec 4, 2009 5:12:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 2004/10/04 16:20:26 to 2005/03/24 21:45:48
- Property rcs:lines changed from +71 -177 to +54 -9
- Property rcs:rev changed from 1.75 to 1.76
r823 r838 179 179 SetTkDefaultOptions $expgui(font) 180 180 #--------------------------------------------------------------------------- 181 set expgui(resize) 0 181 182 # platform-specific code 182 183 if {$tcl_platform(platform) == "windows" \ … … 233 234 -icon warning -type {"Limp Ahead"} -default "Limp Ahead" \ 234 235 -helplink "expguierr.html NoPGPLOT" 236 set expgui(resize) 1 235 237 } 236 238 #--------------------------------------------------------------------------- … … 244 246 # -helplink "expguierr.html OpenErr" 245 247 set expgui(expfile) {} 248 set expgui(resize) 1 246 249 } elseif {[string first " " [file dirname $expgui(expfile)]] != -1} { 247 250 update … … 250 253 -icon warning -type Continue -default continue 251 254 # -helplink "expguierr.html OpenErr" 255 set expgui(resize) 1 252 256 } elseif ![file exists $expgui(expfile)] { 253 257 update … … 259 263 ] 260 264 if {[string tolower $ans] != "create"} {set expgui(expfile) {}} 261 } 262 }263 set expgui(resize) 0 265 set expgui(resize) 1 266 } 267 } 264 268 if {$expgui(expfile) == ""} { 265 269 # center the parent window because the getExpFileName window … … 422 426 set entryvar(cycles) [expinfo cycles] 423 427 set entrycmd(cycles) "expinfo cycles" 428 set entryvar(mbw) [expinfo mbw] 429 set entrycmd(mbw) "expinfo mbw" 424 430 # set expgui(globalmode) 0 425 431 set expgui(printopt) "Print Options ([expinfo print])" … … 611 617 tk_dialog .about {About...} \ 612 618 "EXPGUI\n\ 613 Jonathan Wasserman andBrian Toby\n\619 Brian Toby\n\ 614 620 NIST Center for Neutron Research\n\n\ 615 2000,Not subject to copyright\n\n\621 Not subject to copyright\n\n\ 616 622 Revision [lindex $expgui(Revision) 1] (readexp.tcl [lindex $expmap(Revision) 1])\n\n\ 617 623 Cite: B. H. Toby, EXPGUI, a graphical\n\ … … 635 641 \"General Structure Analysis System (GSAS)\",\n\ 636 642 Los Alamos National Laboratory Report\n\ 637 LAUR 86-748 (200 0)." \643 LAUR 86-748 (2004)." \ 638 644 info 0 OK 639 645 } … … 968 974 } elseif {$type == 4} { 969 975 set expgui(phasetype) "Macromolecular" 976 } elseif {$type == 10} { 977 set expgui(phasetype) "Pawley" 970 978 } else { 971 979 set expgui(phasetype) "" … … 1036 1044 proc DisplayAllAtoms {curPhase "mode reset"} { 1037 1045 global entryvar entrycmd expmap expgui 1046 # make sure that atomlistboxcontents element exists 1047 if {[catch {set expmap(atomlistboxcontents)}]} { 1048 set expmap(atomlistboxcontents) {} 1049 } 1038 1050 # if it does not show, we don't have a phase or we are already displaying 1039 1051 # don't bother … … 1324 1336 proc editOneRecord { AtomIndex } { 1325 1337 global expmap expgui 1338 # make sure that atomlistboxcontents element exists 1339 if {[catch {set expmap(atomlistboxcontents)}]} return 1340 1326 1341 # get atom number & phase 1327 1342 set tuple [lindex $expmap(atomlistboxcontents) $AtomIndex] … … 1338 1353 proc editMultipleRecords { AtomIndexList } { 1339 1354 global expmap expgui 1355 # make sure that atomlistboxcontents element exists 1356 if {[catch {set expmap(atomlistboxcontents)}]} return 1357 1340 1358 set numberList {} 1341 1359 # current phase … … 2151 2169 } 2152 2170 mapexp 2171 # reset the phase selection 2172 set expgui(curPhase) {} 2153 2173 } 2154 2174 … … 2324 2344 set ind -1 2325 2345 set htype [string range $expmap(htype_$hist) 2 2] 2346 set zflag 0 2347 if {$htype == "C"} { 2348 set zflag [histinfo $hist zref] 2349 } 2326 2350 foreach i $expmap(phaselist_$hist) { 2327 2351 incr ind … … 2381 2405 set entrycmd(pterm${num}_$i) "hapinfo $hist $i pterm$num" 2382 2406 set entryvar(pterm${num}_$i) [hapinfo $hist $i pterm$num] 2407 # disable trns & shft when zero is refined 2408 if {$zflag && ($term == "trns" || $term == "shft")} { 2409 if {$entryvar(pref${num}_$i)} { 2410 incr expgui(changed) 2411 set entryvar(pref${num}_$i) 0 2412 } 2413 $ProfileFrame.l${num}_${i} config -fg gray 2414 $ProfileFrame.ref${num}_${i} config -state disabled 2415 $ProfileFrame.ent${num}_${i} config -fg gray 2416 } 2383 2417 if {$col > 6} {set col -1; incr row} 2384 2418 } … … 3841 3875 8 "Print summary shift/esd data after last cycle" 3842 3876 9 "Print zero/unit pole figure constraint terms" 3877 10 "Output parameter name, value & esd to file" 3843 3878 } 3844 3879 pack [frame $expgui(lsFrame).hs -class HistList] \ … … 3894 3929 ] -row $row -column 0 -columnspan 2 3895 3930 menu $expgui(lsFrame).f1.lprint.menu 3896 foreach num [lsort [array names printopts]] {3931 foreach num [lsort -integer [array names printopts]] { 3897 3932 $expgui(lsFrame).f1.lprint.menu add checkbutton \ 3898 3933 -label "$printopts($num) ([expr int(pow(2,$num))])"\ 3899 3934 -variable entryvar(printopt$num) 3900 3935 } … … 3909 3944 -from 1.0 -to 9.99 -showvalue 0 -command SetMarq -resolution 0.01 \ 3910 3945 -variable expgui(marq)] -row 1 -column 1 3946 3947 incr row 3948 grid [frame $expgui(lsFrame).f1.d -bd 4 -relief groove] \ 3949 -row $row -column 2 -sticky ew 3950 grid [label $expgui(lsFrame).f1.d.lmbw -text "LS matrix bandwidth"] -row 0 -column 0 3951 grid [entry $expgui(lsFrame).f1.d.embw -width 4 \ 3952 -textvariable entryvar(mbw)] -row 0 -column 1 3953 set entrybox(mbw) $expgui(lsFrame).f1.d.embw 3911 3954 3912 3955 incr row … … 3973 4016 set expgui(convlbl) [format %5.2f [expr pow(10,$expgui(convg)/100.)]] 3974 4017 set expgui(marq) [set expgui(marqinit) [expinfo marq]] 4018 set expgui(mbw) [set expgui(mbwinit) [expinfo mbw]] 3975 4019 } 3976 4020 proc SetConv {x} { … … 4262 4306 # this appears to be needed by OSX 4263 4307 update 4264 wm geom . [winfo reqwidth .]x[winfo reqheight .] 4308 #wm geom . [winfo reqwidth .]x[winfo reqheight .] 4309 wm geom . {} 4265 4310 # center the EXPGUI window 4266 4311 wm withdraw .
Note: See TracChangeset
for help on using the changeset viewer.