Ignore:
Timestamp:
Jul 23, 2008, 8:00:21 PM (16 years ago)
Author:
mmc
Message:

Fixed the Rappture::filexfer facility so that if importfile/exportfile
commands are not available, it reverts to local Load/Save? operations.
This is important for applications that are not deployed in a hub, but
used instead in a standard desktop environment.

File:
1 edited

Legend:

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

    r746 r1077  
    121121    }
    122122    if {[llength $_uppath] > 0} {
    123         $itk_component(combo) choices insert end @upload "Upload..."
     123        $itk_component(combo) choices insert end \
     124            @upload [Rappture::filexfer::label upload]
    124125    }
    125126
     
    130131    #
    131132    Rappture::Balloon $itk_component(hull).download \
    132         -title "Choose what to download:"
     133        -title "Choose what to [string tolower [Rappture::filexfer::label downloadWord]]:"
    133134    set inner [$itk_component(hull).download component inner]
    134135
     
    149150        }
    150151    }
    151     button $inner.go -text "Download" \
     152    button $inner.go -text [Rappture::filexfer::label download] \
    152153        -command [itcl::code $this _downloadValues]
    153154    pack $inner.go -side bottom -padx 50 -pady {4 2}
    154155
    155156    if {[llength $_dnpaths] > 0} {
    156         $itk_component(combo) choices insert end @download "Download..."
     157        $itk_component(combo) choices insert end \
     158            @download [Rappture::filexfer::label download]
    157159    }
    158160
     
    304306    set obj [$itk_component(combo) translate $newval]
    305307    if {$obj == "@upload"} {
    306         if {[Rappture::filexfer::enabled]} {
    307             set tool [Rappture::Tool::resources -appname]
    308             Rappture::filexfer::upload \
    309                 $tool $_uppath [itcl::code $this _uploadValue]
    310         }
     308        set tool [Rappture::Tool::resources -appname]
     309        Rappture::filexfer::upload \
     310            $tool $_uppath [itcl::code $this _uploadValue]
    311311
    312312        # put the combobox back to its last value
     
    417417
    418418    set mesg ""
    419     if {[Rappture::filexfer::enabled]} {
    420         foreach path $_dnpaths {
    421             if {$_dnpath2state($this-$path)} {
    422                 set info [$itk_option(-tool) valuefor $path]
    423                 set mesg [Rappture::filexfer::download $info input.txt]
    424                 if {"" != $mesg} { break }
    425             }
     419    foreach path $_dnpaths {
     420        if {$_dnpath2state($this-$path)} {
     421            set info [$itk_option(-tool) valuefor $path]
     422            set mesg [Rappture::filexfer::download $info input.txt]
     423            if {"" != $mesg} { break }
    426424        }
    427425    }
Note: See TracChangeset for help on using the changeset viewer.