Changeset 4718 for extensions/pLoader


Ignore:
Timestamp:
Jan 21, 2010, 11:36:13 PM (14 years ago)
Author:
ronosman
Message:

Feature 1389 added : remove AUI docking manager

Location:
extensions/pLoader/trunk
Files:
3 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/res/global_settings_wdr.pl

    r4616 r4718  
    140140    $parent->{sb_thumbnail} = $item14;
    141141   
    142     my( $item16 ) = Wx::CollapsiblePane->new( $parent, $main::CPANE_THUMBNAIL, "", wxDefaultPosition, wxDefaultSize, 0|wxCP_DEFAULT_STYLE );
     142    my( $item16 ) = Wx::CollapsiblePane->new( $parent, $main::CPANE_THUMBNAIL, "", wxDefaultPosition, [300,-1], 0|wxCP_DEFAULT_STYLE );
    143143    my( $oldparent ) = $parent;
    144144    $parent = $item16->GetPane();
  • extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm

    r4632 r4718  
    5656             wxLANGUAGE_SPANISH   
    5757         /;
    58 use Uploader::GUI::wxFrameAUI;
    5958use File::Slurp ;
    6059use Data::Dumper;
     
    9897          branding
    9998          frame
    100           perspective
    10199          imageviewerIndex
    102100          frameLayout
     
    159157
    160158    $self->version(
    161         '2.0.7b'
     159        '2.0.7c'
    162160    );
    163161   
    164162    # to check if we can use stored cache
    165163    $self->imagelist_version(
    166         '11'
     164        '13'
    167165    );
    168166
     
    257255        $self->_init_thumbimagelist;
    258256        $self->_set_stored_layout;
    259         $self->_init_frame;
     257        #$self->_init_frame;
    260258    }
    261259
     
    509507                }
    510508                qw/
    511                       perspective
    512509                      imageviewerIndex
    513510                      frameLayout
     
    966963   } keys %$params;
    967964
    968    $config->Write( 'Perspective', $params->{Perspective} )
    969965       
    970966}
    971967
    972968
    973 sub _init_frame {
    974     my ( $self ) = @_; 
     969sub SetFrame {
     970    my ( $self, $frame ) = @_; 
    975971
    976972    my $url = $self->site_url;
     
    980976    }
    981977
    982     $self->frame(
    983         Uploader::GUI::wxFrameAUI->new(
    984             {
    985                 title     => sprintf("pLoader - Piwigo uploader %s - [%s]", $self->version, $url),
    986                 pwg       => $self->pwg,
    987                 imagelist => $self->imagelist,
    988                 perspective => $self->perspective,
    989                 imageviewer_index => $self->imageviewerIndex,
    990                 frameLayout => $self->frameLayout,
    991             }
    992         )
    993     );
    994  
    995     $self->frame->Show( 1 );
    996     $self->SetTopWindow( $self->frame );
     978    $self->frame($frame);
    997979
    998980    my $icon = Wx::Icon->new();
  • extensions/pLoader/trunk/src/Uploader/GUI/wxGlobalSettings.pm

    r4616 r4718  
    3030            wxVERTICAL
    3131            wxFULL_REPAINT_ON_RESIZE
     32            wxCLIP_CHILDREN
     33            wxDEFAULT_DIALOG_STYLE
     34            wxCAPTION
     35            wxCLOSE_BOX
     36            wxMAXIMIZE_BOX
     37            wxMINIMIZE_BOX
     38            wxRESIZE_BORDER
     39            wxSTAY_ON_TOP
    3240        /;
    33 use base qw/Wx::Panel Uploader::GUI::DlgCommon/;
     41use base qw/Wx::Dialog Uploader::GUI::DlgCommon/;
    3442use Wx::Event qw/
    3543            EVT_CLOSE
     
    4553
    4654
    47     my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE );
     55    my $self = $class->SUPER::new(
     56        undef,
     57        -1,
     58        $params->{caption},
     59        wxDefaultPosition,
     60        wxDefaultSize,
     61            wxCAPTION|
     62            wxCLOSE_BOX|
     63            wxMAXIMIZE_BOX|
     64            wxMINIMIZE_BOX|
     65            wxRESIZE_BORDER|
     66            wxDEFAULT_DIALOG_STYLE|
     67            wxSTAY_ON_TOP
     68    );
     69
     70
     71
     72
    4873    $self->{tags} = $params->{tags};
    4974    $self->{orientation} = $params->{orientation}||wxVERTICAL;
     
    6893    $self->{cpane_transfert_advanced} = $self->FindWindow($main::CPANE_TRANSFERT_ADVANCED);
    6994
     95    $self->{gs_close} = $self->FindWindow($main::GS_CLOSE);
     96
    7097    $self->InitLabels();
    7198    $self->InitChoices();
     
    90117    my ( $self ) = @_;
    91118   
    92     EVT_CLOSE( $self, \&OnClose );
     119    Wx::Event::EVT_BUTTON( $self, $self->{gs_close}, \&OnClose );
    93120    Wx::Event::EVT_COLLAPSIBLEPANE_CHANGED( $self, $self->{cpane_thumbnail}, \&OnPaneChanged );
    94121    Wx::Event::EVT_COLLAPSIBLEPANE_CHANGED( $self, $self->{cpane_resize}, \&OnPaneChanged );
     
    112139
    113140
    114     $self->Destroy;
     141    $self->Hide;
    115142}
    116143
     
    118145    my( $self, $event ) = @_;
    119146
    120     $self->_layout;
     147    #$self->_layout;
    121148    $event->Skip;
    122149}
     
    173200
    174201    $self->{cpane_resize}->Collapse($b);
    175     $self->_layout;
     202    #$self->_layout;
    176203    $event->Skip;
    177204
     
    192219    }
    193220    $self->{cpane_hd}->Collapse($b);
    194     $self->_layout;
     221    #$self->_layout;
    195222    $event->Skip;
    196223}
     
    206233
    207234    $self->{cpane_watermark}->Collapse($b);
    208     $self->_layout;
     235    #$self->_layout;
    209236    $event->Skip;
    210237}
  • extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm

    r4632 r4718  
    8383        -1,
    8484        wxDefaultPosition,
    85         wxDefaultSize,
    86         wxNO_BORDER
     85        [ 180, -1],
    8786    );
    8887   
     
    197196                                        $image->$_
    198197                                    ) if defined $image;
     198                                    $self->SetColumnWidth($col, -1);
    199199                                    $col++;
    200200                                }
  • extensions/pLoader/trunk/src/Uploader/GUI/wxImagePreview.pm

    r4587 r4718  
    11package Uploader::GUI::wxImagePreview;
    22use strict;
    3 use base qw/Wx::Panel Class::Accessor::Fast/;
     3use base qw/Wx::Dialog Class::Accessor::Fast/;
    44use Wx qw/
    55             wxDefaultPosition
    66             wxDefaultSize
    77             wxBG_STYLE_CUSTOM
     8
    89             wxIMAGE_QUALITY_HIGH
     10
     11             wxRESIZE_BORDER
     12
     13             wxDIALOG_EX_METAL
     14
     15             wxDIALOG_NO_PARENT
     16             wxDEFAULT_DIALOG_STYLE
     17
     18             wxMAXIMIZE_BOX
     19             wxMINIMIZE_BOX
     20 
     21             wxSTAY_ON_TOP
    922         /;
    1023
     
    2538    my( $class, $params ) = @_;
    2639    my( $self ) = $class->SUPER::new(
    27         $params->{parentwnd},
     40        undef,
    2841        -1,
     42        "Preview",
    2943        wxDefaultPosition,
    30         wxDefaultSize,
     44        [400,300],
     45             wxMAXIMIZE_BOX|
     46             wxMINIMIZE_BOX|
     47             wxRESIZE_BORDER|
     48             wxDEFAULT_DIALOG_STYLE|
     49             wxSTAY_ON_TOP|
     50             wxDIALOG_NO_PARENT
    3151    );
    3252
  • extensions/pLoader/trunk/src/Uploader/GUI/wxImageProcessingProgressDlg.pm

    r4279 r4718  
    2626             wxID_OK
    2727             wxGREEN
     28             wxDIALOG_NO_PARENT
     29             wxDEFAULT_DIALOG_STYLE
     30
     31             wxMAXIMIZE_BOX
     32             wxMINIMIZE_BOX
     33 
     34             wxSTAY_ON_TOP
    2835         /;
    2936use base qw/Wx::Dialog Class::Accessor::Fast/;
     
    5562
    5663
    57     my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
     64    my $self = $class->SUPER::new(
     65        undef,
     66        -1,
     67        $params->{title},
     68        wxDefaultPosition,
     69        wxDefaultSize,
     70             wxDIALOG_NO_PARENT|
     71             wxDEFAULT_DIALOG_STYLE|
     72
     73             wxMAXIMIZE_BOX|
     74             wxMINIMIZE_BOX|
     75             wxSTAY_ON_TOP
     76
     77    );
    5878    # load controls
    5979    eval {
  • extensions/pLoader/trunk/src/Uploader/GUI/wxPhotoProperties.pm

    r4477 r4718  
    2323             wxDefaultSize
    2424             wxDefaultPosition
    25                         wxTAB_TRAVERSAL
     25            wxTAB_TRAVERSAL
    2626             wxID_CANCEL
    2727             wxID_OK
     
    3232                    EVT_UPDATE_UI
    3333                    EVT_BUTTON
    34                                         EVT_CLOSE
     34                    EVT_CLOSE
    3535                /;
    3636
     
    4343
    4444
    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]);
     45    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, [-1, -1], wxTAB_TRAVERSAL );
    4846    # load controls
    4947    eval {
     
    5452        );
    5553
    56         #$self->_init_values;           
    5754        $self->InitLabels();
    5855                $self->InitChoices();
  • extensions/pLoader/trunk/src/Uploader/GUI/wxPropertyGridPanel.pm

    r4322 r4718  
    2525         /;
    2626use Wx::Locale qw/:default/;
    27 use base qw/Wx::Grid Uploader::Object2/;
     27use base qw/Wx::Dialog Uploader::Object2/;
    2828
    2929use Wx::Event qw/
     
    3636        editor
    3737        properties
     38        grid
    3839      /
    3940);
     
    4748
    4849
    49     my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
     50    my $self = $class->SUPER::new( undef, -1, "PropertyGrid", wxDefaultPosition, wxDefaultSize );
     51    $self->grid(
     52        Wx::Grid->new($self, -1, wxDefaultPosition, wxDefaultSize)
     53    );
    5054
    5155    $self->renderer(
     
    7579    $self->Initialize;
    7680     
    77     EVT_GRID_CMD_CELL_CHANGE( $self, $self, \&OnCellChanged );
     81    EVT_GRID_CMD_CELL_CHANGE( $self, $self->grid, \&OnCellChanged );
    7882    $self;   
    7983}
     
    8387
    8488
    85   $self->CreateGrid( scalar @{$self->properties}, 2 );
     89  $self->grid->CreateGrid( scalar @{$self->properties}, 2 );
    8690 
    8791
    88   $self->SetRowLabelSize(0);
    89   $self->SetColLabelSize(0);
    90   $self->SetColSize( 0, 200 );
    91   $self->SetColSize( 1, 200 );
     92  $self->grid->SetRowLabelSize(0);
     93  $self->grid->SetColLabelSize(0);
     94  $self->grid->SetColSize( 0, 200 );
     95  $self->grid->SetColSize( 1, 200 );
    9296 
    9397  $self->_init_property_grid();
     
    98102    my ( $self ) = @_;
    99103   
    100     $self->ClearGrid;
     104    $self->grid->ClearGrid;
    101105
    102106    my $row = 0;
     
    104108        eval {
    105109
    106             $self->SetCellValue(
     110            $self->grid->SetCellValue(
    107111                $row,
    108112                0,
     
    111115
    112116
    113             $self->SetCellValue(
     117            $self->grid->SetCellValue(
    114118                $row,
    115119                1,
     
    132136    map {
    133137        eval {
    134             $self->SetCellEditor(
     138            $self->grid->SetCellEditor(
    135139                $row,
    136140                1,
     
    142146            ) if $self->editor->{$_->{type}};
    143147
    144             $self->SetCellRenderer(
     148            $self->grid->SetCellRenderer(
    145149                $row,
    146150                1,
     
    152156            ) if $self->renderer->{$_->{type}};
    153157
    154             $self->SetReadOnly(
     158            $self->grid->SetReadOnly(
    155159                $row,
    156160                0,
    157161            );
    158162
    159             $self->SetCellValue(
     163            $self->grid->SetCellValue(
    160164                $row,
    161165                0,
     
    163167            ); 
    164168
    165             $self->SetCellValue(
     169            $self->grid->SetCellValue(
    166170                $row,
    167171                1,
     
    169173            ); 
    170174
    171             $self->SetReadOnly(
     175            $self->grid->SetReadOnly(
    172176                $row,
    173177                1,
     
    189193    );
    190194   
    191     my $value = $self->GetCellValue(
     195    my $value = $self->grid->GetCellValue(
    192196        $row,
    193197        $col,
  • extensions/pLoader/trunk/src/ploader.pl

    r4632 r4718  
    2727use Class::Accessor::Fast;
    2828use Uploader::GUI::wxApp;
     29use Uploader::GUI::Frame;
    2930use JSON;
    3031use Wx::Locale qw/:default/;
     
    3940require 'reupload_wdr.pl';
    4041require 'photo_properties_wdr.pl';
     42require 'image_properties_exif_wdr.pl';
    4143
    4244eval {
     
    4749                locale_dir   => 'locale',
    4850            }
     51    );
     52    $app->SetFrame(
     53        Uploader::GUI::Frame->new(
     54            {
     55                title     => sprintf("pLoader - Piwigo uploader %s - [%s]", $app->version, $app->site_url),
     56                pwg       => $app->pwg,
     57                imagelist => $app->imagelist,
     58                imageviewer_index => $app->imageviewerIndex,
     59                frameLayout => $app->frameLayout,
     60            }
     61        )
    4962    );
    5063    $app->MainLoop();
Note: See TracChangeset for help on using the changeset viewer.