Changeset 908
- Timestamp:
- Dec 4, 2009 5:14:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 2007/01/17 04:21:56 to 2008/04/15 17:15:53
- Property rcs:lines changed from +17 -4 to +85 -19
- Property rcs:rev changed from 1.81 to 1.82
r884 r908 85 85 # default for autoexec load = off 86 86 set expgui(autoexpload) 0 87 # default for execprompt = on 88 set expgui(execprompt) 1 87 89 # default for autostart GRWND = off 88 90 set expgui(autoGRWND) 0 … … 263 265 update 264 266 MyMessageBox -parent . -title "Good luck..." \ 265 -message "You are using a directory with a space in the name ([file dirname $expgui(expfile)]) -- You may encounter bugs in EXPGUI. Please e-mail them to Brian.Toby@ NIST.gov so they can be fixed." \267 -message "You are using a directory with a space in the name ([file dirname $expgui(expfile)]) -- You may encounter bugs in EXPGUI. Please e-mail them to Brian.Toby@ANL.gov so they can be fixed." \ 266 268 -icon warning -type Continue -default continue 267 269 # -helplink "expguierr.html OpenErr" … … 391 393 392 394 mapexp 395 if {$expgui(MacroRunning)} { 396 set expgui(MacroStatus) "?" 397 catch { 398 set expgui(MacroStatus) \ 399 "[expinfo cyclesrun] cycles; Chi2=$expgui(LastChi2); $expgui(LastnVars) vars" 400 } 401 } 402 393 403 set expgui(expModifiedLast) 0 394 404 catch { … … 401 411 wm iconname . [file tail $expfile] 402 412 413 # load current information into EXPGUI pages 414 PaintEXPGUIpages 415 416 # start checking for external changes 417 afterawhile 418 } 419 420 # [re]load all screens with current state of EXPGUI file 421 proc PaintEXPGUIpages {} { 422 global expgui expmap entryvar entrycmd 403 423 # reset the phase buttons 404 424 set expgui(curPhase) "" … … 460 480 # update the histogram list & update the page 461 481 sethistlist 462 463 # start checking for external changes464 afterawhile465 482 } 466 483 … … 568 585 } else { 569 586 catch {$entrybox($elem) config -fg black} 587 RecordMacroEntry "incr expgui(changed); $entrycmd($elem) set [list $entryvar($elem)]" 1 570 588 } 571 589 if {[string match "*atominfo" [lindex $entrycmd($elem) 0]]} { … … 602 620 puts $fp "# EXPGUI saved options from [clock format [clock seconds]]" 603 621 set itemlist {archive asorttype hsorttype filesort disaglSeparateBox \ 604 font autoexpload autoiconify autotick }622 font autoexpload autoiconify autotick execprompt ShowGENLES} 605 623 if {$tcl_platform(os) == "Darwin"} { 606 624 lappend itemlist MacAssignApp … … 631 649 "EXPGUI\n\ 632 650 Brian Toby\n\ 633 NIST Center for Neutron Research\n\n\651 APS, Argonne National Laboratory\n\n\ 634 652 Not subject to copyright\n\n\ 635 653 Revision [lindex $expgui(Revision) 1] (readexp.tcl [lindex $expmap(Revision) 1])\n\n\ … … 873 891 update idletasks 874 892 875 # for windows put the box in the upper left, for876 # unix center it over the parent (in unix it appears later)877 #if {$tcl_platform(platform) == "windows"} {878 #wm geom $w +0+0879 #} else {880 881 893 # compute widths with a catch, since this has been showing an error 882 894 # at least for one Mac user … … 885 897 set askhgt 80 886 898 catch {set askhgt [winfo reqheight $w]} 899 catch { 887 900 # for now, always center the message over the main window 888 901 # center the new window in the middle of the parent … … 892 905 $askhgt/2 - [winfo vrooty .]] 893 906 wm geom $w +$x+$y 894 #}907 } 895 908 wm deiconify $w 896 909 … … 1797 1810 -message "Background function #[histinfo $hist backtype] is no longer supported -- the function will now be changed to type #1 & the values reset" 1798 1811 histinfo $histlist backtype set 1 1812 RecordMacroEntry "histinfo [list $histlist] backtype set 1" 0 1799 1813 incr expgui(changed) 1800 1814 for {set num 1 } { $num <= $terms } { incr num } { 1801 1815 set var "bterm$num" 1802 1816 histinfo $histlist $var set 0 1817 RecordMacroEntry "histinfo [list $histlist] $var set 0" 0 1803 1818 incr expgui(changed) 1804 1819 } 1820 RecordMacroEntry "incr expgui(changed)" 0 1805 1821 } 1806 1822 set expgui(backtypelbl) "Function type [histinfo $hist backtype]" … … 2174 2190 } 2175 2191 SetPhaseFlag $hist $plist 2192 RecordMacroEntry "SetPhaseFlag [list $hist] [list $plist]" 0 2176 2193 incr expgui(changed) 2194 RecordMacroEntry "incr expgui(changed)" 0 2177 2195 # set the powpref warning (1 = suggested) 2178 2196 set expgui(needpowpref) 2 … … 2561 2579 } 2562 2580 expinfo print set $newval 2581 RecordMacroEntry "incr expgui(changed); expinfo print set $newval" 1 2563 2582 set expgui(printopt) "Print Options ([expinfo print])" 2564 2583 } … … 2653 2672 } 2654 2673 hapinfo $histlist $phase extmeth set $expgui(Fextract$phase) 2674 RecordMacroEntry "incr expgui(changed); hapinfo [list $histlist] $phase extmeth set $expgui(Fextract$phase)" 1 2655 2675 incr expgui(changed) 2656 2676 if {$expgui(Fextract$phase) != 0} {set entryvar(fobsextract) 1} … … 2772 2792 if {$expgui(orig_backtype) != $expgui(backtype)} { 2773 2793 histinfo $histlist backtype set $expgui(backtype) 2794 RecordMacroEntry "histinfo [list $histlist] backtype set $expgui(backtype)" 0 2774 2795 incr expgui(changed) 2775 2796 } 2776 2797 if {$expgui(orig_backterms) != $expgui(backterms)} { 2777 2798 histinfo $histlist backterms set $expgui(backterms) 2799 RecordMacroEntry "histinfo [list $histlist] backterms set $expgui(backterms)" 0 2778 2800 incr expgui(changed) 2779 2801 } … … 2782 2804 if {$expgui(orig_$var) != $expgui($var)} { 2783 2805 histinfo $histlist $var set $expgui($var) 2806 RecordMacroEntry "histinfo [list $histlist] $var set $expgui($var)" 0 2784 2807 incr expgui(changed) 2785 2808 } 2786 2809 } 2810 RecordMacroEntry "incr expgui(changed)" 0 2787 2811 2788 2812 if {$expgui(globalmode) == 0} { … … 2912 2936 if {$cmd == "histinfo"} { 2913 2937 histinfo $h $variable set $expgui(temp) 2938 RecordMacroEntry "histinfo $h $variable set $expgui(temp)" 1 2914 2939 incr expgui(changed) 2915 2940 if $expgui(debug) { … … 2918 2943 } elseif {$cmd == "hapinfo"} { 2919 2944 hapinfo $h $phase $variable set $expgui(temp) 2945 RecordMacroEntry "hapinfo $h [list $phase] $variable set $expgui(temp)" 1 2920 2946 incr expgui(changed) 2921 2947 if $expgui(debug) { 2922 puts "hapinfo $ phase $h$variable set $expgui(temp)"2948 puts "hapinfo $h $phase $variable set $expgui(temp)" 2923 2949 } 2924 2950 } else { … … 2926 2952 } 2927 2953 } 2954 RecordMacroEntry "incr expgui(changed)" 0 2928 2955 } 2929 2956 } … … 2997 3024 if {$value != ""} { 2998 3025 hapinfo $histlist $phaselist [lindex $item 0] set $value 3026 RecordMacroEntry "hapinfo [list $histlist] [list $phaselist] [lindex $item 0] set $value" 1 2999 3027 incr expgui(changed) 3028 RecordMacroEntry "incr expgui(changed)" 0 3000 3029 if $expgui(debug) { 3001 3030 puts "hapinfo [list $phaselist] [list $histlist] [lindex $item 0] set $value" … … 3182 3211 3183 3212 histinfo $histlist abstype set $expgui(abstype) 3213 RecordMacroEntry "histinfo [list $histlist] abstype set $expgui(abstype)" 0 3184 3214 histinfo $histlist abscor1 set $expgui(abscor1) 3215 RecordMacroEntry "histinfo [list $histlist] abscor1 set $expgui(abscor1)" 0 3185 3216 if {$expgui(abstype) > 1} { 3186 3217 histinfo $histlist abscor2 set $expgui(abscor2) 3218 RecordMacroEntry "histinfo [list $histlist] abscor2 set $expgui(abscor2)" 0 3187 3219 } else { 3188 3220 histinfo $histlist abscor2 set 0. 3221 RecordMacroEntry "histinfo [list $histlist] abscor2 set 0." 0 3189 3222 } 3190 3223 # turn off refinement, just in case they didn't read … … 3192 3225 && ($flag != 1 && $flag != 5)} { 3193 3226 histinfo $histlist absref set 0 3227 RecordMacroEntry "histinfo [list $histlist] absref set 0" 0 3194 3228 } 3195 3229 incr expgui(changed) 3230 RecordMacroEntry "incr expgui(changed)" 0 3196 3231 destroy $top 3197 3232 } … … 3630 3665 if {[phaseinfo $expgui(curPhase) $var] != $val} { 3631 3666 phaseinfo $expgui(curPhase) $var set $val 3667 RecordMacroEntry "phaseinfo $expgui(curPhase) $var set $val" 0 3632 3668 set entryvar($var) $val 3633 3669 incr expgui(changed) … … 3646 3682 if {[phaseinfo $expgui(curPhase) $var] != $val} { 3647 3683 phaseinfo $expgui(curPhase) $var set $val 3684 RecordMacroEntry "phaseinfo $expgui(curPhase) $var set $val" 0 3648 3685 set entryvar($var) $val 3649 3686 incr expgui(changed) … … 3652 3689 } 3653 3690 } 3691 RecordMacroEntry "incr expgui(changed)" 0 3654 3692 if {$change} { 3655 3693 # set the powpref warning (1 = suggested) … … 4038 4076 if {$x != $expgui(convinit) && $expgui(changed) <= 0} { 4039 4077 incr expgui(changed) 4040 } 4041 if {$expgui(changed)} {expinfo convg set $x} 4078 RecordMacroEntry "incr expgui(changed)" 0 4079 } 4080 if {$expgui(changed)} { 4081 expinfo convg set $x 4082 RecordMacroEntry "expinfo convg set $x" 0 4083 } 4042 4084 set expgui(convlbl) [format %5.2f [expr {pow(10,$x/100.)}]] 4043 4085 } … … 4046 4088 if {$x != $expgui(marqinit) && $expgui(changed) <= 0} { 4047 4089 incr expgui(changed) 4048 } 4049 if {$expgui(changed)} {expinfo marq set $x} 4090 RecordMacroEntry "incr expgui(changed)" 0 4091 } 4092 if {$expgui(changed)} { 4093 expinfo marq set $x 4094 RecordMacroEntry "expinfo marq set $x" 0 4095 } 4050 4096 } 4051 4097 # ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ END OF LS PANE CODE ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ … … 4106 4152 $expgui(fm).option.menu add checkbutton -label "Autoload EXP" \ 4107 4153 -variable expgui(autoexpload) 4154 $expgui(fm).option.menu add checkbutton -label "Prompt after GSAS run" \ 4155 -variable expgui(execprompt) 4108 4156 $expgui(fm).option.menu add checkbutton -label "Iconify during GSAS" \ 4109 4157 -variable expgui(autoiconify) … … 4190 4238 $expgui(fm).option.menu add command -label "Save Options" \ 4191 4239 -command "SaveOptions" 4192 4193 4240 pack $expgui(fm).file $expgui(fm).option -side left -in $expgui(fm) 4194 4241 … … 4251 4298 } 4252 4299 } 4300 4301 # Macro menu 4302 $expgui(fm).macro.menu add checkbutton -label "Record EXPGUI macro" \ 4303 -variable expgui(RecordMacro) 4304 $expgui(fm).macro.menu add command -label "Add comment to macro" \ 4305 -command AddCommentMacroFile 4306 $expgui(fm).macro.menu add command -label "Replay macro line-at-a-time" \ 4307 -command {ReplayMacroFile 1} 4308 $expgui(fm).macro.menu add command -label "Replay macro all at once" \ 4309 -command {ReplayMacroFile 0} 4310 $expgui(fm).macro.menu add checkbutton -label "Show GSAS output in window" \ 4311 -variable expgui(ShowGENLES) 4312 bind . <Control-m> {set expgui(RecordMacro) [expr ! $expgui(RecordMacro)]} 4313 set expgui(RecordMacro) 0 4314 set expgui(MacroRunning) 0 4315 set expgui(MacroStatus) "?" 4316 set expgui(ShowGENLES) 1 4317 trace variable expgui(RecordMacro) w SetRecordMacroOnOff 4318 4253 4319 # setup command help 4254 4320 foreach cmd [array names expgui_cmdlist] {
Note: See TracChangeset
for help on using the changeset viewer.