Changeset 5536
- Timestamp:
- Apr 1, 2010, 4:18:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm
r5472 r5536 1511 1511 my( $self, $event ) = @_; 1512 1512 1513 my $select_all = 1; 1513 1514 eval { 1514 $self->ProcessImageSelection( );1515 $self->ProcessImageSelection( $select_all ); 1515 1516 }; 1516 1517 } … … 1659 1660 # prepare and upload image_selection 1660 1661 sub ProcessImageSelection { 1661 my ( $self ) = @_;1662 my ( $self, $select_all ) = @_; 1662 1663 1663 1664 return if !scalar @{$self->imagelist->sums}; … … 1666 1667 return unless $self->destination_category_dlg->ShowModal != wxID_CANCEL; 1667 1668 } 1668 # else { 1669 # all selected is implicit 1670 if(!scalar @{$self->imageviewer->GetSelectedItems}){ 1669 1670 $self->imagelist->image_selection( 1671 $self->imageviewer->GetAllItems 1672 ) if $select_all; 1673 1674 return if( !defined $self->imagelist->image_selection ); 1675 return if( !scalar @{$self->imagelist->image_selection} ); 1671 1676 1672 $self->imagelist->image_selection( 1673 $self->imageviewer->GetAllItems 1674 ); 1675 } 1676 1677 return if( !defined $self->imagelist->image_selection ); 1678 return if( !scalar @{$self->imagelist->image_selection} ); 1679 1680 $self->upload_progressdlg->Destroy if defined $self->upload_progressdlg; 1681 $self->upload_progressdlg( 1682 Uploader::GUI::wxImageProcessingProgressDlg->new( 1683 { 1684 title => gettext("Image upload progress information"), 1685 bt_label => gettext("Cancel upload"), 1686 bt_close_label => gettext("Close"), 1687 stop_processing => sub { $self->imagelist->stop_processing(1); Wx::Yield(); }, 1688 } 1689 ) 1677 $self->upload_progressdlg->Destroy if defined $self->upload_progressdlg; 1678 $self->upload_progressdlg( 1679 Uploader::GUI::wxImageProcessingProgressDlg->new( 1680 { 1681 title => gettext("Image upload progress information"), 1682 bt_label => gettext("Cancel upload"), 1683 bt_close_label => gettext("Close"), 1684 stop_processing => sub { $self->imagelist->stop_processing(1); Wx::Yield(); }, 1685 } 1686 ) 1687 ); 1688 1689 # modeless dialog 1690 $self->upload_progressdlg->Show(1); 1691 Wx::Yield(); 1692 eval { 1693 $self->imagelist->UploadSelection; 1694 }; 1695 if($@){ 1696 Wx::MessageBox( 1697 sprintf( 1698 gettext("Upload cancelled"), 1699 ), 1700 gettext("Piwigo upload information"), 1701 wxOK | wxICON_INFORMATION, 1690 1702 ); 1691 # modeless dialog 1692 $self->upload_progressdlg->Show(1); 1693 Wx::Yield(); 1694 eval { 1695 $self->imagelist->UploadSelection; 1696 }; 1697 if($@){ 1698 Wx::MessageBox( 1699 sprintf( 1700 gettext("Upload cancelled"), 1701 ), 1702 gettext("Piwigo upload information"), 1703 wxOK | wxICON_INFORMATION, 1704 ); 1705 } 1706 #} 1703 } 1707 1704 } 1708 1705
Note: See TracChangeset
for help on using the changeset viewer.