Ignore:
Timestamp:
Jul 29, 2010, 8:56:27 AM (14 years ago)
Author:
ronosman
Message:

Reupload option management.

File:
1 edited

Legend:

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

    r6707 r6726  
    10731073            my ( $handler, $event ) = @_;
    10741074            my $data = $event->GetData;
    1075 printf("image_done_event %s\n", Dumper $data);
    10761075            if($data->{preferences}{remove_uploaded_from_selection}){
    10771076                my $gr = $data->{global_rank};
     
    15551554    }
    15561555
     1556    # check if update/insert
     1557    my $existing = wxTheApp->check_existing($all_images);
     1558    $self->show_reupload_options if $existing;
     1559
     1560
    15571561    wxTheApp->start_resize($all_images);
     1562
     1563}
     1564
     1565
     1566sub show_reupload_options {
     1567    my ( $self ) = @_;
     1568
     1569    Uploader::GUI::wxImageReuploadDlg->new(
     1570        {
     1571            title => gettext("Photo update management"),
     1572            properties =>
     1573            {
     1574                $main::ID_REUPLOAD_ACTION_FILES =>
     1575                {
     1576                    selection=>sub {$self->preferences->reupload_action_files(@_)},
     1577                    label=>gettext("What shall we do with files? (thumbnail, resized, high resolution)"),
     1578                    labels=>[
     1579                        gettext("nothing"),
     1580                        gettext("replace"),
     1581                    ],
     1582                },
     1583                $main::ID_REUPLOAD_ACTION_PROPERTIES =>
     1584                {
     1585                    selection=>sub{$self->preferences->reupload_action_properties(@_)},
     1586                    label=>gettext("What shall we do with single value properties?(caption, comment, author, create date)"),
     1587                    labels=>[
     1588                        gettext("nothing"),
     1589                        gettext("fill if empty (only replace properties currently empty in Piwigo)"),
     1590                        gettext("replace"),
     1591                    ],
     1592                },
     1593                $main::ID_REUPLOAD_ACTION_PROPERTIES_M =>
     1594                {
     1595                    selection=>sub{$self->preferences->reupload_action_properties_m(@_)},
     1596                    label=>gettext("What shall we do with multiple values properties? (categories, tags)"),
     1597                    labels=>[
     1598                        gettext("nothing"),
     1599                        gettext("append (keep existing and add new)"),
     1600                        gettext("replace"),
     1601                    ],
     1602                },
     1603                $main::ID_REUPLOAD_NOT_ASK =>
     1604                {
     1605                    value=>sub{$self->preferences->reupload_not_ask(@_)},
     1606                    label=>gettext("Do not ask me again"),
     1607                },
     1608                $main::ID_REUPLOAD_TEXT =>
     1609                {
     1610                    label=>gettext("A least one photo has already been added in the past."),
     1611                },
     1612            },
     1613        }
     1614    )->ShowModal();
    15581615
    15591616}
Note: See TracChangeset for help on using the changeset viewer.