Changeset 4478
- Timestamp:
- Dec 13, 2009, 6:42:29 PM (14 years ago)
- Location:
- extensions/pLoader/trunk/src/Uploader
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/DlgCommon.pm
r4477 r4478 94 94 }; 95 95 96 my $clear_value = { 97 'Wx::TextCtrl' => sub { my ($ctrl) = @_; $ctrl->Clear}, 98 'Wx::CheckBox' => sub { my ($ctrl) = @_; $ctrl->SetValue(0)}, 99 'Wx::DatePickerCtrl' => sub { my ($ctrl) = @_; $ctrl->SetValue(Wx::DateTime->new->SetToCurrent)}, 100 }; 101 96 102 sub SetProperties { 97 103 my ( $self ) = @_; … … 177 183 } 178 184 185 sub ClearProperties { 186 my ( $self ) = @_; 187 188 map { 189 my $ctrl =$self->FindWindow($_); 190 if(defined $ctrl){ 191 # checkbox, static text 192 $clear_value->{ref $ctrl}->( 193 $ctrl 194 ) if exists $clear_value->{ref $ctrl}; 195 # only works for control with items 196 $ctrl->SetSelection( 197 -1 198 ) if exists $self->properties->{$_}->{selection}; 199 } 200 } 201 keys %{$self->properties}; 202 203 } 179 204 1; -
extensions/pLoader/trunk/src/Uploader/GUI/wxChoiceFilteredPanel.pm
r4475 r4478 183 183 } 184 184 185 sub ClearAllSelection { 186 my ( $self ) = @_; 187 188 my $row = 0; 189 190 my $choices = $self->choices->(); 191 map { 192 $self->listchoices->Check($row, 0) ; 193 $row++; 194 }@$choices; 195 196 197 } 185 198 186 199 sub SetSelection { -
extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
r4476 r4478 1527 1527 $self->imageviewer->Refresh; 1528 1528 1529 $self->image_preview->image( 1530 0 1531 ) if !$self->imageviewer->GetItemCount; 1529 if (!$self->imageviewer->GetItemCount){ 1530 $self->image_preview->image( 1531 0 1532 ); 1533 # have to reset 1534 $self->dlg_piwigo_photo_properties->ClearProperties; 1535 $self->piwigo_photo_properties_tags->ClearAllSelection; 1536 $self->imagelist->SetCurrentImage(-1); 1537 } 1532 1538 1533 1539 $self->image_preview->Refresh; … … 1758 1764 sub OnImageViewerItemSelected { 1759 1765 my( $self, $event ) = @_; 1760 1761 1766 my $bc = Wx::BusyCursor->new; 1762 1767 -
extensions/pLoader/trunk/src/Uploader/ImageList.pm
r4476 r4478 230 230 231 231 $self->current_image( 232 $ self->GetImage($indx)232 $indx != -1 ? $self->GetImage($indx) : Uploader::Image->new() 233 233 ); 234 234 }
Note: See TracChangeset
for help on using the changeset viewer.