Changeset 944


Ignore:
Timestamp:
Mar 8, 2010 11:59:02 PM (14 years ago)
Author:
toby
Message:

fix positioning, remove localconfig

Location:
trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/expguic.html

    r930 r944  
    6666<BLOCKQUOTE>
    6767This menu contains options that determine how EXPGUI runs.
    68 <DL>
    6968<a name="archive"></a>
    70 <DT>archive EXP<DD>Toggles archiving of .EXP files. When on, files are
     69<DL>
     70<DT>archive EXP<DD>
     71  Toggles archiving of .EXP files. When on, files are
    7172        saved before they are overwritten by EXPGUI as a file
    7273        named <I>EXPNAM</I>.Oxx where xx is a pair of hexidecimal
     
    9899<a href="#archive">archive files</A>, but this may require more effort.
    99100
     101<a name="execprompt"></a>
     102<DT>Prompt after GSAS run<DD>
     103<IMG SRC="new.gif" HEIGHT=13 WIDTH=36 alt="New!">
     104By default, GSAS programs are run in a separate window
     105and after the program completes, the window remains open until enter is
     106pressed in the window. Turning the "Prompt after GSAS run" option off, causes
     107the window to be closed immediately after the program completes, saving
     108some effort but obliterating any error messages or other evidence of problems.
     109
    100110<a name="Autoicon"></a>
    101111<DT>Iconify during GSAS<DD>
     
    106116but this is an option so that the mode can be turned off by those people
    107117who find this behavior annoying.
    108 
    109 <a name="execprompt"></a>
    110 <DT>Prompt after GSAS run<DD>
    111 <IMG SRC="new.gif" HEIGHT=13 WIDTH=36 alt="New!">
    112 By default, GSAS programs are run in a separate window
    113 and after the program completes, the window remains open until enter is
    114 pressed in the window. Turning the "Prompt after GSAS run" option off, causes
    115 the window to be closed immediately after the program completes, saving
    116 some effort but obliterating any error messages or other evidence of problems.
    117118
    118119<a name="AutostartGRWND"></a>
     
    180181always shown.
    181182
    182 <DT>SaveOptions<DD>Save the current values for "Override backspace",
     183<DT>Save Options<DD>Save the current values for "Override backspace",
    183184        <a href="#sortatoms">"Sort atoms by"</a>,
    184185        <a href="#sorthist">"Sort histograms by"</a>,
     
    190191       
    191192        in file ~/.gsas_config (or c:\gsas.config on Windows).
     193<DT>Save Position<DD>Saves the current screen position of the EXPGUI
     194  window as the starting point for future runs of EXPGUI in
     195        in file ~/.gsas_config (or c:\gsas.config on Windows).
     196
    192197<DT>liveplot_options<DD>Used to set options for
    193198<a HREF="liveplot.html#liveplot">LIVEPLOT</a>,
    194199for example, the histogram to be plotted
     200<DT>Assign app to .EXP files<DD>(on Mac only) When selected, this
     201  causes .EXP files to be linked (via the file resource fork) to the
     202  EXPGUI applescript. This also causes the .EXP files to be displayed
     203  with a GSAS icon.
     204 
    195205</DL>
    196206<img SRC="m2.gif"  BORDER=3 alt="EXPGUI Screen snapshot">
  • trunk/expgui

    r935 r944  
    305305    catch {set ypos $expgui(ypos)}
    306306    set poscntr "nsew"
    307     catch {set posnctr $expgui(poscenter)}
     307    catch {set poscntr $expgui(poscenter)}
    308308    LocateWindow "." $xpos $ypos $poscntr
    309309    # windows needed this update before when using tk_getOpenFile.
     
    659659        puts $fp "set peakinfo($v) [list $peakinfo($v)]"
    660660    }
     661    close $fp
     662}
     663
     664# save some of the global options in ~/.gsas_config or ~/gsas.config in Windows
     665proc SavePosition {} {
     666    global expgui env tcl_platform graph peakinfo
     667    if {$tcl_platform(platform) == "windows"} {
     668        set fp [open c:/gsas.config a]
     669    } else {
     670        set fp [open [file join ~ .gsas_config] a]
     671    }
     672
     673    puts $fp "# EXPGUI saved screen position on [clock format [clock seconds]]"
     674    puts $fp "set expgui(xpos) [expr {[winfo x .]*100./[winfo screenwidth .]}]"
     675    puts $fp "set expgui(ypos) [expr {[winfo y .]*100./[winfo screenheight .]}]"
     676    puts $fp "set expgui(poscenter) NW"
    661677    close $fp
    662678}
     
    42564272$expgui(fm).option.menu add command -label "Save Options" \
    42574273        -command "SaveOptions"
     4274$expgui(fm).option.menu add command -label "Save Position" \
     4275        -command "SavePosition"
    42584276pack $expgui(fm).file $expgui(fm).option -side left  -in $expgui(fm)
    42594277
     
    44154433catch {set ypos $expgui(ypos)}
    44164434set poscntr "nsew"
    4417 catch {set posnctr $expgui(poscenter)}
     4435catch {set poscntr $expgui(poscenter)}
    44184436LocateWindow "." $xpos $ypos $poscntr
    44194437update
Note: See TracChangeset for help on using the changeset viewer.