Ignore:
Timestamp:
Oct 22, 2010 4:06:10 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

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

    r1342 r1929  
    4545itcl::body Rappture::Animicon::constructor {args} {
    4646    itk_component add icon {
    47         label $itk_interior.icon
     47        label $itk_interior.icon
    4848    }
    4949    pack $itk_component(icon) -expand yes -fill both
     
    6161itcl::body Rappture::Animicon::start {} {
    6262    if {![isrunning]} {
    63         _next
     63        _next
    6464    }
    6565}
     
    7474itcl::body Rappture::Animicon::stop {} {
    7575    if {[isrunning]} {
    76         after cancel $_afterid
    77         set _afterid ""
     76        after cancel $_afterid
     77        set _afterid ""
    7878    }
    7979}
     
    9797    $itk_component(icon) configure -image $_frames($_pos)
    9898    if {[incr _pos] >= [array size _frames]} {
    99         set _pos 0
     99        set _pos 0
    100100    }
    101101    set _afterid [after $itk_option(-delay) [itcl::code $this _next]]
     
    113113    catch {unset _frames}
    114114    if {[llength $itk_option(-images)] >= 1} {
    115         set w 0
    116         set h 0
    117         set i 0
    118         foreach name $itk_option(-images) {
    119             set imh [Rappture::icon $name]
    120             if {"" == $imh} {
    121                 error "image not found: $name"
    122             }
    123             set _frames($i) $imh
    124             if {[image width $imh] > $w} { set w [image width $imh] }
    125             if {[image height $imh] > $h} { set h [image height $imh] }
    126             incr i
    127         }
     115        set w 0
     116        set h 0
     117        set i 0
     118        foreach name $itk_option(-images) {
     119            set imh [Rappture::icon $name]
     120            if {"" == $imh} {
     121                error "image not found: $name"
     122            }
     123            set _frames($i) $imh
     124            if {[image width $imh] > $w} { set w [image width $imh] }
     125            if {[image height $imh] > $h} { set h [image height $imh] }
     126            incr i
     127        }
    128128    }
    129129
     
    132132
    133133    if {$restart} {
    134         start
     134        start
    135135    }
    136136}
Note: See TracChangeset for help on using the changeset viewer.