source: extensions/pLoader/trunk/src/Uploader/GUI/wxPhotoProperties.pm @ 4477

Last change on this file since 4477 was 4477, checked in by ronosman, 14 years ago

Feature 1321 added : display and modify photo create date with a date picker widget in photo properties panel.

File size: 3.1 KB
Line 
1# +-----------------------------------------------------------------------+
2# | pLoader - a Perl photo uploader for Piwigo                            |
3# +-----------------------------------------------------------------------+
4# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
5# +-----------------------------------------------------------------------+
6# | This program is free software; you can redistribute it and/or modify  |
7# | it under the terms of the GNU General Public License as published by  |
8# | the Free Software Foundation                                          |
9# |                                                                       |
10# | This program is distributed in the hope that it will be useful, but   |
11# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
12# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
13# | General Public License for more details.                              |
14# |                                                                       |
15# | You should have received a copy of the GNU General Public License     |
16# | along with this program; if not, write to the Free Software           |
17# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
18# | USA.                                                                  |
19# +-----------------------------------------------------------------------+
20package Uploader::GUI::wxPhotoProperties;
21use strict;
22use Wx qw/
23             wxDefaultSize
24             wxDefaultPosition
25                         wxTAB_TRAVERSAL
26             wxID_CANCEL
27             wxID_OK
28             wxGREEN
29         /;
30use base qw/Wx::Panel Uploader::GUI::DlgCommon/;
31use Wx::Event qw/
32                    EVT_UPDATE_UI
33                    EVT_BUTTON
34                                        EVT_CLOSE
35                /;
36
37use Carp;
38
39sub new {
40    my ($this, $params) = @_;
41    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
42    my $class = ref($this) || $this;
43
44
45#    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, [600, 350]);
46    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
47        #$self->SetMinSize([600, 350]);
48    # load controls
49    eval {
50      &main::PhotoProperties($self, $params->{tags});
51
52            $self->properties(
53            $params->{properties}
54        );
55
56        #$self->_init_values;           
57        $self->InitLabels();
58                $self->InitChoices();
59        $self->SetProperties();
60                $self->InitHandler();
61        $self->_initEventHandlers();
62
63                if($@){
64                        Wx::LogMessage("Error during dialogbox initialization");
65                }
66        };
67
68    $self;   
69}
70
71
72
73sub _initEventHandlers {
74    my ( $self ) = @_;
75   
76    EVT_BUTTON( $self, $main::ID_REUPLOAD_OK, \&OnOK );
77    EVT_CLOSE( $self, \&OnClose );
78   
79       
80}
81
82
83sub OnOK {
84    my ( $self, $event ) = @_;
85   
86    $self->_close;
87}
88
89sub OnClose {
90    my ( $self, $event ) = @_;
91       
92        $self->_close;
93}
94
95sub _close {
96    my ( $self ) = @_;
97
98    $self->GetProperties();
99
100    $self->Destroy;
101}
102
1031;
Note: See TracBrowser for help on using the repository browser.