Changeset 6738 for extensions


Ignore:
Timestamp:
Jul 30, 2010, 7:06:16 PM (14 years ago)
Author:
ronosman
Message:

Add a notebook to display "Preparation" and "Transfer" panels. The transfer progress list is no longer displayed as a dialog box. The photos are removed from the preparation panel when transfer begins.

Location:
extensions/pLoader/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/locale/fr_FR/pLoader.po

    r6707 r6738  
    772772msgid "sending"
    773773msgstr "envoie"
     774
     775msgid "Preparation"
     776msgstr "Préparation"
     777
     778msgid "Progress"
     779msgstr "Progression"
     780
     781msgid "Status"
     782msgstr "Statut"
     783
     784msgid "Clear list"
     785msgstr "Vider la liste"
  • extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm

    r6726 r6738  
    122122    imageviewer_refresh
    123123    imageviewer_item_refresh
    124     horizontal_splitter
    125124    destination_category_dlg
    126125    destination_categories
    127126    categories_treectrl
     127    prepare_transfer_notebook
    128128/;
    129129__PACKAGE__->mk_accessors( @properties );
     
    595595    my $sizer_h = Wx::BoxSizer->new( wxHORIZONTAL );
    596596   
     597    $self->prepare_transfer_notebook(
     598        Wx::Notebook->new(
     599            $self,
     600            -1,
     601            wxDefaultPosition,
     602            wxDefaultSize,
     603            0
     604        )
     605    );
    597606
    598607    $self->imageviewer(
    599608        Uploader::GUI::wxImageListCtrl->new(
    600609            {
    601                 parentwnd    => $self,
     610                parentwnd    => $self->prepare_transfer_notebook,
    602611                images       => $self->images,
    603612                image_size   => $self->preferences->wx_thumb_size,
     
    645654    }
    646655
     656    $self->prepare_transfer_notebook->AddPage(
     657        $self->imageviewer,
     658        gettext("Preparation")
     659    );
     660
     661    $self->prepare_transfer_notebook->AddPage(
     662        $self->upload_progressdlg,
     663        gettext("Transfer")
     664    );
     665
    647666    # the imageviewer has a stretch factor of 1 : expands its size on frame resize
    648     $sizer_h->Add( $self->imageviewer, 1, wxEXPAND|wxALL, 2 );
     667    $sizer_h->Add( $self->prepare_transfer_notebook, 1, wxEXPAND|wxALL, 2 );
    649668    $sizer_h->Add( $self->piwigo_photo_properties_dlg, 0, wxEXPAND|wxALL, 2 );
    650669
     
    702721        Uploader::GUI::ImageProgressDlg->new(
    703722            {
    704                 title           => gettext("Image upload progress information"),
     723                parentwnd       => $self->prepare_transfer_notebook,
    705724                progress_column => 2,
    706725                cancel_cbk      => sub { wxTheApp->cancel_all },
     
    714733                columns => [ map{ gettext $_ } qw/
    715734                    Photo
    716                     Name
     735                    Caption
    717736                    Progress
    718737                    Status
     
    723742    );
    724743
    725     $self->upload_progressdlg->Hide;
     744    $self->upload_progressdlg->Enable(0);
     745
    726746
    727747
     
    10351055            my ( $handler, $event ) = @_;
    10361056            my $data = $event->GetData;
    1037             $handler->upload_progressdlg->Show(1);
    1038             $handler->upload_progressdlg->RequestUserAttention(wxUSER_ATTENTION_INFO);
     1057            $handler->upload_progressdlg->Enable(1);
     1058            $handler->prepare_transfer_notebook->ChangeSelection(1);
    10391059            $handler->upload_progressdlg->add_images($data);
     1060            wxTheApp->images->remove_processed if $self->preferences->remove_uploaded_from_selection;
     1061            $handler->refresh_image_context;
    10401062        }
    10411063    );
     
    10611083            my $data = $event->GetData;
    10621084            $handler->upload_progressdlg->batch_end($data);
    1063             wxTheApp->images->remove_processed;
    1064             $handler->refresh_image_context;
    10651085        }
    10661086    );
     
    16301650    $self->destination_category_dlg->Destroy;
    16311651
    1632     $self->upload_progressdlg->Destroy;
    1633 
    16341652    wxTheApp->stop_all;
    16351653   
  • extensions/pLoader/trunk/src/Uploader/GUI/ImageProgressDlg.pm

    r6538 r6738  
    3131    wxMINIMIZE_BOX
    3232/;
    33 use base qw/Wx::Dialog Class::Accessor::Fast/;
     33use base qw/Wx::Panel Class::Accessor::Fast/;
    3434use Wx::Event qw/
    3535    EVT_BUTTON
     
    5454
    5555    my $self = $class->SUPER::new(
    56         undef,
     56        $params->{parentwnd},
    5757        -1,
    58         $params->{title},
    5958        wxDefaultPosition,
    6059        wxDefaultSize,
    61              wxDIALOG_NO_PARENT|
    62              wxDEFAULT_DIALOG_STYLE|
    63              wxMAXIMIZE_BOX|
    64              wxMINIMIZE_BOX
    6560
    6661    );
  • extensions/pLoader/trunk/src/Uploader/GUI/Layout/ImageProgress.pm

    r6538 r6738  
    2020    my( $parent_wnd ) = @_;
    2121
    22     my $panel = Wx::Panel->new($parent_wnd, -1, wxDefaultPosition, wxDefaultSize);
     22#    my $panel = Wx::Panel->new($parent_wnd, -1, wxDefaultPosition, wxDefaultSize);
     23    my $panel = $parent_wnd;
    2324   
    2425    my( $topsizer ) = Wx::BoxSizer->new( wxVERTICAL );
     
    2930            $panel,
    3031            $main::ID_LISTCTRL,
    31             wxDefaultPosition, [600, 400],
     32            wxDefaultPosition, [500, 400],
    3233            wxLC_REPORT|wxLC_VIRTUAL
    3334        )
  • extensions/pLoader/trunk/src/Uploader/Images.pm

    r6726 r6738  
    104104    );
    105105
     106    $self->set_to_be_removed(
     107        $self->global_rank
     108    );
     109
    106110    $self->global_rank_indx->{
    107111        $self->global_rank
     
    245249    return if ( $self->is_empty );
    246250    return if (! defined $self->to_be_removed_grank );
    247 
    248251    my $to_remove_indx = [];
    249252    # check if the global rank correspond
Note: See TracChangeset for help on using the changeset viewer.