Changeset 5977


Ignore:
Timestamp:
Apr 27, 2010, 4:24:54 PM (10 years ago)
Author:
ronosman
Message:

Bug 1610 fixed : new chunk size not used until reload. Add a number validator.

Location:
extensions/pLoader/trunk/src/Uploader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm

    r5976 r5977  
    552552            $main::CHUNK_SIZE => { label => gettext("Transfert chunk size") },
    553553            $main::GS_CHUNK_SIZE => {
    554                 value   => sub { wxTheApp->chunk_size(@_) },
     554                value   => sub { wxTheApp->chunk_size(@_) },
     555                validator => Wx::Perl::TextValidator->new( '\d' )
    555556            },
    556557            $main::LANGUAGE => { label => gettext("Choose a language") },
  • extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm

    r5567 r5977  
    694694                http_password  => $self->http_password,
    695695                branding       => $self->branding,
    696                 chunk_size     => $self->chunk_size,
     696                chunk_size     => sub { $self->chunk_size(@_) },
    697697                use_offline    => $self->use_offline,
    698698                version        => $self->version,
  • extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm

    r5020 r5977  
    629629
    630630    my $content_length = length($content);
    631     my $nb_chunks = ceil($content_length / $self->chunk_size);
     631    my $nb_chunks = ceil($content_length / $self->chunk_size->());
    632632
    633633    my $chunk_pos = 0;
     
    640640            $content,
    641641            $chunk_pos,
    642             $self->chunk_size
     642            $self->chunk_size->()
    643643        );
    644         $chunk_pos += $self->chunk_size;
     644        $chunk_pos += $self->chunk_size->();
    645645        #print "pwg.images.addChunk\n";
    646646        my $data = encode_base64($chunk);
Note: See TracChangeset for help on using the changeset viewer.