Ignore:
Timestamp:
Sep 27, 2011, 11:49:19 AM (13 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

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

    r2547 r2579  
    3030    private variable _initialized
    3131    private variable _isOpen 0
     32    private variable _afterId -1
     33
    3234    # Number of milliseconds to wait before idle timeout.
    3335    # If greater than 0, automatically disconnect from the visualization
     
    5658    private method SendHelper.old {}
    5759    private method CheckConnection {}
     60    private method SplashScreen { state }
    5861
    5962    protected method SendEcho { channel {data ""} }
     
    118121        $_parser hide $cmd
    119122    }
    120 
    121123    #
    122124    # Set up the widgets in the main body
     
    400402        flush $_sid
    401403    }
     404    after cancel $_afterId
     405    set _afterId [after 500 [itcl::code $this SplashScreen on]]
    402406    if 0 {
    403407    if { ![CheckConnection] } {
     
    415419#
    416420itcl::body Rappture::VisViewer::ReceiveBytes { size } {
     421    SplashScreen off
    417422    if { ![CheckConnection] } {
    418423        return 0
     
    539544    }
    540545}
     546
     547itcl::body Rappture::VisViewer::SplashScreen { state } {
     548    after cancel $_afterId
     549    set _afterId -1
     550    if { $state } {
     551        if { [winfo exists $itk_component(plotarea).view.splash] } {
     552            return
     553        }
     554        label $itk_component(plotarea).view.splash -text "Please wait"
     555        pack $itk_component(plotarea).view.splash -expand yes -anchor c
     556    } else {
     557        if { ![winfo exists $itk_component(plotarea).view.splash] } {
     558            return
     559        }
     560        destroy $itk_component(plotarea).view.splash
     561    }
     562}
     563
Note: See TracChangeset for help on using the changeset viewer.