Changeset 3504
- Timestamp:
- Jul 3, 2009, 2:23:11 PM (15 years ago)
- Location:
- extensions/pLoader/trunk/src/Uploader
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
r3472 r3504 24 24 use Wx::DND; 25 25 use Wx qw/ 26 wxYES_NO 27 wxYES 28 wxICON_QUESTION 26 29 wxITEM_NORMAL 27 30 wxNullBitmap … … 369 372 use Uploader::GUI::wxImageListCtrl; 370 373 use Uploader::GUI::wxImageProcessingProgressDlg; 371 use Uploader::GUI::wxChoice GridPanel;374 use Uploader::GUI::wxChoiceFilteredPanel; 372 375 use Wx::Html; 373 376 use Uploader::GUI::wxHtmlWindow; … … 428 431 sub { $self->UploadImagesViewerRefresh(@_) } 429 432 ); 430 431 433 432 434 … … 718 720 719 721 $self->image_tags( 720 sub { $self->imagelist->current_image->site_tags(@_)}722 sub { eval { $self->imagelist->current_image->site_tags(@_) } } 721 723 ); 722 724 723 725 $self->piwigo_tags( 724 wxTheApp->pwg->tags||[]726 sub { wxTheApp->pwg->tags } 725 727 ); 728 } 729 730 sub _create_piwigo_tag { 731 my ( $self, $name ) = @_; 732 733 if( 734 Wx::MessageBox( 735 sprintf( 736 gettext("Do you want to create \"%s\" ?"), 737 $name, 738 ), 739 gettext("Piwigo search information"), 740 wxYES_NO | wxICON_QUESTION, 741 ) == wxYES 742 ){ 743 $self->pwg->AddTags($name); 744 $self->pwg->RefreshTags; 745 } 726 746 } 727 747 … … 905 925 906 926 $self->image_prop_tags( 907 Uploader::GUI::wxChoice GridPanel->new(927 Uploader::GUI::wxChoiceFilteredPanel->new( 908 928 { 909 929 parentwnd => $self, 910 930 choices => $self->piwigo_tags, 911 selection => $self->image_tags, 931 selection => $self->image_tags, 932 creation_callback => sub { $self->_create_piwigo_tag(@_) }, 912 933 } 913 934 ) -
extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm
r3472 r3504 209 209 } 210 210 211 sub AddTags { 212 my ( $self, $name ) = @_; 213 214 my $form = { 215 method => 'pwg.tags.add', 216 name => $name, 217 218 }; 219 220 my $result = $self->uagent->post( 221 $self->urlbase.'/ws.php?format=json', 222 $form 223 ); 224 225 my $content = {}; 226 eval { 227 $content = from_json( 228 $result->content 229 ); 230 }; 231 232 return ( $result->is_success, $result->status_line, $content ); 233 234 } 235 211 236 212 237 sub UploadImage {
Note: See TracChangeset
for help on using the changeset viewer.