Changeset 1274 for trunk


Ignore:
Timestamp:
Feb 16, 2009, 3:46:55 PM (16 years ago)
Author:
mmc
Message:
  • Fixed the automatic bug report system to work with the new nanoHUB.org site. It needed index.php instead of index2.php.
  • Added links for "About" and "Questions" into the upper-right corner of the Rappture GUI. I don't really link the way this is, but it will do for now until we can completely redesign the GUI.
Location:
trunk/gui/scripts
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/Makefile.in

    r1127 r1274  
    127127install_images:
    128128        $(MKDIR_P) $(destdir)/images
    129         @for i in $(srcdir)/images/*.gif $(srcdir)/images/*.xbm; do \
     129        @for i in $(srcdir)/images/*.gif $(srcdir)/images/*.png $(srcdir)/images/*.xbm; do \
    130130            echo "Installing $$i" ; \
    131131            $(INSTALL) -m 444 $$i $(destdir)/images ; \
  • trunk/gui/scripts/analyzer.tcl

    r1217 r1274  
    9797    pack $itk_interior.simol -fill x
    9898
    99     frame $itk_interior.simol.simbg -borderwidth 0
    100     pack $itk_interior.simol.simbg -expand yes -fill both
     99    itk_component add simbg {
     100        frame $itk_interior.simol.simbg -borderwidth 0
     101    } {
     102        usual
     103        rename -background -simcontrolcolor simControlColor Color
     104    }
     105    pack $itk_component(simbg) -expand yes -fill both
    101106
    102107    set simtxt [$tool xml get tool.action.label]
     
    105110    }
    106111    itk_component add simulate {
    107         button $itk_interior.simol.simbg.simulate -text $simtxt \
     112        button $itk_component(simbg).simulate -text $simtxt \
    108113            -command [itcl::code $this simulate]
     114    } {
     115        usual
     116        rename -highlightbackground -simcontrolcolor simControlColor Color
    109117    }
    110118    pack $itk_component(simulate) -side left -padx 4 -pady 4
    111119
     120    # if there's a hub url, then add "About" and "Questions" links
     121    set app [$_tool xml get tool.id]
     122    set url [Rappture::Tool::resources -huburl]
     123    if {"" != $url && "" != $app} {
     124        itk_component add hubcntls {
     125            frame $itk_component(simbg).hubcntls
     126        } {
     127            usual
     128            rename -background -simcontrolcolor simControlColor Color
     129        }
     130        pack $itk_component(hubcntls) -side right -padx 4
     131
     132        itk_component add icon {
     133            label $itk_component(hubcntls).icon -image [Rappture::icon ask] \
     134                -highlightthickness 0
     135        } {
     136            usual
     137            ignore -highlightthickness
     138            rename -background -simcontrolcolor simControlColor Color
     139        }
     140        pack $itk_component(icon) -side left
     141
     142        itk_component add about {
     143            button $itk_component(hubcntls).about -text "About this tool" \
     144                -command [list Rappture::filexfer::webpage "$url/tools/$app"]
     145        } {
     146            usual
     147            ignore -font
     148            rename -background -simcontrolcolor simControlColor Color
     149            rename -highlightbackground -simcontrolcolor simControlColor Color
     150        }
     151        pack $itk_component(about) -side top -anchor w
     152
     153        itk_component add questions {
     154            button $itk_component(hubcntls).questions -text Questions? \
     155                -command [list Rappture::filexfer::webpage "$url/resources/$app/questions"]
     156        } {
     157            usual
     158            ignore -font
     159            rename -background -simcontrolcolor simControlColor Color
     160            rename -highlightbackground -simcontrolcolor simControlColor Color
     161        }
     162        pack $itk_component(questions) -side top -anchor w
     163    }
     164
    112165    itk_component add simstatus {
    113         text $itk_interior.simol.simbg.simstatus -borderwidth 0 \
     166        text $itk_component(simbg).simstatus -borderwidth 0 \
    114167            -highlightthickness 0 -height 1 -width 1 -wrap none \
    115168            -state disabled
     
    117170        usual
    118171        ignore -highlightthickness
     172        rename -background -simcontrolcolor simControlColor Color
    119173        rename -font -textfont textFont Font
    120174    }
     
    868922        $itk_interior.simol configure \
    869923            -background $itk_option(-simcontrolactiveoutline)
    870         $itk_interior.simol.simbg configure \
    871             -background $itk_option(-simcontrolactivebackground)
    872         $itk_component(simulate) configure \
    873             -highlightbackground $itk_option(-simcontrolactivebackground)
    874         $itk_component(simstatus) configure \
    875             -background $itk_option(-simcontrolactivebackground)
     924        configure -simcontrolcolor $itk_option(-simcontrolactivebackground)
    876925
    877926        $itk_component(abort) configure -state disabled
     
    922971        $itk_interior.simol configure \
    923972            -background $itk_option(-simcontroloutline)
    924         $itk_interior.simol.simbg configure -background $simcbg
    925         $itk_component(simulate) configure -highlightbackground $simcbg
    926         $itk_component(simstatus) configure -background $simcbg
     973        configure -simcontrolcolor $simcbg
    927974
    928975        $itk_component(simulate) configure -state disabled
  • trunk/gui/scripts/bugreport.tcl

    r1077 r1274  
    261261    set url [Rappture::Tool::resources -huburl]
    262262    if {[string index $url end] == "/"} {
    263         append url "index2.php"
     263        append url "index.php"
    264264    } else {
    265         append url "/index2.php"
     265        append url "/index.php"
    266266    }
    267267
     
    272272    }
    273273    upvar #0 $token rval
    274     if {[regexp {Ticket #[0-9]* +\(.*?\) +[0-9]+ +times} $rval(body) match]} {
     274    set info $rval(body)
     275    http::cleanup $token
     276
     277    if {[regexp {Ticket #[0-9]* +\(.*?\) +[0-9]+ +times} $info match]} {
    275278        return $match
    276279    }
    277     error "Report received, but ticket may not have been filed.  Here's the result...\n$rval(body)"
     280    error "Report received, but ticket may not have been filed.  Here's the result...\n$info"
    278281}
    279282
  • trunk/gui/scripts/filexfer.tcl

    r1077 r1274  
    4242        set path [auto_execok $prog]
    4343        if {"" == $path} {
    44             foreach dir {/apps/filexfer/bin /apps/bin} {
     44            foreach dir {/apps/bin /apps/filexfer/bin} {
    4545                set p [file join $dir $prog]
    4646                if {[file executable $p]} {
     
    319319    return ""
    320320}
     321
     322# ----------------------------------------------------------------------
     323# USAGE: Rappture::filexfer::webpage <url>
     324#
     325# Clients use this to pop up a web page for the specified <url> on
     326# the user's desktop.  The <url> should start with http:// or https://.
     327# If anything goes wrong, this function beeps.
     328# ----------------------------------------------------------------------
     329proc Rappture::filexfer::webpage {url} {
     330    if {[regexp -nocase {^https?://} $url]} {
     331        foreach prog {
     332              clientaction
     333              /apps/bin/clientaction
     334              /apps/xvnc/bin/clientaction
     335              ""
     336        } {
     337            if {"" != [auto_execok $prog]} {
     338                break
     339            }
     340        }
     341        if {"" != $prog} {
     342            exec $prog url $url &
     343            return
     344        }
     345    }
     346    bell
     347}
  • trunk/gui/scripts/icons.tcl

    r433 r1274  
    5050    if {"" != $file} {
    5151        switch -- [file extension $file] {
    52             .gif - .jpg {
     52            .gif - .jpg - .png {
    5353                set imh [image create photo -file $file]
    5454            }
  • trunk/gui/scripts/pager.tcl

    r994 r1274  
    9999    set font [$itk_component(next) cget -font]
    100100    set ht [font metrics $font -linespace]
     101    itk_component add breadcrumbarea {
     102        frame $itk_interior.bcarea
     103    }
    101104    itk_component add breadcrumbs {
    102         canvas $itk_interior.breadcrumbs -width 10 -height [expr {$ht+2}]
    103     }
     105        canvas $itk_component(breadcrumbarea).breadcrumbs \
     106            -width 10 -height [expr {$ht+2}]
     107    }
     108    pack $itk_component(breadcrumbs) -side left -expand yes -fill both \
     109        -padx 8 -pady 8
    104110
    105111    itk_component add line {
     
    485491            pack $itk_component(controls) -side bottom -fill x -padx 8 -pady 8
    486492            if {[llength $_pages] > 2} {
    487                 pack $itk_component(breadcrumbs) -side top -fill x \
    488                     -padx 8 -pady 8
     493                pack $itk_component(breadcrumbarea) -side top -fill x
    489494                pack $itk_component(line) -side top -fill x
    490495            }
     
    495500            pack forget $itk_component(controls)
    496501            pack forget $itk_component(line)
    497             pack forget $itk_component(breadcrumbs)
     502            pack forget $itk_component(breadcrumbarea)
    498503
    499504            foreach w [pack slaves $itk_component(inside)] {
Note: See TracChangeset for help on using the changeset viewer.