Changeset 4973
- Timestamp:
- Feb 27, 2010, 10:29:33 AM (14 years ago)
- Location:
- extensions/pLoader/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm
r4801 r4973 140 140 use Uploader::GUI::wxImageReuploadDlg; 141 141 use Uploader::GUI::wxImageProcessingProgressDlg; 142 use Uploader::GUI::wxChoiceFilteredPanel; 142 143 use utf8; 143 144 $|=1; … … 299 300 ) if $self->imageviewer->GetItemCount; 300 301 302 # if file in command line parameters, try to load 303 my $files = wxTheApp->argv; 304 $self->SetNewFiles($files) if scalar @$files; 305 301 306 $self->Show; 302 307 $self; … … 849 854 850 855 851 my $logo = File::Spec->catfile(wxTheApp-> bin_dir, '..', wxTheApp->resource_dir, 'piwigo_logo.PNG');856 my $logo = File::Spec->catfile(wxTheApp->root_dir, wxTheApp->resource_dir, 'piwigo_logo.PNG'); 852 857 853 858 -
extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm
r4784 r4973 111 111 privacy_level 112 112 user_defined_properties 113 root_dir 113 114 bin_dir 114 115 resource_dir 115 116 locale_dir 117 argv 116 118 / 117 119 ); … … 129 131 # only way : class variable 130 132 # there is only one instance of wxApp 133 my $root_dir; 131 134 my $bin_dir; 132 135 my $resource_dir; 133 136 my $locale_dir; 137 my $argv; 134 138 sub new { 135 139 my ( $self, $params ) = @_; 136 140 137 $bin_dir = $params->{bin_dir}||'.'; 138 $locale_dir = $params->{locale_dir}||'.'; 139 $resource_dir = $params->{resource_dir}||'.'; 141 $root_dir = $params->{root_dir}||'.'; 142 $bin_dir = $params->{bin_dir}||'bin'; 143 $locale_dir = $params->{locale_dir}||'locale'; 144 $resource_dir = $params->{resource_dir}||'res'; 145 $argv = $params->{argv}; 140 146 141 147 $self->SUPER::new(); … … 145 151 my( $self ) = @_; 146 152 153 $self->root_dir( 154 $root_dir 155 ); 156 147 157 $self->bin_dir( 148 158 $bin_dir … … 158 168 159 169 $self->version( 160 ' 2.0.7c'170 '1.5 - DEV' 161 171 ); 162 172 … … 164 174 $self->imagelist_version( 165 175 '13' 176 ); 177 $self->argv( 178 $argv 166 179 ); 167 180 … … 258 271 #$self->_init_frame; 259 272 } 260 273 #Wx::LogMessage("bin dir %s", $bin_dir); 261 274 $not_exit; 262 275 } … … 267 280 my ( $self, $file ) = @_; 268 281 269 File::Spec->catfile($self-> bin_dir, '..', $self->resource_dir, $file);282 File::Spec->catfile($self->root_dir, $self->resource_dir, $file); 270 283 } 271 284 … … 273 286 my ( $self, $file ) = @_; 274 287 275 File::Spec->catfile($self-> bin_dir, $file);288 File::Spec->catfile($self->root_dir, $self->bin_dir, $file); 276 289 } 277 290 … … 279 292 my ( $self, $file ) = @_; 280 293 281 File::Spec->catfile($self-> bin_dir, '..', $self->locale_dir, $file);294 File::Spec->catfile($self->root_dir, $self->locale_dir, $file); 282 295 } 283 296 … … 285 298 my ( $self, $file ) = @_; 286 299 287 File::Spec->catfile($self-> bin_dir, '..', $self->locale_dir, $self->locale->GetCanonicalName, $file);300 File::Spec->catfile($self->root_dir, $self->locale_dir, $self->locale->GetCanonicalName, $file); 288 301 } 289 302 … … 416 429 my $locale = Wx::Locale->new($_->[1]); 417 430 $locale->AddCatalogLookupPathPrefix( 418 File::Spec->catfile($self-> bin_dir, '..', $self->locale_dir)431 File::Spec->catfile($self->root_dir, $self->locale_dir) 419 432 ); 420 433 $_ if $locale->AddCatalog('pLoader'); … … 465 478 ); 466 479 $locale->AddCatalogLookupPathPrefix( 467 File::Spec->catfile($self-> bin_dir, '..', $self->locale_dir)480 File::Spec->catfile($self->root_dir, $self->locale_dir) 468 481 ); 469 482 if(!$locale->AddCatalog( 'pLoader.mo' )){ … … 919 932 $icon->LoadFile( 920 933 File::Spec->catfile( 921 $self-> bin_dir, '..', 'res', 'favicon.ico'934 $self->root_dir, $self->resource_dir, 'favicon.ico' 922 935 ), 923 936 wxBITMAP_TYPE_ICO -
extensions/pLoader/trunk/src/ploader.pl
r4784 r4973 46 46 my $app = Uploader::GUI::wxApp->new( 47 47 { 48 bin_dir => $FindBin::Bin,48 root_dir => $ENV{PLOADER_ROOT}||'..', 49 49 resource_dir => 'res', 50 50 locale_dir => 'locale', 51 argv => [ grep { -f $_ } @ARGV ], 51 52 } 52 53 );
Note: See TracChangeset
for help on using the changeset viewer.