Changeset 28
- Timestamp:
- Dec 4, 2009 4:59:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 1999/01/07 04:43:03 to 1999/01/13 05:02:47
- Property rcs:lines changed from +23 -6 to +59 -37
- Property rcs:rev changed from 1.6 to 1.7
r21 r28 3 3 4 4 # to do: 5 # 6 # new file menu box w/sort by that allows for new .EXP names 5 7 # 6 8 # global background editing & profile work differently: should both … … 37 39 } 38 40 if {$expgui(expfile) == ""} exit 39 catch {cd [string trim [file dirname $expgui(expfile)]]}40 41 41 42 set expgui(debug) 0 … … 101 102 set expgui(gsasdir) [file dirname $expgui(scriptdir)] 102 103 set expgui(gsasexe) [file join $expgui(gsasdir) exe] 104 catch {cd [string trim [file dirname $expgui(expfile)]]} 103 105 #---------------------------------------------------------------- 104 106 # fetch EXP file processing routines … … 150 152 wm iconname . [file tail $expfile] 151 153 152 set expgui(curPhase) ""153 154 # set the number of phases on the phase page 154 155 setphases 155 156 156 set expgui(pagenow) "" 157 158 # update the histogram list 159 sethistlist 160 161 if !$expgui(havetix) { 162 RaisePage lsFrame 163 } else { 164 .n raise lsPane 165 set expgui(pagenow) lsFrame 166 } 167 # select the 1st phase 168 SelectOnePhase [lindex $expmap(phaselist) 0] 169 # disable the "global options" that don't make sense 157 # disable the "global options" that don't make sense based 158 # on the histograms present 170 159 foreach num {1 2 3 4 5} { 171 160 set flag($num) 0 … … 192 181 set entrycmd(trace) 0 193 182 194 # least squares page183 # propogate changes on the least squares page 195 184 set entryvar(cycles) [expinfo cycles] 196 185 set entrycmd(cycles) "expinfo cycles" … … 207 196 # set fo extaction on LS page 208 197 SetupExtractHist 198 199 # update the histogram list 200 sethistlist 201 209 202 # start checking for external changes 210 203 afterawhile … … 342 335 343 336 uplevel #0 {source $script} 337 } 338 339 # save some of the global options in ~/.gsas_config 340 proc SaveOptions {} { 341 global expgui env tcl_platform 342 set fp [open [file join ~ .gsas_config] a] 343 puts $fp "set expgui(archive) $expgui(archive)" 344 puts $fp "set expgui(asorttype) $expgui(asorttype)" 345 puts $fp "set expgui(hsorttype) $expgui(hsorttype)" 346 if {$tcl_platform(platform) != "windows"} { 347 puts $fp "set env(GSASBACKSPACE) $env(GSASBACKSPACE)" 348 } 349 close $fp 344 350 } 345 351 … … 891 897 proc sethistlist {} { 892 898 global expgui expmap 893 set expgui(curhist) {}894 899 foreach lbox $expgui(HistSelectList) { 895 900 $lbox.title delete 0 end … … 954 959 set expmap(histlistboxcontents) [lsort -real -index 1 $histlist] 955 960 } 956 # select the first histogram in the list by default (if there are any)957 if {[llength $histlist] > 0} {set expgui(curhist) 0}958 961 959 962 # title field needs to match longest title … … 1576 1579 grid [entry $expgui(ProfileBox).f.$i.ent${num}_${i} \ 1577 1580 -textvariable entryvar(pterm${num}_$i)\ 1578 -width 1 4] -row $row -column $col1581 -width 12] -row $row -column $col 1579 1582 set entrycmd(pterm${num}_$i) "hapinfo $hist $i pterm$num" 1580 1583 set entryvar(pterm${num}_$i) [hapinfo $hist $i pterm$num] … … 1751 1754 $expgui(lsFrame).f1.a.l$phase config -fg grey 1752 1755 set expgui(Fextract$phase) {} 1753 #foreach item "a.ca$phase a.cb$phase a.cc$phase" 1754 foreach item "a.ca$phase a.cc$phase" { 1755 $expgui(lsFrame).f1.$item config -state disabled -bd 1 1756 foreach item $expgui(ExtractSettingsRadiobuttons) { 1757 ${item}$phase config -state disabled -bd 1 1756 1758 } 1757 1759 } … … 1765 1767 $expgui(lsFrame).f1.a.l$phase config -fg grey 1766 1768 set expgui(Fextract$phase) {} 1767 # foreach item "a.ca$phase a.cb$phase a.cc$phase" 1768 foreach item "a.ca$phase a.cc$phase" { 1769 $expgui(lsFrame).f1.$item config -state disabled -bd 1 1769 foreach item $expgui(ExtractSettingsRadiobuttons) { 1770 ${item}$phase config -state disabled -bd 1 1770 1771 } 1771 1772 } else { 1772 1773 $expgui(lsFrame).f1.a.l$phase config -fg black 1773 # foreach item "a.ca$phase a.cb$phase a.cc$phase" 1774 foreach item "a.ca$phase a.cc$phase" { 1775 $expgui(lsFrame).f1.$item config -state normal -bd 2 1774 foreach item $expgui(ExtractSettingsRadiobuttons) { 1775 ${item}$phase config -state normal -bd 2 1776 1776 } 1777 1777 set expgui(Fextract$phase) [hapinfo $histlist $phase extmeth] … … 1794 1794 if $gotphase($phase) { 1795 1795 $expgui(lsFrame).f1.a.l$phase config -fg black 1796 foreach item "a.ca$phase a.cb$phase a.cc$phase"{1797 $ expgui(lsFrame).f1.$itemconfig -state normal -bd 21796 foreach item $expgui(ExtractSettingsRadiobuttons) { 1797 ${item}$phase config -state normal -bd 2 1798 1798 } 1799 1799 } else { 1800 1800 $expgui(lsFrame).f1.a.l$phase config -fg grey 1801 foreach item "a.ca$phase a.cb$phase a.cc$phase"{1802 $ expgui(lsFrame).f1.$itemconfig -state disabled -bd 11801 foreach item $expgui(ExtractSettingsRadiobuttons) { 1802 ${item}$phase config -state disabled -bd 1 1803 1803 } 1804 1804 } … … 2785 2785 # -row 4 -column $num 2786 2786 } 2787 set expgui(ExtractSettingsRadiobuttons) $expgui(lsFrame).f1.a.cc 2788 lappend expgui(ExtractSettingsRadiobuttons) $expgui(lsFrame).f1.a.ca 2789 #lappend expgui(ExtractSettingsRadiobuttons) $expgui(lsFrame).f1.a.cb 2790 2787 2791 grid [label $expgui(lsFrame).f1.a.t -text "Intensity Extraction Method" -anchor c] \ 2788 2792 -column 0 -columnspan 11 -row 0 2789 grid [label $expgui(lsFrame).f1.a.t0 -text " Histogram#" -anchor c] -column 0 -row 12793 grid [label $expgui(lsFrame).f1.a.t0 -text "Phase #" -anchor c] -column 0 -row 1 2790 2794 grid [label $expgui(lsFrame).f1.a.t1 -text "Rietveld" -anchor c] -column 0 -row 2 2791 2795 grid [label $expgui(lsFrame).f1.a.t2 -text "F(calc) Weighted" -anchor c] -column 0 -row 3 … … 2862 2866 #---- Global mode menu button 2863 2867 $expgui(fm).option.menu add cascade -menu $expgui(fm).option.menu.editmode \ 2864 -label " Global mode"2868 -label "Multiple hist. selection" 2865 2869 menu $expgui(fm).option.menu.editmode 2866 2870 $expgui(fm).option.menu.editmode add radiobutton -label "Off" \ … … 2891 2895 -variable env(GSASBACKSPACE) 2892 2896 } 2897 $expgui(fm).option.menu add command -label "Save Options" -underline 1 \ 2898 -command "SaveOptions" 2893 2899 2894 2900 pack $expgui(fm).file $expgui(fm).option -side left -in $expgui(fm) … … 2950 2956 bind . <Control-c> catchQuit 2951 2957 2958 set expgui(curPhase) "" 2959 set expgui(pagenow) "" 2960 set expgui(curhist) {} 2961 2952 2962 loadexp $expgui(expfile) 2963 2964 # select the 1st phase 2965 SelectOnePhase [lindex $expmap(phaselist) 0] 2966 # select the first histogram in the list by default (if there are any) 2967 if {[llength $expmap(histlistboxcontents)] > 0} {set expgui(curhist) 0} 2968 2969 if !$expgui(havetix) { 2970 RaisePage lsFrame 2971 } else { 2972 .n raise lsPane 2973 set expgui(pagenow) lsFrame 2974 }
Note: See TracChangeset
for help on using the changeset viewer.