Changeset 1421 for trunk/gui


Ignore:
Timestamp:
Apr 22, 2009 8:33:26 PM (15 years ago)
Author:
gah
Message:

fixes png download popup: don't destroy popup

File:
1 edited

Legend:

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

    r1417 r1421  
    2828}
    2929
    30 set debug 1
     30set debug 0
    3131proc debug { args } {
    3232    global debug
     
    15311531    $_dispatcher dispatch $this !pngtimeout "set $var {} ; list"
    15321532
    1533     set popup [Rappture::Balloon .print -title "Generating file..."]
    1534     set inner [$popup component inner]
    1535     label $inner.title -text "Generating Hardcopy" -font "Arial 10 bold"
    1536     label $inner.please -text "This may take a minute." -font "Arial 10"
    1537     label $inner.icon -image [Rappture::icon bigroller0]
    1538     button $inner.cancel -text "Cancel" -font "Arial 10 bold" \
    1539         -command [list set $var ""]
     1533    set popup .molvisviewerprint
     1534    if {![winfo exists $popup]} {
     1535        Rappture::Balloon $popup -title "Generating file..."
     1536        set inner [$popup component inner]
     1537        label $inner.title -text "Generating hardcopy." -font "Arial 10 bold"
     1538        label $inner.please -text "This may take a minute." -font "Arial 10"
     1539        label $inner.icon -image [Rappture::icon bigroller0]
     1540        button $inner.cancel -text "Cancel" -font "Arial 10 bold" \
     1541            -command [list set $var ""]
     1542        blt::table $inner \
     1543            0,0 $inner.title -columnspan 2 \
     1544            1,0 $inner.please -anchor w \
     1545            1,1 $inner.icon -anchor e  \
     1546            2,0 $inner.cancel -columnspan 2
     1547        blt::table configure $inner r0 -pady 4
     1548        blt::table configure $inner r2 -pady 4
     1549        bind $inner.cancel <KeyPress-Return> [list $inner.cancel invoke]
     1550    } else {
     1551        set inner [$popup component inner]
     1552    }
     1553
    15401554    $_dispatcher event -after 60000 !pngtimeout
    15411555    WaitIcon start $inner.icon
    1542     bind $inner.cancel <KeyPress-Return> [list $inner.cancel invoke]
    1543    
    1544     blt::table $inner \
    1545         0,0 $inner.title -columnspan 2 \
    1546         1,0 $inner.please -anchor w \
    1547         1,1 $inner.icon -anchor e  \
    1548         2,0 $inner.cancel -columnspan 2
    1549     blt::table configure $inner r0 -pady 4
    1550     blt::table configure $inner r2 -pady 4
    15511556    grab set -local $inner
    15521557    focus $inner.cancel
     
    15671572    grab release $inner
    15681573    $popup deactivate
    1569     destroy $popup
    15701574    update
    15711575
Note: See TracChangeset for help on using the changeset viewer.