Changeset 6103 for branches


Ignore:
Timestamp:
Mar 4, 2016, 8:21:03 AM (8 years ago)
Author:
gah
Message:

fix help menu with phases

Location:
branches/1.5/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/gui/scripts/analyzer.tcl

    r6029 r6103  
    6868    public method clear {{xmlobj "all"}}
    6969    public method download {option args}
     70    public method buildMenu { w url appName }
    7071
    7172    protected method _plot {args}
     
    104105    private variable _wait_uq 0
    105106
    106     private method BuildMenu { url }
    107107    private method BuildSimulationTable { w }
    108108    private method Cancel {}
     
    201201    }
    202202    pack $itk_component(help) -side left
    203     BuildMenu $url
     203    buildMenu $itk_component(help).menu $url $_appName
    204204   
    205205    if 0 {
     
    15591559# Build Help menu
    15601560#
    1561 itcl::body Rappture::Analyzer::BuildMenu { url } {
    1562     set m $itk_component(help).menu
    1563     itk_component add helpmenu {
    1564         menu $itk_component(help).menu \
    1565             -tearoff 0 \
    1566             -postcommand [itcl::code $this PostMenu]
    1567     } {
    1568         ignore -tearoff
    1569     }
    1570     if { $_appName == "" || $url == "" } {
     1561itcl::body Rappture::Analyzer::buildMenu { m url appName } {
     1562    menu $m \
     1563        -tearoff 0 \
     1564        -postcommand [itcl::code $this PostMenu]
     1565    if { $appName == "" || $url == "" } {
    15711566        set state disabled
    15721567    } else {
     
    15741569    }
    15751570    $m add command -label "About this tool" \
    1576         -command [list Rappture::filexfer::webpage "$url/tools/$_appName"] \
     1571        -command [list Rappture::filexfer::webpage "$url/tools/$appName"] \
    15771572        -state $state
    15781573    $m add command -label "Questions?" \
  • branches/1.5/gui/scripts/main.tcl

    r5984 r6103  
    261261
    262262#
    263 # Add a place for about/questions in the breadcrumbs area of this pager.
     263# Add a place for menu button in the breadcrumbs area of this pager.
    264264#
    265265set app [string trim [$tool xml get tool.id]]
    266266set url [Rappture::Tool::resources -huburl]
    267 if 0 {
    268 # The be elimimated with the menu changes
    269 if { "" != $url && "" != $app } {
    270     set f [$win.pager component breadcrumbarea]
    271     frame $f.hubcntls
    272     pack $f.hubcntls -side right -padx 4
    273     label $f.hubcntls.icon -image [Rappture::icon ask] -highlightthickness 0
    274     pack $f.hubcntls.icon -side left
    275     button $f.hubcntls.about -text "About this tool" -command "
    276         [list Rappture::filexfer::webpage $url/tools/$app]
    277         Rappture::Logger::log help about
    278     "
    279     pack $f.hubcntls.about -side top -anchor w
    280     button $f.hubcntls.questions -text Questions? -command "
    281         [list Rappture::filexfer::webpage $url/resources/$app/questions]
    282         Rappture::Logger::log help questions
    283     "
    284     pack $f.hubcntls.questions -side top -anchor w
    285 }
    286 }
    287 
    288 set f [$win.pager component breadcrumbarea]
    289 frame $f.hubcntls
    290 pack $f.hubcntls -side right -padx 4
    291 label $f.hubcntls.icon -image [Rappture::icon ask] -highlightthickness 0
    292 pack $f.hubcntls.icon -side left
    293 button $f.hubcntls.about \
    294     -text "About this tool" \
    295     -state disabled \
    296     -command "
    297         [list Rappture::filexfer::webpage $url/tools/$app]
    298         Rappture::Logger::log help about
    299     "
    300 pack $f.hubcntls.about -side top -anchor w
    301 button $f.hubcntls.questions \
    302     -text Questions? \
    303     -state disabled \
    304     -command "
    305         [list Rappture::filexfer::webpage $url/resources/$app/questions]
    306         Rappture::Logger::log help questions
    307     "
    308 pack $f.hubcntls.questions -side top -anchor w
    309 if { $url != "" && $app != "" } {
    310     $f.hubcntls.about configure -state normal
    311     $f.hubcntls.questions configure -state normal
    312 }
     267set crumbs [$win.pager component breadcrumbarea]
     268frame $crumbs.hubcntls
     269pack $crumbs.hubcntls -side right -padx 4
     270
     271set m $crumbs.hubcntls.help.menu
     272menubutton $crumbs.hubcntls.help \
     273    -image [Rappture::icon hamburger_menu] \
     274    -highlightthickness 0 \
     275    -menu $m
     276pack $crumbs.hubcntls.help -side top -anchor w
    313277
    314278#
     
    369333
    370334$tool notify add analyzer * [list $f.analyze reset]
     335$f.analyze buildMenu $m $url $app
     336
    371337
    372338# ----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.