Changeset 674 for trunk/gui/scripts


Ignore:
Timestamp:
Apr 19, 2007, 5:38:09 PM (17 years ago)
Author:
mmc
Message:

Fixed sequences so that styles for embedded curves are handled properly.
Fixed the play times for sequences so they are a little slower. This
works better with the frame updates over VNC. Added "select all" to
the menu for string items.

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/sequenceresult.tcl

    r644 r674  
    302302                    }
    303303                    if {[llength $all] > 0} {
    304                         set delay [expr {int(ceil(pow($_play(speed)/10.0,2.0)*5))}]
     304                        set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}]
    305305                        set rval [eval Rappture::icon::gif_animate $delay $all]
    306306                    }
     
    342342
    343343    # schedule the first frame
    344     set delay [expr {int(ceil(pow($_play(speed)/10.0,2.0)*5))}]
     344    set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}]
    345345    set _afterId [after $delay [itcl::code $this _playFrame]]
    346346}
     
    492492    goto $_pos
    493493
    494     set delay [expr {int(ceil(pow($_play(speed)/10.0,2.0)*5))}]
     494    set delay [expr {int(ceil(pow($_play(speed)/10.0+2,2.0)*15))}]
    495495    set _afterId [after $delay [itcl::code $this _playFrame]]
    496496}
     
    515515    if {"" != $_topmost} {
    516516        foreach dataobj [$_topmost value $_pos] {
    517             $viewer add $dataobj ""
    518         }
    519     }
    520 }
     517            set settings "-color autoreset -width 2"
     518            if {[catch {$dataobj hints style} style] == 0} {
     519                eval lappend settings $style
     520            }
     521            $viewer add $dataobj $settings
     522        }
     523    }
     524}
  • trunk/gui/scripts/textentry.tcl

    r649 r674  
    2525option add *TextEntry.hintFont \
    2626    -*-helvetica-medium-r-normal-*-*-100-* widgetDefault
    27 option add *TextEntry.binaryFont \
     27option add *TextEntry.codeFont \
    2828    -*-courier-medium-r-normal-*-12-* widgetDefault
    2929
     
    242242
    243243            bind $itk_component(entry) <KeyPress> [itcl::code $this _newValue]
     244            bind $itk_component(entry) <Control-KeyPress-a> \
     245                "[list $itk_component(entry) selection range 0 end]; break"
    244246
    245247            itk_component add emenu {
     
    252254            $itk_component(emenu) add command -label "Paste" -accelerator "^V" \
    253255                -command [list event generate $itk_component(entry) <<Paste>>]
     256            $itk_component(emenu) add command -label "Select All" -accelerator "^A" -command [list $itk_component(entry) selection range 0 end]
    254257            bind $itk_component(entry) <<PopupMenu>> \
    255258                [itcl::code $this _edit menu emenu %X %Y]
     
    285288                rename -background -textbackground textBackground Background
    286289                rename -foreground -textforeground textForeground Foreground
     290                rename -font -codefont codeFont CodeFont
    287291            }
    288292            $itk_component(text) configure \
    289293                -background $itk_option(-textbackground) \
    290                 -foreground $itk_option(-textforeground)
     294                -foreground $itk_option(-textforeground) \
     295                -font $itk_option(-codefont)
    291296            $itk_component(scrollbars) contents $itk_component(text)
    292297
    293298            bind $itk_component(text) <KeyPress> [itcl::code $this _newValue]
     299            bind $itk_component(text) <Control-KeyPress-a> \
     300                "[list $itk_component(text) tag add sel 1.0 end]; break"
    294301
    295302            itk_component add tmenu {
     
    302309            $itk_component(tmenu) add command -label "Paste" -accelerator "^V" \
    303310                -command [list event generate $itk_component(text) <<Paste>>]
     311            $itk_component(tmenu) add command -label "Select All" -accelerator "^A" -command [list $itk_component(text) tag add sel 1.0 end]
    304312            $itk_component(tmenu) add separator
    305313            $itk_component(tmenu) add command -label "Upload..." \
     
    341349        set _mode "binary"
    342350        set _value $newval
    343         set font [option get $itk_component(hull) binaryFont BinaryFont]
    344351
    345352        set size [string length $newval]
     
    366373            if {$len > 1600} {
    367374                set len 1600
    368                 set tail "..."
     375                set tail "...more..."
    369376            }
    370377
     
    400407        set _value ""
    401408        regsub -all "\r" $newval "\n" newval
    402         set font [option get $itk_component(hull) binaryFont Font]
    403409    }
    404410
    405411    if {$_layout == "entry"} {
    406         $itk_component(entry) configure -font $font
    407412        $itk_component(entry) configure -state normal
    408413        $itk_component(emenu) entryconfigure "Cut" -state normal
    409         $itk_component(emenu) entryconfigure "Copy" -state normal
    410414        $itk_component(emenu) entryconfigure "Paste" -state normal
    411415        $itk_component(entry) delete 0 end
     
    414418            $itk_component(entry) configure -state disabled
    415419            $itk_component(emenu) entryconfigure "Cut" -state disabled
    416             $itk_component(emenu) entryconfigure "Copy" -state disabled
    417420            $itk_component(emenu) entryconfigure "Paste" -state disabled
    418421        }
    419422    } elseif {$_layout == "text"} {
    420         $itk_component(text) configure -font $font
    421423        $itk_component(text) configure -state normal
    422424        $itk_component(tmenu) entryconfigure "Cut" -state normal
    423         $itk_component(tmenu) entryconfigure "Copy" -state normal
    424425        $itk_component(tmenu) entryconfigure "Paste" -state normal
    425426        $itk_component(text) delete 1.0 end
     
    432433                -background $dbg -foreground $dfg
    433434            $itk_component(tmenu) entryconfigure "Cut" -state disabled
    434             $itk_component(tmenu) entryconfigure "Copy" -state disabled
    435435            $itk_component(tmenu) entryconfigure "Paste" -state disabled
    436436        } else {
  • trunk/gui/scripts/tool.tcl

    r640 r674  
    107107    global errorInfo
    108108
    109     # make sure that we save the proper application name
    110     if {"" != $_appname} {
     109    #
     110    # Make sure that we save the proper application name.
     111    # Actually, the best place to get this information is
     112    # straight from the "installtool" script, but just in
     113    # case we have an older tool, we should insert the
     114    # tool name from the resources config file.
     115    #
     116    if {"" != $_appname && "" == [$_xmlobj get tool.name]} {
    111117        $_xmlobj put tool.name $_appname
    112118    }
Note: See TracChangeset for help on using the changeset viewer.