Changeset 3284 for extras/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
- Timestamp:
- May 15, 2009, 8:41:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extras/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
r3269 r3284 335 335 preview_settings 336 336 toolbar 337 branding 338 preview_w 339 preview_h 340 perspective 337 341 /; 338 342 __PACKAGE__->mk_accessors( @properties ); … … 345 349 EVT_LIST_END_LABEL_EDIT 346 350 EVT_LIST_ITEM_SELECTED 351 EVT_LIST_ITEM_ACTIVATED 347 352 EVT_TREE_ITEM_RIGHT_CLICK 348 353 EVT_LIST_KEY_DOWN … … 374 379 wxDEFAULT_FRAME_STYLE|wxMAXIMIZE 375 380 ); 381 $self->preview_w( 382 $params->{preview_w}||400 383 ); 384 385 $self->preview_h( 386 $params->{preview_h}||300 387 ); 388 389 $self->perspective( 390 $params->{perspective} 391 ); 392 376 393 $self->pwg( $params->{pwg} ); 377 394 $self->imagelist( $params->{imagelist} ); … … 426 443 ); 427 444 445 428 446 $self->manager( Wx::AuiManager->new ); 447 $self->manager->SetDockSizeConstraint(1, 1); 429 448 $self->manager->SetManagedWindow( $self ); 430 449 $self->_set_setting_properties; … … 436 455 } 437 456 457 438 458 sub _initImgTypes { 439 459 my ( $self ) = @_; … … 461 481 [ 462 482 { 463 label => "Photo name :",483 label => gettext("Photo caption :"), 464 484 value => sub { $self->imagelist->current_image->site_name(@_) }, 465 485 }, … … 548 568 }, 549 569 { 550 label => gettext("Default photo name:"),570 label => gettext("Default photo caption :"), 551 571 type => 'Choice', 552 572 value => sub { $self->imagelist->default_photo_name(@_) }, … … 563 583 }, 564 584 { 565 label => gettext("Photo nameprefix :"),585 label => gettext("Photo caption prefix :"), 566 586 value => sub { $self->imagelist->default_name_prefix(@_) }, 567 587 }, … … 581 601 value => sub { $self->imagelist->upload_high(@_) }, 582 602 }, 603 # { 604 # label => gettext("Remove uploaded photo from selection :"), 605 # type => 'Bool', 606 # value => sub { $self->imagelist->remove_uploaded_from_selection(@_) }, 607 # }, 583 608 ] 584 609 ); … … 822 847 ) 823 848 ); 824 825 849 826 850 $self->general_settings_panel->Show(0); … … 830 854 $self, 831 855 -1, 832 wxNullBitmap 856 wxNullBitmap, 857 wxDefaultPosition, 858 [$self->preview_w, $self->preview_h] 833 859 ) 834 860 ); 835 861 836 837 838 862 $self->image_prop_piwigo->Show(0); 839 840 841 863 842 864 $self->image_prop_exif->Show(0); … … 890 912 sub init_aui { 891 913 my ( $self ) = @_; 892 914 893 915 my $url = wxTheApp->site_url; 894 916 … … 901 923 $self->manager->AddPane 902 924 ( $self->create_tree, Wx::AuiPaneInfo->new->Name( "categories" )->Caption( 903 sprintf("%s - %s", gettext("Piwigo categories"), $url )925 sprintf("%s - %s", sprintf("Piwigo %s", wxTheApp->branding->{categories}), $url ) 904 926 ) 905 927 ->Right->Position( 0 )->Resizable->CloseButton(0) ); … … 920 942 ->ToolbarPane->Top->Row( 1 )->LeftDockable( 0 )->RightDockable( 0 ) ) if defined $self->toolbar; 921 943 944 if( $self->perspective){ 945 $self->manager->LoadPerspective($self->perspective); 946 } 947 922 948 $self->manager->Update; 923 949 … … 929 955 $self->manager->AddPane 930 956 ( $self->create_notebook_image_properties, Wx::AuiPaneInfo->new->Name( "photo_properties" )->Caption(gettext("Photo properties")) 931 -> Right->Position( 1 )->Resizable->CloseButton(0) );957 ->Floatable(1)->Resizable->CloseButton(1) ); 932 958 933 959 $self->manager->AddPane 934 960 ( $self->create_notebook_global_settings, Wx::AuiPaneInfo->new->Name( "global_settings" )->Caption(gettext("Global settings")) 935 ->Right->Position( 2 )->Resizable->CloseButton(1) ); 936 961 ->Floatable(1)->Resizable->CloseButton(1) ); 962 963 $self->manager->GetPane("photo_properties")->Show(0); 937 964 $self->manager->GetPane("global_settings")->Show(0); 938 965 939 966 } 940 967 968 sub OnPhotoProperties { 969 my ( $self ) = @_; 970 971 $self->manager->GetPane("photo_properties")->Float; 972 $self->manager->GetPane("photo_properties")->Show(1); 973 $self->manager->Update(); 974 975 } 976 941 977 sub OnGlobalSettings { 942 978 my ( $self ) = @_; 943 979 944 980 $self->toolbar->EnableTool(104, 0 ); 981 $self->manager->GetPane("global_settings")->Float; 945 982 $self->manager->GetPane("global_settings")->Show(1); 946 983 $self->manager->Update(); … … 1115 1152 } 1116 1153 1117 #$tree_items is a list of anonymous arrays1118 # [ itemLabel, undef, rootInfo, ImageIndex, SelImageIndex ] for the root1119 1120 # [ itemLabel,1121 # [ childItemLabel,1122 # [...],1123 # childItemdata,1124 # childImageIndex,1125 # childSelImageIndex1126 # ],1127 # Itemdata,1128 # ImageIndex,1129 # SelImageIndex1130 # ]1131 1154 1132 1155 # returns a valid itemData … … 1217 1240 EVT_TREE_ITEM_RIGHT_CLICK( $self->tree, $self->tree, \&OnTreeItemRightClick ); 1218 1241 EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit ); 1242 EVT_LIST_ITEM_ACTIVATED( $self, $self->imageviewer, \&OnImageViewerItemActivated ); 1219 1243 EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ; 1220 1244 EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ; … … 1234 1258 my( $self, $event ) = @_; 1235 1259 my $dialog = Wx::FileDialog->new 1236 ( $self, "Select photos to send", $prevfile, $prevdir,1237 "JPEG files (*.jpg)|*.jpg|All(*.*)|*.*",1260 ( $self, gettext("Select photos for upload"), $prevfile, $prevdir, 1261 sprintf("%s (*.jpg)|*.jpg|All(*.*)|*.*", gettext("JPEG files")), 1238 1262 wxFD_OPEN|wxFD_MULTIPLE ); 1239 1263 … … 1332 1356 } 1333 1357 ( 1334 [1+$ID_TREE_CTX_MENU, "Add new category","Add a new category to the current selected category."], 1335 [2+$ID_TREE_CTX_MENU, "Refresh","Refresh category list."], 1358 [ 1359 1+$ID_TREE_CTX_MENU, 1360 wxTheApp->branding->{'Add new category'}, 1361 sprintf( 1362 "%s %s %s %s", 1363 gettext("Add a new"), 1364 wxTheApp->branding->{category}, 1365 gettext("to the currently selected"), 1366 wxTheApp->branding->{category}, 1367 ) 1368 ], 1369 [ 1370 2+$ID_TREE_CTX_MENU, 1371 "Refresh", 1372 sprintf( 1373 "Refresh %s list.", 1374 wxTheApp->branding->{category}, 1375 ) 1376 ], 1336 1377 ); 1337 1378 $self->PopupMenu($ctx_mnu, $point); … … 1351 1392 my $dialog = Wx::TextEntryDialog->new( 1352 1393 $self, 1353 gettext("Category name :"),1354 gettext("Add new category"),1355 gettext("New category"),1394 sprintf("Category name :", wxTheApp->branding->{Category}), 1395 sprintf("Add new %s", wxTheApp->branding->{category}), 1396 sprintf("New %s", wxTheApp->branding->{category}), 1356 1397 ); 1357 1398 … … 1390 1431 1391 1432 $self->image_prop_piwigo->Refresh; 1433 } 1434 1435 sub OnImageViewerItemActivated { 1436 my( $self, $event ) = @_; 1437 1438 $self->OnPhotoProperties; 1392 1439 } 1393 1440 … … 1591 1638 Wx::MessageBox( 1592 1639 sprintf( 1593 gettext("Please select a valid target category"), 1640 "%s %s", 1641 gettext("Please select a valid target"), 1642 wxTheApp->branding->{category} 1594 1643 ), 1595 1644 gettext("Piwigo upload error"), … … 1632 1681 my $self = shift; 1633 1682 1683 1634 1684 # Restaure previous log wnd 1635 1685 Wx::Log::SetActiveTarget( $self->oldlogwnd ); … … 1641 1691 $self->imagelist->Store; 1642 1692 wxTheApp->login_dlg->Destroy; 1693 1694 my $params = {}; 1695 1696 ( $params->{'X'}, $params->{'Y'} ) = $self->GetPositionXY ; 1697 ( $params->{'Width'}, $params->{'Height'} ) = $self->GetSizeWH ; 1698 ( $params->{'PreviewWidth'}, $params->{'PreviewHeight'} ) = $self->image_preview->GetSizeWH ; 1699 $params->{Perspective} = $self->manager->SavePerspective; 1700 1701 1702 wxTheApp->SaveConfig( $params ); 1703 1643 1704 $self->Destroy; 1644 1705 }
Note: See TracChangeset
for help on using the changeset viewer.