Changeset 5103 for extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm
- Timestamp:
- Mar 11, 2010, 10:38:04 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.