Ignore:
Timestamp:
Jun 9, 2010, 8:49:00 AM (14 years ago)
Author:
ronosman
Message:

New progress dialog implementation using virtual listctrl. Fix scrolling issues with Wx::Gauge.

File:
1 edited

Legend:

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

    r6426 r6494  
    8585    );
    8686
     87    $self->listctrl->column_item_data(
     88        $params->{column_item_data}
     89    );
     90
    8791    Wx::Event::EVT_BUTTON( $self, $main::ID_UPLOAD_CANCEL, \&on_cancel );
    8892    Wx::Event::EVT_CLOSE( $self, \&on_close );
     
    108112    my ( $self, $images ) = @_;
    109113
    110     map {
    111         my $item = $self->listctrl->InsertStringItem(
    112             $self->listctrl->GetItemCount,
    113             $_->{site_name}
    114         );
    115         $self->listctrl->SetItemProgressBar($item);
    116         $self->update_image_item($_);
    117     }@$images;
    118 
     114    $self->listctrl->add_progress_items($images);
    119115}
    120116
     
    123119    my ( $self, $image ) = @_;
    124120
    125     my $index = $image->{add_rank};
    126 
    127     $self->listctrl->SetItem(
    128         $index,
    129         1,
    130         1+$image->{add_rank}
    131     );
    132 
    133 
    134     $self->listctrl->SetItemProgressValue(
    135         $index,
    136         $image->{progress}
    137     );
    138 
    139     $self->listctrl->SetItem(
    140         $index,
    141         3,
    142         $image->{status}
    143     );
    144 
    145     $self->listctrl->SetItem(
    146         $index,
    147         4,
    148         $image->{file}
    149     );
    150 
     121    my $item = $image->{add_rank};
     122    $self->listctrl->replace_item_data($item, $image);
    151123}
    152124
     
    168140    $event->Skip;
    169141}
    170 
     142 
    171143
    172144sub on_close {
Note: See TracChangeset for help on using the changeset viewer.