Changeset 4784 for extensions
- Timestamp:
- Jan 28, 2010, 10:46:57 PM (14 years ago)
- Location:
- extensions/pLoader/trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/DlgCommon.pm
r4779 r4784 241 241 $self->properties->{$_}->{staticbox_label} 242 242 ) if exists $self->properties->{$_}->{staticbox_label}; 243 243 244 244 # radiobox 245 245 my $labels =$self->properties->{$_}->{labels}; … … 248 248 $ctrl->SetItemLabel($i, $labels->[$i]); 249 249 } 250 251 # notebook pages 252 my $texts =$self->properties->{$_}->{texts}; 253 $texts||=[]; 254 for(my $i=0; $i < scalar @$texts ; $i++){ 255 $ctrl->SetPageText($i, $texts->[$i]); 256 } 257 250 258 } 251 259 } -
extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm
r4779 r4784 131 131 __PACKAGE__->mk_accessors( @properties ); 132 132 133 use Wx::Event134 qw/135 EVT_MENU136 EVT_BUTTON137 EVT_TREE_SEL_CHANGED138 EVT_TREE_END_LABEL_EDIT139 EVT_CLOSE140 EVT_LIST_END_LABEL_EDIT141 EVT_LIST_ITEM_SELECTED142 EVT_LIST_ITEM_ACTIVATED143 EVT_LIST_ITEM_RIGHT_CLICK144 EVT_TREE_ITEM_RIGHT_CLICK145 EVT_LIST_KEY_DOWN146 EVT_SPLITTER_SASH_POS_CHANGING147 /;148 149 133 use Wx::Perl::TextValidator; 150 134 use Uploader::GUI::wxImageListCtrl; … … 369 353 selection => sub { $self->imagelist->current_image->privacy_level(@_)}, 370 354 choices => wxTheApp->privacy_level_choices, 371 } 355 }, 356 $main::PHOTO_PROPERTIES_NB => { texts => [gettext("Photo properties"), gettext("Tags")] }, 357 $main::PHOTO_PROPERTIES_UPLOAD => { label=>gettext("Upload to Piwigo") }, 372 358 } 373 359 ); … … 696 682 $self->create_toolbar; 697 683 698 $self->{sizer_h}= Wx::BoxSizer->new( wxHORIZONTAL );684 my $sizer_h = Wx::BoxSizer->new( wxHORIZONTAL ); 699 685 700 686 … … 711 697 ); 712 698 713 $self->horizontal_splitter(714 Wx::SplitterWindow->new( $self, -1 , wxDefaultPosition, wxDefaultSize, wxSP_3D )715 );716 699 717 700 $self->init_panels; … … 720 703 Uploader::GUI::wxPhotoProperties->new( 721 704 { 722 parentwnd => $self ->horizontal_splitter,705 parentwnd => $self, 723 706 properties => $self->piwigo_photo_properties, 724 707 tags => … … 737 720 ); 738 721 739 $self->create_tree; 740 741 $self->horizontal_splitter->SetMinimumPaneSize(50); 742 $self->horizontal_splitter->SplitHorizontally( 743 $self->dlg_piwigo_photo_properties, 744 $self->tree, 745 400 746 ); 722 $self->create_tree( 723 $self->dlg_piwigo_photo_properties->FindWindow($main::PHOTO_PROPERTIES_CATEGORIES) 724 ); 725 747 726 748 727 $self->init_dnd_targets; … … 758 737 759 738 # the imageviewer has a stretch factor of 1 : expands its size on frame resize 760 $s elf->{sizer_h}->AddWindow( $self->imageviewer, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL||wxSHAPED, 2 );761 $s elf->{sizer_h}->AddWindow( $self->horizontal_splitter, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL||wxSHAPED, 2 );739 $sizer_h->AddWindow( $self->imageviewer, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL||wxSHAPED, 2 ); 740 $sizer_h->AddWindow( $self->dlg_piwigo_photo_properties, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL||wxSHAPED, 2 ); 762 741 $self->SetSizer( 763 $s elf->{sizer_h}764 ); 765 766 $s elf->{sizer_h}->SetSizeHints(742 $sizer_h 743 ); 744 745 $sizer_h->SetSizeHints( 767 746 $self 768 747 ); 748 769 749 770 750 … … 989 969 990 970 sub create_tree { 991 my ( $self ) = @_;971 my ( $self, $tree ) = @_; 992 972 993 973 my $images = [ … … 1009 989 1010 990 $self->tree( 1011 Wx::TreeCtrl->new(991 $tree || Wx::TreeCtrl->new( 1012 992 $self->horizontal_splitter, 1013 993 -1, … … 1206 1186 Wx::Event::EVT_MENU( $self, 105, \&OnChooseLanguage ); 1207 1187 Wx::Event::EVT_CHOICE( $self, 106, \&OnPhotoSelMode ); 1208 EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged ); 1209 EVT_TREE_ITEM_RIGHT_CLICK( $self, $self->tree, \&OnTreeItemRightClick ); 1210 EVT_TREE_END_LABEL_EDIT( $self, $self->tree, \&OnTreeEndLabelEdit ); 1211 1212 EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit ); 1213 EVT_LIST_ITEM_ACTIVATED( $self, $self->imageviewer, \&OnImageViewerItemActivated ); 1214 EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ; 1215 EVT_LIST_ITEM_RIGHT_CLICK($self, $self->imageviewer, \&OnImageViewerItemRightClick) ; 1216 1217 EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ; 1218 1219 EVT_CLOSE( $self, \&OnClose ); 1220 1188 Wx::Event::EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged ); 1189 Wx::Event::EVT_TREE_ITEM_RIGHT_CLICK( $self, $self->tree, \&OnTreeItemRightClick ); 1190 Wx::Event::EVT_TREE_END_LABEL_EDIT( $self, $self->tree, \&OnTreeEndLabelEdit ); 1191 1192 Wx::Event::EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit ); 1193 Wx::Event::EVT_LIST_ITEM_ACTIVATED( $self, $self->imageviewer, \&OnImageViewerItemActivated ); 1194 Wx::Event::EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ; 1195 Wx::Event::EVT_LIST_ITEM_RIGHT_CLICK($self, $self->imageviewer, \&OnImageViewerItemRightClick) ; 1196 1197 Wx::Event::EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ; 1198 1199 Wx::Event::EVT_CLOSE( $self, \&OnClose ); 1221 1200 1222 1201 Wx::Event::EVT_MENU( $self, 1+$ID_TREE_CTX_MENU, \&OnAddCategories ); … … 1228 1207 Wx::Event::EVT_MENU( $self, 2+$ID_IMAGEVIEWER_CTX_MENU, \&OnPreview ); 1229 1208 1230 1209 Wx::Event::EVT_BUTTON( $self, $main::PHOTO_PROPERTIES_UPLOAD, \&OnUploadImages ); 1231 1210 1232 1211 } -
extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm
r4779 r4784 128 128 # at that moment, object is not yet instanciated 129 129 # only way : class variable 130 # there is only one instance of wxApp 130 131 my $bin_dir; 131 132 my $resource_dir; … … 645 646 my $icon = Wx::Icon->new(); 646 647 $icon->LoadFile( 647 File::Spec->catfile($self->bin_dir, '..', 'res','favicon.ico'),648 $self->resource_path('favicon.ico'), 648 649 wxBITMAP_TYPE_ICO 649 650 ); 650 $self->login_dlg->SetIcon($icon); 651 652 $self->login_dlg->SetIcon($icon); 651 653 652 654 … … 921 923 wxBITMAP_TYPE_ICO 922 924 ); 923 $self->frame->SetIcon($icon); 925 $self->frame->SetIcon($icon); 924 926 } 925 927 -
extensions/pLoader/trunk/src/Uploader/GUI/wxPhotoProperties.pm
r4779 r4784 30 30 use base qw/Wx::Panel Uploader::GUI::DlgCommon/; 31 31 use Wx::Event qw/ 32 EVT_UPDATE_UI33 32 EVT_BUTTON 34 33 EVT_CLOSE … … 46 45 # load controls 47 46 eval { 48 &main::PhotoProperties($self, $params->{tags});47 &main::PhotoPropertiesCategoriesTags($self, $params->{tags}); 49 48 50 $self->properties( 51 $params->{properties} 49 $self->_initNotebook($params->{tags}); 50 51 52 $self->properties( 53 $params->{properties} 52 54 ); 53 55 54 56 $self->InitLabels(); 55 57 $self->InitChoices(); 56 58 $self->SetProperties(); 57 59 $self->InitHandler(); 58 60 $self->_initEventHandlers(); 59 61 60 if($@){ 61 Wx::LogMessage("Error during dialogbox initialization"); 62 } 63 }; 62 if($@){ 63 Wx::LogMessage("Error during dialogbox initialization"); 64 } 65 }; 66 64 67 65 68 $self; … … 74 77 EVT_CLOSE( $self, \&OnClose ); 75 78 76 79 } 80 81 82 sub _initNotebook{ 83 my ( $self, $tags ) = @_; 84 85 my $nb = $self->FindWindow( 86 $main::PHOTO_PROPERTIES_NB 87 ); 88 89 my( $page1 ) = Wx::Panel->new( $nb, -1 ); 90 &main::photo_properties_caption_comments( $page1, 0 ); 91 $nb->AddPage( $page1, "Photo informations" ); 92 93 my( $page2 ) = Wx::Panel->new( $nb, -1 ); 94 &main::photo_properties_tags( $page2, $tags ); 95 $nb->AddPage( $page2, "Tags" ); 96 77 97 } 78 98 -
extensions/pLoader/trunk/src/ploader.pl
r4779 r4784 40 40 require 'reupload_wdr.pl'; 41 41 require 'photo_properties_wdr.pl'; 42 require 'photo_properties_with_categories_tags_wdr.pl'; 42 43 require 'image_properties_exif_wdr.pl'; 43 44
Note: See TracChangeset
for help on using the changeset viewer.