Changeset 5103
- Timestamp:
- Mar 11, 2010, 10:38:04 AM (14 years ago)
- Location:
- extensions/pLoader/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/locale/fr_FR/pLoader.po
r5041 r5103 647 647 msgstr "Quel est l'album destination ?" 648 648 649 msgid "Properties of the %s selected photos" 650 msgstr "Propriétés des %s photos sélectionnées" 651 652 msgid "Tags of the %s selected photos" 653 msgstr "Tags des %s photos sélectionnées" 649 msgid "Caption" 650 msgstr "Titre" 651 652 msgid "Who can see?" 653 msgstr "Qui peut voir ?" 654 655 msgid "You have selected a batch of %s photos" 656 msgstr "Vous avez sélectionné un lot de %s photos" 657 658 msgid "Changes apply to the whole batch" 659 msgstr "Les modifications s'appliquent à toutes les photos de la sélection" -
extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm
r5041 r5103 291 291 $self->imageviewer_item_refresh(0); 292 292 } 293 $self->OnUpdateNotebook; 293 294 294 $self->OnUpdateToolbar; 295 295 $event->Skip; … … 334 334 $self->piwigo_photo_properties( 335 335 { 336 $main::CAPTION => { label=>gettext(" Photo caption")},336 $main::CAPTION => { label=>gettext("Caption")}, 337 337 $main::PHOTO_PROPERTIES_CAPTION => { 338 338 value => sub { … … 371 371 frame_callback => sub { $self->imageviewer_item_refresh(1); }, 372 372 }, 373 $main::PRIVACY_LEVEL => { label=>gettext("Who can see the photo?")},373 $main::PRIVACY_LEVEL => { label=>gettext("Who can see?")}, 374 374 $main::PHOTO_PROPERTIES_PRIVACY_LEVEL => { 375 375 selection => sub { … … 382 382 $main::PHOTO_PROPERTIES_NB => { 383 383 texts => [ 384 gettext("P hoto properties"),384 gettext("Properties"), 385 385 gettext("Tags") 386 386 ], 387 multi_texts => [388 sub { sprintf(gettext("Properties of the %s selected photos"), $self->imageviewer->GetSelectectItemsCount ) },389 sub { sprintf(gettext("Tags of the %s selected photos"), $self->imageviewer->GetSelectectItemsCount) },390 ],391 387 }, 392 388 $main::PHOTO_PROPERTIES_UPLOAD => { label=>gettext("Upload to Piwigo") }, … … 1286 1282 } 1287 1283 1288 sub OnUpdateNotebook{1289 my( $self ) = @_;1290 1291 # Notebook page caption change according to photo selection1292 # include count when selection is multiple1293 my $texts;1294 if(!$self->multi_selection_mode){1295 $texts = $self->piwigo_photo_properties->{$main::PHOTO_PROPERTIES_NB}->{texts};1296 }1297 else {1298 $texts = [ map { $_->() } @{$self->piwigo_photo_properties->{$main::PHOTO_PROPERTIES_NB}->{multi_texts}} ];1299 }1300 1301 $texts||=[];1302 for(my $i=0; $i < scalar @$texts ; $i++){1303 $self->dlg_piwigo_photo_properties->{notebook}->SetPageText($i, $texts->[$i]);1304 }1305 1306 }1307 1284 1308 1285 sub OnRemoveImages { … … 1321 1298 $self->piwigo_photo_properties_tags->ClearAllSelection; 1322 1299 $self->imagelist->SetCurrentImage(-1); 1300 } 1301 if(!$self->multi_selection_mode){ 1302 $self->OnUpdateSingleSelectionModeUI; 1323 1303 } 1324 1304 … … 1590 1570 # for batch mode : reset the batch buffer if single selection 1591 1571 if($self->multi_selection_mode){ 1572 $self->OnUpdateMultiSelectionModeUI; 1592 1573 $self->imagelist->SetImageSelectionTags([]); 1593 1574 $self->imagelist->image_selection_privacy_level(-1); … … 1597 1578 $self->imagelist->image_selection_create_date(-1); 1598 1579 } 1580 else{ 1581 $self->OnUpdateSingleSelectionModeUI; 1582 } 1599 1583 # process image_preview in idle time 1600 1584 # and when current event is processed … … 1613 1597 scalar @{$self->imagelist->image_selection} > 1; 1614 1598 } 1599 1600 sub OnUpdateMultiSelectionModeUI{ 1601 my( $self ) = @_; 1602 1603 1604 $self->dlg_piwigo_photo_properties->{_multi_selection_mode_panel}{_text1}->SetLabel( 1605 sprintf(gettext("You have selected a batch of %s photos"), $self->imageviewer->GetSelectectItemsCount ) 1606 ); 1607 1608 $self->dlg_piwigo_photo_properties->{_multi_selection_mode_panel}{_text2}->SetLabel( 1609 gettext("Changes apply to the whole batch") 1610 ); 1611 1612 $self->dlg_piwigo_photo_properties->{_multi_selection_mode_panel}->Show(1); 1613 $self->dlg_piwigo_photo_properties->Layout; 1614 } 1615 1616 sub OnUpdateSingleSelectionModeUI{ 1617 my( $self ) = @_; 1618 1619 $self->dlg_piwigo_photo_properties->{_multi_selection_mode_panel}->Show(0); 1620 $self->dlg_piwigo_photo_properties->Layout; 1621 1622 } 1623 1615 1624 1616 1625 sub set_preview_image { … … 1682 1691 ) if !$self->imageviewer->GetItemCount; 1683 1692 1693 # reset previous selection 1694 $self->imagelist->image_selection( 1695 [] 1696 ); 1697 1698 if(!$self->multi_selection_mode){ 1699 $self->OnUpdateSingleSelectionModeUI; 1700 } 1684 1701 1685 1702 $self->image_preview->Refresh; -
extensions/pLoader/trunk/src/Uploader/GUI/Layout/PhotoPropertiesCategoriesTags.pm
r4974 r5103 28 28 my( $parent ) = @_; 29 29 my( $topsizer ) = Wx::BoxSizer->new( wxVERTICAL ); 30 30 31 $parent->{_multi_selection_mode_panel} = Wx::Panel->new( 32 $parent, 33 -1, 34 wxDefaultPosition, 35 [450, -1] 36 ); 37 38 _multi_selection_mode_panel_layout( 39 $parent->{_multi_selection_mode_panel} 40 ); 41 42 $parent->{_multi_selection_mode_panel}->Show(0); 43 44 $topsizer->Add( 45 $parent->{_multi_selection_mode_panel}, 46 0, 47 wxEXPAND|wxLEFT|wxRIGHT, 48 5 49 ); 50 51 31 52 # defines minimum size 32 53 my( $item2 ) = Wx::Notebook->new( $parent, $main::PHOTO_PROPERTIES_NB, wxDefaultPosition, [450,160], 0 ); … … 37 58 38 59 # the notebook has adaptive size : stretch factor 2, wxEXPAND 39 $topsizer->Add( $item1, 2, wxEXPAND|wxAL IGN_CENTER_VERTICAL|wxALL, 5 );60 $topsizer->Add( $item1, 2, wxEXPAND|wxALL, 5 ); 40 61 41 62 my( $item3 ) = Wx::TreeCtrl->new( $parent, $main::PHOTO_PROPERTIES_CATEGORIES, wxDefaultPosition, [450,160], wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT ); 42 63 # the notebook has adaptive size : stretch factor 1, wxEXPAND 43 $topsizer->AddWindow( $item3, 1, wx GROW|wxALL, 5 );64 $topsizer->AddWindow( $item3, 1, wxEXPAND|wxALL, 5 ); 44 65 45 66 my( $item4 ) = Wx::StaticLine->new( $parent, $main::ID_LINE, wxDefaultPosition, [20,-1], wxLI_HORIZONTAL ); 46 $topsizer->AddWindow( $item4, 0, wx GROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );67 $topsizer->AddWindow( $item4, 0, wxEXPAND|wxALL, 5 ); 47 68 48 69 my( $item5 ) = Wx::Button->new( $parent, $main::PHOTO_PROPERTIES_UPLOAD, "", wxDefaultPosition, [-1,40], 0 ); … … 51 72 # $item5->SetForegroundColour( Wx::wxGREEN ); 52 73 $item5->SetForegroundColour( Wx::Colour->new(255, 51, 99) ); 53 $topsizer->AddWindow( $item5, 0, wx GROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );74 $topsizer->AddWindow( $item5, 0, wxEXPAND|wxALL, 5 ); 54 75 55 76 $parent->SetSizer( $topsizer ); … … 58 79 $topsizer; 59 80 } 60 61 81 use vars qw($TAGS); $TAGS = 10004; 62 82 use vars qw($PHOTO_PROPERTIES_TAG); $PHOTO_PROPERTIES_TAG = 10005; … … 93 113 sub photo_properties_caption_comments { 94 114 my( $parent ) = @_; 95 my( $topsizer ) = Wx::BoxSizer->new( wxVERTICAL ); 96 97 my( $item1 ) = Wx::BoxSizer->new( wxVERTICAL ); 98 99 my( $item2 ) = Wx::StaticText->new( $parent, $main::CAPTION, "text", wxDefaultPosition, wxDefaultSize, 0 ); 100 $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 101 102 my( $item3 ) = Wx::TextCtrl->new( $parent, $main::PHOTO_PROPERTIES_CAPTION, "", wxDefaultPosition, [-1,-1], 0 ); 103 $item1->AddWindow( $item3, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 104 105 $topsizer->Add( $item1, 0, wxEXPAND, 5 ); 106 107 my( $item4 ) = Wx::BoxSizer->new( wxVERTICAL ); 108 109 my( $item5 ) = Wx::StaticText->new( $parent, $main::AUTHOR, "text", wxDefaultPosition, wxDefaultSize, 0 ); 110 $item4->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 111 112 my( $item6 ) = Wx::TextCtrl->new( $parent, $main::PHOTO_PROPERTIES_AUTHOR, "", wxDefaultPosition, [-1,-1], 0 ); 113 $item4->AddWindow( $item6, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 114 115 my( $item7 ) = Wx::StaticText->new( $parent, $main::COMMENT, "text", wxDefaultPosition, wxDefaultSize, 0 ); 116 $item4->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 117 118 # adaptive size : stretch factor 1 119 # the textctrl has a variable line number 120 my( $item8 ) = Wx::TextCtrl->new( $parent, $main::PHOTO_PROPERTIES_COMMENT, "", wxDefaultPosition, [-1,-1], wxTE_MULTILINE ); 121 $item4->AddWindow( $item8, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 122 123 my( $item9 ) = Wx::StaticText->new( $parent, $main::CREATE_DATE, "text", wxDefaultPosition, wxDefaultSize, 0 ); 124 $item4->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 125 126 my( $item10 ) = Wx::DatePickerCtrl->new( $parent, $main::PHOTO_PROPERTIES_CREATE_DATE, Wx::DateTime->new(), wxDefaultPosition, [200,-1], wxDP_DROPDOWN ); 127 $item4->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 128 # adaptive size : stretch factor 3 129 $topsizer->Add( $item4, 3, wxEXPAND, 5 ); 130 131 my( $item11 ) = Wx::BoxSizer->new( wxVERTICAL ); 132 133 my( $item12 ) = Wx::StaticText->new( $parent, $main::PRIVACY_LEVEL, "text", wxDefaultPosition, wxDefaultSize, 0 ); 134 $item11->AddWindow( $item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 135 136 my( $item13 ) = Wx::Choice->new( $parent, $main::PHOTO_PROPERTIES_PRIVACY_LEVEL, wxDefaultPosition, [-1,-1], [], 0 ); 137 $item11->AddWindow( $item13, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); 138 139 # adaptive size : stretch factor 1 140 $topsizer->Add( $item11, 1, wxEXPAND, 5 ); 115 116 my $topsizer = Wx::BoxSizer->new( wxVERTICAL ); 117 118 $topsizer->Add( 119 TextField( 120 $parent, 121 $main::CAPTION, 122 $main::PHOTO_PROPERTIES_CAPTION 123 ), 124 0, 125 wxEXPAND|wxALL, 126 2 127 ); 128 129 $topsizer->Add( 130 TextField( 131 $parent, 132 $main::COMMENT, 133 $main::PHOTO_PROPERTIES_COMMENT, 134 1 135 ), 136 1, 137 wxEXPAND|wxALL, 138 2 139 ); 140 141 my $sizer_author_create = Wx::BoxSizer->new( wxVERTICAL ); 142 $sizer_author_create->Add( 143 TextField( 144 $parent, 145 $main::AUTHOR, 146 $main::PHOTO_PROPERTIES_AUTHOR 147 ), 148 1, 149 wxEXPAND|wxALL, 150 2 151 ); 152 153 $sizer_author_create->Add( 154 DatepickerField( 155 $parent, 156 $main::CREATE_DATE, 157 $main::PHOTO_PROPERTIES_CREATE_DATE 158 ), 159 1, 160 wxEXPAND|wxALL, 161 2 162 ); 163 164 my $sizer_author_create_privacy = Wx::BoxSizer->new( wxHORIZONTAL ); 165 166 $sizer_author_create_privacy->Add($sizer_author_create, 0, wxEXPAND|wxALL, 0); 167 168 $sizer_author_create_privacy->Add( 169 ChoiceField( 170 $parent, 171 $main::PRIVACY_LEVEL, 172 $main::PHOTO_PROPERTIES_PRIVACY_LEVEL, 173 1 174 ), 175 1, 176 wxEXPAND|wxALL, 177 2 178 ); 179 180 $topsizer->Add( $sizer_author_create_privacy, 0, wxEXPAND|wxALL, 2 ); 141 181 142 182 $parent->SetSizer( $topsizer ); … … 148 188 use Wx qw( wxITEM_NORMAL wxITEM_RADIO wxITEM_CHECK ); 149 189 190 191 sub TextField { 192 my ( $parent, $id_label, $id_textctrl, $expand ) = @_; 193 194 $expand ||=0; 195 196 my( $sizer ) = Wx::BoxSizer->new( wxVERTICAL ); 197 198 $sizer->Add( 199 Wx::StaticText->new( 200 $parent, 201 $id_label, 202 "text", 203 wxDefaultPosition, 204 wxDefaultSize, 205 0 206 ), 207 0, 208 wxALL, 209 1 210 ); 211 212 $sizer->Add( 213 Wx::TextCtrl->new( 214 $parent, 215 $id_textctrl, 216 "", 217 wxDefaultPosition, 218 [-1,-1], 219 0 220 ), 221 $expand, 222 wxEXPAND|wxALL, 223 1 224 ); 225 226 $sizer; 227 } 228 229 sub DatepickerField { 230 my ( $parent, $id_label, $id_ctrl, $expand ) = @_; 231 232 $expand ||=0; 233 234 my( $sizer ) = Wx::BoxSizer->new( wxVERTICAL ); 235 236 $sizer->Add( 237 Wx::StaticText->new( 238 $parent, 239 $id_label, 240 "text", 241 wxDefaultPosition, 242 wxDefaultSize, 243 0 244 ), 245 0, 246 wxALL, 247 1 248 ); 249 250 $sizer->Add( 251 Wx::DatePickerCtrl->new( 252 $parent, 253 $id_ctrl, 254 Wx::DateTime->new(), 255 wxDefaultPosition, 256 [200,-1], 257 wxDP_DROPDOWN 258 ), 259 $expand, 260 wxEXPAND|wxALL, 261 1 262 ); 263 264 $sizer; 265 } 266 267 sub ChoiceField { 268 my ( $parent, $id_label, $id_ctrl, $expand ) = @_; 269 270 $expand ||=0; 271 272 my( $sizer ) = Wx::BoxSizer->new( wxVERTICAL ); 273 274 $expand||=0; 275 276 $sizer->Add( 277 Wx::StaticText->new( 278 $parent, 279 $id_label, 280 "text", 281 wxDefaultPosition, 282 wxDefaultSize, 283 0 284 ), 285 0, 286 wxALL, 287 1 288 ); 289 290 $sizer->Add( 291 Wx::Choice->new( 292 $parent, 293 $id_ctrl, 294 wxDefaultPosition, 295 [-1,-1], 296 [], 297 0 298 ), 299 1, 300 wxEXPAND|wxALL, 301 1 302 ); 303 304 $sizer; 305 } 306 307 sub _multi_selection_mode_panel_layout{ 308 my ( $panel ) = @_; 309 310 my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL ); 311 312 my $fb = Wx::Font->new( 10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ); 313 my $fn = Wx::Font->new( 10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ); 314 315 $panel->{_text1} = Wx::StaticText->new( $panel, -1, "Text", wxDefaultPosition, wxDefaultSize, 0 ); 316 $panel->{_text1}->SetFont($fb); 317 $item0->Add( $panel->{_text1}, 0, wxALIGN_LEFT|wxALL, 1 ); 318 319 320 $panel->{_text2} = Wx::StaticText->new( $panel, -1, "Text", wxDefaultPosition, wxDefaultSize, 0 ); 321 $panel->{_text2}->SetFont($fn); 322 $item0->Add( $panel->{_text2}, 0, wxALIGN_LEFT|wxALL, 1 ); 323 324 $panel->SetSizer( $item0 ); 325 $item0->SetSizeHints( $panel ); 326 327 } -
extensions/pLoader/trunk/src/Uploader/ImageList.pm
r5041 r5103 741 741 display_mode 742 742 image_selection_tags 743 image_selection_properties744 743 / 745 744 ]
Note: See TracChangeset
for help on using the changeset viewer.