source: extensions/pLoader/trunk/res/reupload_wdr.pl @ 4467

Revision 4467, 3.4 KB checked in by ronosman, 10 years ago (diff)

Feature 1052 added : photo re-upload management. When uploading an already added photo, the user is warned and has a choice on action for files, simple properties and multi-values properties.

Line 
1#-----------------------------------------------------------------------------
2# Perl source generated by wxDesigner from file: reupload.wdr
3# Do not modify this file, all changes will be lost!
4#-----------------------------------------------------------------------------
5
6use Wx;
7use Wx::Calendar;
8use Wx::DateTime;
9use Wx::Grid;
10use strict;
11
12use Wx qw( wxDefaultSize wxDefaultPosition wxNullAnimation wxNullFont wxBLACK );
13use Wx qw( wxID_OK wxID_APPLY wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_NO wxID_EXIT wxID_ABOUT wxID_HELP );
14use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW );
15use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
16use Wx qw( wxRA_SPECIFY_COLS );
17
18# Bitmap functions
19
20use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
21
22# Window functions
23
24use vars qw($ID_REUPLOAD_TEXT); $ID_REUPLOAD_TEXT = 10000;
25use vars qw($ID_REUPLOAD_ACTION_FILES); $ID_REUPLOAD_ACTION_FILES = 10001;
26use vars qw($ID_REUPLOAD_ACTION_PROPERTIES); $ID_REUPLOAD_ACTION_PROPERTIES = 10002;
27use vars qw($ID_REUPLOAD_ACTION_PROPERTIES_M); $ID_REUPLOAD_ACTION_PROPERTIES_M = 10003;
28use vars qw($ID_REUPLOAD_NOT_ASK); $ID_REUPLOAD_NOT_ASK = 10004;
29use vars qw($ID_REUPLOAD_OK); $ID_REUPLOAD_OK = 10005;
30
31sub Reupload {
32    my( $parent ) = $_[0];
33    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
34   
35    my( $item1 ) = Wx::StaticText->new( $parent, $main::ID_REUPLOAD_TEXT, "Some photos in the selection have already been uploaded. What do you want to do ?", wxDefaultPosition, wxDefaultSize, 0 );
36    $item0->AddWindow( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
37
38    my( $item2 ) = Wx::RadioBox->new( $parent, $main::ID_REUPLOAD_ACTION_FILES, "Thumbnail, web size, high definition files", wxDefaultPosition, [450,-1], 
39        ["nothing","replace"] , 1, wxRA_SPECIFY_COLS );
40    $item0->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
41
42    my( $item3 ) = Wx::RadioBox->new( $parent, $main::ID_REUPLOAD_ACTION_PROPERTIES, "Title, description, author, created date )", wxDefaultPosition, [450,-1], 
43        ["nothing","append ( keep existing and set if not defined in Piwigo )","replace"] , 1, wxRA_SPECIFY_COLS );
44    $item0->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
45
46    my( $item4 ) = Wx::RadioBox->new( $parent, $main::ID_REUPLOAD_ACTION_PROPERTIES_M, "Categories, tags", wxDefaultPosition, [450,-1], 
47        ["nothing","append ( keep existing and add new )","replace"] , 1, wxRA_SPECIFY_COLS );
48    $item0->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
49
50    my( $item5 ) = Wx::CheckBox->new( $parent, $main::ID_REUPLOAD_NOT_ASK, "Do not ask me again", wxDefaultPosition, wxDefaultSize, 0 );
51    $item0->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
52
53    my( $item6 ) = Wx::Button->new( $parent, $main::ID_REUPLOAD_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 );
54    $item0->AddWindow( $item6, 0, wxALIGN_CENTER|wxALL, 5 );
55
56    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
57    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
58    if( $set_size == 1 ) {
59         $_[0]->SetSizer( $item0 );
60         
61         if( $call_fit == 1 ) {
62             $item0->SetSizeHints( $_[0] );
63         }
64    }
65   
66    $item0;
67}
68
69# Menu bar functions
70
71
72# Toolbar functions
73
74use Wx qw( wxITEM_NORMAL wxITEM_RADIO wxITEM_CHECK );
75
76
77# End of generated file
Note: See TracBrowser for help on using the repository browser.