Changeset 321


Ignore:
Timestamp:
Dec 4, 2009 5:04:06 PM (11 years ago)
Author:
toby
Message:

# on 2000/10/12 21:35:45, toby did:
Add www help support
implement optional EXPTOOL output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/addcmds.tcl

    • Property rcs:date changed from 2000/09/25 20:09:50 to 2000/10/12 21:35:45
    • Property rcs:lines changed from +8 -2 to +57 -24
    • Property rcs:rev changed from 1.12 to 1.13
    r284 r321  
    2424    catch {destroy $np}
    2525    toplevel $np
     26    bind $np <Key-F1> "MakeWWWHelp expgui2.html addphase"
    2627
    2728    grid [label $np.l1 -text "Adding phase #$nextphase"] \
     
    5152            -command "destroy $np"] -column 3 -row 3
    5253    grid columnconfig $np.bf 4 -weight 1
     54    grid [button $np.bf.help -text Help -bg yellow \
     55            -command "MakeWWWHelp expgui2.html addphase"] \
     56            -column 4 -row 3
    5357
    5458    # get the input formats if not already defined
     
    189193        set errmsg $out
    190194    }
    191     ShowBigMessage \
    192                  $np \
    193                  "Please review the result from adding the phase" \
    194                  $errmsg
     195    if {$expgui(showexptool)} {
     196        ShowBigMessage \
     197                $np \
     198                "Please review the result from adding the phase" \
     199                $errmsg
     200    }
    195201    file delete exptool.in exptool.out
    196202    # now select the new phase
     
    207213    catch {destroy $np}
    208214    toplevel $np
     215    bind $np <Key-F1> "MakeWWWHelp expgui3.html AddHist"
    209216
    210217    grid [label $np.l0 -text "Adding new histogram"] \
     
    238245            -value 1] -column 2 -row 6 -sticky w
    239246   
    240     grid [frame $np.f6] -column 1 -row 7 -columnspan 3
     247    grid [frame $np.f6] -column 0 -row 7 -columnspan 5 -sticky ew
    241248    grid [button $np.f6.b6a -text Add \
    242249            -command "addhist $np"] -column 0 -row 0
     
    244251    grid [button $np.f6.b6b -text Cancel \
    245252            -command "destroy $np"] -column 1 -row 0
     253    grid [button $np.f6.help -text Help -bg yellow \
     254            -command "MakeWWWHelp expgui3.html AddHist"] \
     255            -column 2 -row 0 -sticky e
     256    grid columnconfigure $np.f6 2 -weight 1
    246257
    247258    grid [button $np.f6a -text "Run\nRAWPLOT" -command RunRawplot] \
     
    594605
    595606    if {$err != ""} {
    596         tk_dialog .phaseerr "Add Histogram Error" \
    597                 "The following error(s) were found in your input:\n$err" \
    598                 error 0 "OK"
     607#       tk_dialog .phaseerr "Add Histogram Error" \
     608#               "The following error(s) were found in your input:\n$err" \
     609#               error 0 "OK"
     610        MyMessageBox -parent $np -title  "Add Histogram Error" \
     611                -message "The following error(s) were found in your input:\n$err" \
     612                -icon error -type ok -default ok \
     613                -helplink "expgui3.html AddHistErr"
    599614        return
    600615    }
     
    648663        set errmsg $out
    649664    }
    650     ShowBigMessage \
    651                  $np \
    652                  "Please review the result from adding the phase" \
    653                  $errmsg
     665    if {$expgui(showexptool)} {
     666        ShowBigMessage \
     667                $np \
     668                "Please review the result from adding the phase" \
     669                $errmsg
     670    }
    654671    file delete exptool.in exptool.out
    655672}
     
    686703    catch {destroy $top}
    687704    toplevel $top
     705    bind $top <Key-F1> "MakeWWWHelp expgui2.html addatoms"
    688706
    689707    grid [label $top.l1 -relief groove -bd 4 -anchor center\
     
    691709            -column 0 -row 0 \
    692710            -sticky we -columnspan 10
    693 #    grid [label $top.l2 -text "Phase title:"] -column 0 -row 1
    694711   
    695712    grid [canvas $top.canvas \
     
    735752    grid [button $top.b2 -text Cancel \
    736753            -command "destroy $top"] -column 1 -row 5 -sticky w
     754    grid [button $top.help -text Help -bg yellow \
     755            -command "MakeWWWHelp expgui2.html addatoms"] \
     756            -column 0 -columnspan 2 -row 4
    737757
    738758    # get the input formats if not already defined
     
    895915        set errmsg $out
    896916    }
    897     ShowBigMessage \
    898                  $top \
    899                  "Please review the result from adding the atom(s)" \
    900                  $errmsg
     917    if {$expgui(showexptool)} {
     918        ShowBigMessage \
     919                $top \
     920                "Please review the result from adding the atom(s)" \
     921                $errmsg
     922    }
    901923    file delete exptool.in exptool.out
    902924}
     
    928950    toplevel $w
    929951    wm title $w "Edit Atomic Parameter -- phase #$phase"
     952    bind $w <Key-F1> "MakeWWWHelp expgui2.html xform"
    930953    # this needs to track by phase
    931954    grid [label $w.0 \
     
    10081031
    10091032    grid rowconfigure $w 9 -minsize 5
    1010     grid [frame $w.b] -row 10 -column 0
    1011     pack [button $w.b.3 -text Close -command "destroy $w"] -side left
     1033    grid [frame $w.b] -row 10 -column 0 -columnspan 10 -sticky ew
     1034    pack [button $w.b.3 -text Close -command "destroy $w"] -side left \
     1035            -padx 5 -pady 5
     1036    pack [button $w.b.help -text Help -bg yellow \
     1037            -command "MakeWWWHelp expgui2.html xform"] -side right \
     1038            -padx 5 -pady 5
    10121039    bind $w <Return> "destroy $w"
    10131040
     
    12171244    catch {destroy $top}
    12181245    toplevel $top
     1246    bind $top <Key-F1> "MakeWWWHelp expgui2.html replacephase"
    12191247
    12201248    grid [label $top.l1 -text "Replacing phase #$expgui(curPhase)" \
     
    12581286    grid [button $top.b2 -text Cancel \
    12591287            -command "destroy $top"] -column 1 -row 6 -sticky w
     1288    grid [button $top.help -text Help -bg yellow \
     1289            -command "MakeWWWHelp expgui2.html replacephase"] \
     1290            -column 2 -row 6
    12601291
    12611292    # get the input formats if not already defined
     
    15421573    }
    15431574    donewait
    1544     ShowBigMessage \
    1545                  $top \
    1546                  "Please review the result from adding the atom(s)" \
    1547                  $errmsg
     1575    if {$expgui(showexptool)} {
     1576        ShowBigMessage \
     1577                $top \
     1578                "Please review the result from adding the atom(s)" \
     1579                $errmsg
     1580    }
    15481581    file delete exptool.in exptool.out
    15491582    destroy $top
Note: See TracChangeset for help on using the changeset viewer.