Index: /extensions/netinstall/trunk/class.unzip.txt
===================================================================
--- /extensions/netinstall/trunk/class.unzip.txt	(revision 3291)
+++ /extensions/netinstall/trunk/class.unzip.txt	(revision 3291)
@@ -0,0 +1,521 @@
+<?php
+# ***** BEGIN LICENSE BLOCK *****
+# This file is part of Clearbricks.
+# Copyright (c) 2008 Olivier Meunier and contributors.
+# All rights reserved.
+#
+# Clearbricks is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# Clearbricks is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Clearbricks; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+# ***** END LICENSE BLOCK *****
+
+class fileUnzip
+{
+	protected $file_name;
+	protected $compressed_list = array();
+	protected $eo_central = array();
+	
+	protected $zip_sig   = "\x50\x4b\x03\x04"; # local file header signature
+	protected $dir_sig   = "\x50\x4b\x01\x02"; # central dir header signature
+	protected $dir_sig_e = "\x50\x4b\x05\x06"; # end of central dir signature
+	protected $fp = null;
+	
+	protected $memory_limit = null;
+	
+	public function __construct($file_name)
+	{
+		$this->file_name = $file_name;
+	}
+	
+	public function __destroy()
+	{
+		$this->close();
+	}
+	
+	public function close()
+	{
+		if ($this->fp) {
+			fclose($this->fp);
+		}
+		
+		if ($this->memory_limit) {
+			ini_set('memory_limit',$this->memory_limit);
+		}
+	}
+	
+	public function getList($stop_on_file=false,$exclude=false)
+	{
+		if (!empty($this->compressed_list)) {
+			return $this->compressed_list;
+		}
+		
+		if (!$this->loadFileListByEOF($stop_on_file,$exclude)) {
+			if(!$this->loadFileListBySignatures($stop_on_file,$exclude)) {
+				return false;
+			}
+		}
+		
+		return $this->compressed_list;
+	}
+	
+	public function unzipAll($target)
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList();
+		}
+		
+		foreach ($this->compressed_list as $k => $v)
+		{
+			if ($v['is_dir']) {
+				continue;
+			}
+			
+			$this->unzip($k,$target.'/'.$k);
+		}
+	}
+	
+	public function unzip($file_name,$target=false)
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList($file_name);
+		}
+		
+		if (!isset($this->compressed_list[$file_name])) {
+			throw new Exception(sprintf(__('File %s is not compressed in the zip.'),$file_name));
+		}
+		$details =& $this->compressed_list[$file_name];
+		
+		if ($details['is_dir']) {
+			throw new Exception(sprintf(__('Trying to unzip a folder name %s'),$file_name));
+		}
+		
+		if (!$details['uncompressed_size']) {
+			return $this->putContent('',$target);
+		}
+		
+		if ($target) {
+			$this->testTargetDir(dirname($target));
+		}
+		
+		fseek($this->fp(),$details['contents_start_offset']);
+		
+		$this->memoryAllocate($details['compressed_size']);
+		return $this->uncompress(
+			fread($this->fp(), $details['compressed_size']),
+			$details['compression_method'],
+			$details['uncompressed_size'],
+			$target
+		);
+	}
+	
+	public function getFilesList()
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList();
+		}
+		
+		$res = array();
+		foreach ($this->compressed_list as $k => $v) {
+			if (!$v['is_dir']) {
+				$res[] = $k;
+			}
+		}
+		return $res;
+	}
+	
+	public function getDirsList()
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList();
+		}
+		
+		$res = array();
+		foreach ($this->compressed_list as $k => $v) {
+			if ($v['is_dir']) {
+				$res[] = substr($k,0,-1);
+			}
+		}
+		return $res;
+	}
+	
+	public function getRootDir()
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList();
+		}
+		
+		$files = $this->getFilesList();
+		$dirs = $this->getDirsList();
+		
+		$root_files = 0;
+		$root_dirs = 0;
+		foreach ($files as $v) { if (strpos($v,'/') === false) { $root_files++; }}
+		foreach ($dirs as $v)  { if (strpos($v,'/') === false) { $root_dirs++;  }}
+		
+		if ($root_files == 0 && $root_dirs == 1) {
+			return $dirs[0];
+		} else {
+			return false;
+		}
+	}
+	
+	public function isEmpty()
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList();
+		}
+		
+		return count($this->compressed_list) == 0;
+	}
+	
+	public function hasFile($f)
+	{
+		if (empty($this->compressed_list)) {
+			$this->getList();
+		}
+		
+		return isset($this->compressed_list[$f]);
+	}
+	
+	protected function fp()
+	{
+		if ($this->fp === null) {
+			$this->fp = @fopen($this->file_name,'rb');
+		}
+		
+		if ($this->fp === false) {
+			throw new Exception('Unable to open file.');
+		}
+		
+		return $this->fp;
+	}
+	
+	protected function putContent($content,$target=false)
+	{
+		if ($target) {
+			$r = @file_put_contents($target,$content);
+			if ($r === false) {
+				throw new Exception(__('Unable to write destination file.'));
+			}
+			files::inheritChmod($target);
+			return true;
+		}
+		return $content;
+	}
+	
+	protected function testTargetDir($dir)
+	{
+		if (is_dir($dir) && !is_writable($dir)) {
+			throw new Exception(__('Unable to write in target directory, permission denied.'));
+		}
+		
+		if (!is_dir($dir)) {
+			files::makeDir($dir,true);
+		}
+	}
+	
+	protected function uncompress($content,$mode,$size,$target=false)
+	{
+		switch ($mode)
+		{
+			case 0:
+				# Not compressed
+				$this->memoryAllocate($size*2);
+				return $this->putContent($content,$target);
+			case 1:
+				throw new Exception('Shrunk mode is not supported.');
+			case 2:
+			case 3:
+			case 4:
+			case 5:
+				throw new Exception('Compression factor '.($mode-1).' is not supported.');
+			case 6:
+				throw new Exception('Implode is not supported.');
+			case 7:
+				throw new Exception('Tokenizing compression algorithm is not supported.');
+			case 8:
+				# Deflate
+				if (!function_exists('gzinflate')) {
+					throw new Exception('Gzip functions are not available.');
+				}
+				$this->memoryAllocate($size*2);
+				return $this->putContent(gzinflate($content,$size),$target);
+			case 9:
+				throw new Exception('Enhanced Deflating is not supported.');
+			case 10:
+				throw new Exception('PKWARE Date Compression Library Impoloding is not supported.');
+			case 12:
+				# Bzip2
+				if (!function_exists('bzdecompress')) {
+					throw new Exception('Bzip2 functions are not available.');
+				}
+				$this->memoryAllocate($size*2);
+				return $this->putContent(bzdecompress($content),$target);
+			case 18:
+				throw new Exception('IBM TERSE is not supported.');
+			default:
+				throw new Exception('Unknown uncompress method');
+		}
+	}
+	
+	protected function loadFileListByEOF($stop_on_file=false,$exclude=false)
+	{
+		$fp = $this->fp();
+		
+		for ($x=0; $x<1024; $x++)
+		{
+			fseek($fp,-22-$x,SEEK_END);
+			$signature = fread($fp,4);
+			
+			if ($signature == $this->dir_sig_e)
+			{
+				$dir_list = array();
+				
+				$eodir = array(
+					'disk_number_this'   => unpack('v', fread($fp,2)),
+					'disk_number'        => unpack('v', fread($fp,2)),
+					'total_entries_this' => unpack('v', fread($fp,2)),
+					'total_entries'      => unpack('v', fread($fp,2)),
+					'size_of_cd'         => unpack('V', fread($fp,4)),
+					'offset_start_cd'    => unpack('V', fread($fp,4))
+				);
+				
+				$zip_comment_len = unpack('v', fread($fp,2));
+				$eodir['zipfile_comment'] = $zip_comment_len[1] ? fread($fp,$zip_comment_len) : '';
+				
+				$this->eo_central = array(
+					'disk_number_this'   => $eodir['disk_number_this'][1],
+					'disk_number'        => $eodir['disk_number'][1],
+					'total_entries_this' => $eodir['total_entries_this'][1],
+					'total_entries'      => $eodir['total_entries'][1],
+					'size_of_cd'         => $eodir['size_of_cd'][1],
+					'offset_start_cd'    => $eodir['offset_start_cd'][1],
+					'zipfile_comment'    => $eodir['zipfile_comment']
+				);
+				
+				fseek($fp, $this->eo_central['offset_start_cd']);
+				$signature = fread($fp,4);
+				
+				while ($signature == $this->dir_sig)
+				{
+					$dir = array();
+					$dir['version_madeby']       = unpack("v",fread($fp, 2)); # version made by
+					$dir['version_needed']       = unpack("v",fread($fp, 2)); # version needed to extract
+					$dir['general_bit_flag']     = unpack("v",fread($fp, 2)); # general purpose bit flag
+					$dir['compression_method']   = unpack("v",fread($fp, 2)); # compression method
+					$dir['lastmod_time']         = unpack("v",fread($fp, 2)); # last mod file time
+					$dir['lastmod_date']         = unpack("v",fread($fp, 2)); # last mod file date
+					$dir['crc-32']               = fread($fp,4);              # crc-32
+					$dir['compressed_size']      = unpack("V",fread($fp, 4)); # compressed size
+					$dir['uncompressed_size']    = unpack("V",fread($fp, 4)); # uncompressed size
+					
+					$file_name_len               = unpack("v",fread($fp, 2)); # filename length
+					$extra_field_len             = unpack("v",fread($fp, 2)); # extra field length
+					$file_comment_len            = unpack("v",fread($fp, 2)); # file comment length
+					
+					$dir['disk_number_start']    = unpack("v",fread($fp, 2)); # disk number start
+					$dir['internal_attributes']  = unpack("v",fread($fp, 2)); # internal file attributes-byte1
+					$dir['external_attributes1'] = unpack("v",fread($fp, 2)); # external file attributes-byte2
+					$dir['external_attributes2'] = unpack("v",fread($fp, 2)); # external file attributes
+					$dir['relative_offset']      = unpack("V",fread($fp, 4)); # relative offset of local header
+					$dir['file_name']            = $this->cleanFileName(fread($fp, $file_name_len[1]));          # filename
+					$dir['extra_field']          = $extra_field_len[1] ? fread($fp, $extra_field_len[1]) : '';   # extra field
+					$dir['file_comment']         = $file_comment_len[1] ? fread($fp, $file_comment_len[1]) : ''; # file comment			
+					
+					$dir_list[$dir['file_name']] = array(
+						'version_madeby'       => $dir['version_madeby'][1],
+						'version_needed'       => $dir['version_needed'][1],
+						'general_bit_flag'     => str_pad(decbin($dir['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),
+						'compression_method'   => $dir['compression_method'][1],
+						'lastmod_datetime'     => $this->getTimeStamp($dir['lastmod_date'][1],$dir['lastmod_time'][1]),
+						'crc-32'               => str_pad(dechex(ord($dir['crc-32'][3])), 2, '0', STR_PAD_LEFT).
+											 str_pad(dechex(ord($dir['crc-32'][2])), 2, '0', STR_PAD_LEFT).
+											 str_pad(dechex(ord($dir['crc-32'][1])), 2, '0', STR_PAD_LEFT).
+											 str_pad(dechex(ord($dir['crc-32'][0])), 2, '0', STR_PAD_LEFT),
+						'compressed_size'      => $dir['compressed_size'][1],
+						'uncompressed_size'    => $dir['uncompressed_size'][1],
+						'disk_number_start'    => $dir['disk_number_start'][1],
+						'internal_attributes'  => $dir['internal_attributes'][1],
+						'external_attributes1' => $dir['external_attributes1'][1],
+						'external_attributes2' => $dir['external_attributes2'][1],
+						'relative_offset'      => $dir['relative_offset'][1],
+						'file_name'            => $dir['file_name'],
+						'extra_field'          => $dir['extra_field'],
+						'file_comment'         => $dir['file_comment']
+					);
+					$signature = fread($fp, 4);
+				}
+				
+				foreach ($dir_list as $k => $v)
+				{
+					if ($exclude && preg_match($exclude,$k)) {
+						continue;
+					}
+					
+					$i = $this->getFileHeaderInformation($v['relative_offset']);
+					
+					$this->compressed_list[$k]['file_name']            = $k;
+					$this->compressed_list[$k]['is_dir']               = $v['external_attributes1'] == 16 || substr($k,-1,1) == '/';
+					$this->compressed_list[$k]['compression_method']   = $v['compression_method'];
+					$this->compressed_list[$k]['version_needed']       = $v['version_needed'];
+					$this->compressed_list[$k]['lastmod_datetime']     = $v['lastmod_datetime'];
+					$this->compressed_list[$k]['crc-32']               = $v['crc-32'];
+					$this->compressed_list[$k]['compressed_size']      = $v['compressed_size'];
+					$this->compressed_list[$k]['uncompressed_size']    = $v['uncompressed_size'];
+					$this->compressed_list[$k]['lastmod_datetime']     = $v['lastmod_datetime'];
+					$this->compressed_list[$k]['extra_field']          = $i['extra_field'];
+					$this->compressed_list[$k]['contents_start_offset'] = $i['contents_start_offset'];
+					
+					if(strtolower($stop_on_file) == strtolower($k)) {
+						break;
+					}
+				}
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	protected function loadFileListBySignatures($stop_on_file=false,$exclude=false)
+	{
+		$fp = $this->fp();
+		fseek($fp,0);
+		
+		$return = false;
+		while(true)
+		{
+			$details = $this->getFileHeaderInformation();
+			if (!$details) {
+				fseek($fp,12-4,SEEK_CUR); # 12: Data descriptor - 4: Signature (that will be read again)
+				$details = $this->getFileHeaderInformation();
+			}
+			if (!$details) {
+				break;
+			}
+			$filename = $details['file_name'];
+			
+			if ($exclude && preg_match($exclude,$filename)) {
+				continue;
+			}
+			
+			$this->compressed_list[$filename] = $details;
+			$return = true;
+			
+			if (strtolower($stop_on_file) == strtolower($filename)) {
+				break;
+			}
+		}
+		
+		return $return;
+	}
+	
+	protected function getFileHeaderInformation($start_offset=false)
+	{
+		$fp = $this->fp();
+		
+		if ($start_offset !== false) {
+			fseek($fp,$start_offset);
+		}
+		
+		$signature = fread($fp, 4);
+		if ($signature == $this->zip_sig)
+		{
+			# Get information about the zipped file
+			$file = array();
+			$file['version_needed']        = unpack("v",fread($fp, 2)); # version needed to extract
+			$file['general_bit_flag']      = unpack("v",fread($fp, 2)); # general purpose bit flag
+			$file['compression_method']    = unpack("v",fread($fp, 2)); # compression method
+			$file['lastmod_time']          = unpack("v",fread($fp, 2)); # last mod file time
+			$file['lastmod_date']          = unpack("v",fread($fp, 2)); # last mod file date
+			$file['crc-32']                = fread($fp,4);              # crc-32
+			$file['compressed_size']       = unpack("V",fread($fp, 4)); # compressed size
+			$file['uncompressed_size']     = unpack("V",fread($fp, 4)); # uncompressed size
+			
+			$file_name_len                 = unpack("v",fread($fp, 2)); # filename length
+			$extra_field_len               = unpack("v",fread($fp, 2)); # extra field length
+			
+			$file['file_name']             = $this->cleanFileName(fread($fp,$file_name_len[1])); # filename
+			$file['extra_field']           = $extra_field_len[1] ? fread($fp, $extra_field_len[1]) : ''; # extra field
+			$file['contents_start_offset'] = ftell($fp);
+			
+			# Look for the next file
+			fseek($fp, $file['compressed_size'][1], SEEK_CUR);
+			
+			# Mount file table
+			$i = array(
+				'file_name'            => $file['file_name'],
+				'is_dir'               => substr($file['file_name'],-1,1) == '/',
+				'compression_method'   => $file['compression_method'][1],
+				'version_needed'       => $file['version_needed'][1],
+				'lastmod_datetime'     => $this->getTimeStamp($file['lastmod_date'][1],$file['lastmod_time'][1]),
+				'crc-32'               => str_pad(dechex(ord($file['crc-32'][3])), 2, '0', STR_PAD_LEFT).
+									 str_pad(dechex(ord($file['crc-32'][2])), 2, '0', STR_PAD_LEFT).
+									 str_pad(dechex(ord($file['crc-32'][1])), 2, '0', STR_PAD_LEFT).
+									 str_pad(dechex(ord($file['crc-32'][0])), 2, '0', STR_PAD_LEFT),
+				'compressed_size'      => $file['compressed_size'][1],
+				'uncompressed_size'    => $file['uncompressed_size'][1],
+				'extra_field'          => $file['extra_field'],
+				'general_bit_flag'     => str_pad(decbin($file['general_bit_flag'][1]), 8, '0', STR_PAD_LEFT),
+				'contents_start_offset'=>$file['contents_start_offset']
+			);
+			return $i;
+		}
+		return false;
+	}
+	
+	protected function getTimeStamp($date,$time)
+	{
+		$BINlastmod_date = str_pad(decbin($date), 16, '0', STR_PAD_LEFT);
+		$BINlastmod_time = str_pad(decbin($time), 16, '0', STR_PAD_LEFT);
+		$lastmod_dateY   = bindec(substr($BINlastmod_date,  0, 7))+1980;
+		$lastmod_dateM   = bindec(substr($BINlastmod_date,  7, 4));
+		$lastmod_dateD   = bindec(substr($BINlastmod_date, 11, 5));
+		$lastmod_timeH   = bindec(substr($BINlastmod_time,   0, 5));
+		$lastmod_timeM   = bindec(substr($BINlastmod_time,   5, 6));
+		$lastmod_timeS   = bindec(substr($BINlastmod_time,  11, 5)) * 2;
+		
+		return mktime($lastmod_timeH, $lastmod_timeM, $lastmod_timeS, $lastmod_dateM, $lastmod_dateD, $lastmod_dateY);
+	}
+	
+	protected function cleanFileName($n)
+	{
+		$n = str_replace('../','',$n);
+		$n = preg_replace('#^/+#','',$n);
+		return $n;
+	}
+	
+	protected function memoryAllocate($size)
+	{
+		$mem_used = function_exists('memory_get_usage') ? @memory_get_usage() : 4000000;
+		$mem_limit = @ini_get('memory_limit');
+		if ($mem_used && $mem_limit)
+		{
+			$mem_limit = files::str2bytes($mem_limit);
+			$mem_avail = $mem_limit-$mem_used-(512*1024);
+			$mem_needed = $size;
+			
+			if ($mem_needed > $mem_avail)
+			{
+				if (@ini_set('memory_limit',$mem_limit+$mem_needed+$mem_used) === false) {
+					throw new Exception(__('Not enough memory to open file.'));
+				}
+				
+				if (!$this->memory_limit) {
+					$this->memory_limit = $mem_limit;
+				}
+			}
+		}
+	}
+}
+?>
Index: /extensions/netinstall/trunk/hosting.txt
===================================================================
--- /extensions/netinstall/trunk/hosting.txt	(revision 3291)
+++ /extensions/netinstall/trunk/hosting.txt	(revision 3291)
@@ -0,0 +1,11 @@
+1and1|kundenserver.de|AddType x-mapp-php5 .php
+Apinc|apinc.org|AddHandler x-httpd-php5 .php
+Free|free.fr|php 1
+Lost Oasis|lost-oasis.net|PHP_Version 5.0
+Lost Oasis|lo-data.net|PHP_Version 5.0
+MediaTemple|gridserver.com|AddHandler php5-script .php
+Online|online.net|AddType application/x-httpd-php5 .php
+Ouvaton|web.ocsa-data.net|AddHandler application/x-suexec-php5 .php
+OVH|ovh.net|SetEnv PHP_VER 5
+Strato|rzone.de|AddType application/x-httpd-php5 .php
+Web1.fr - NFrance|nfrance.com|AddHandler php-fastcgi5 .php
Index: /extensions/netinstall/trunk/language/de_DE/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/de_DE/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/de_DE/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+Deutch [DE]
Index: /extensions/netinstall/trunk/language/de_DE/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/de_DE/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/de_DE/loader.lang.txt	(revision 3291)
@@ -0,0 +1,61 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Willkommen in NetInstall!';
+$lang['Language'] = 'Sprache';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'Dieses Werkzeug ist zum Abrufen der neuesten Piwigo Archiv und entpacken es in Ihrem Webspace.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Direkt nach, werden Sie eine Umleitung auf die Piwigo Setup-Assistenten.';
+
+$lang['Write access is needed'] = 'Schreib-Zugriff ist erforderlich';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'Es sieht aus wie NetInstall wird nicht in der Lage zu schreiben in das aktuelle Verzeichnis, und dies ist erforderlich, um im Anschluss an.';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Bitte versuchen Sie es um die Berechtigungen zu ermöglichen schreiben, dann rufen Sie diese Seite durch Drücken der Schaltfläche "Aktualisieren".';
+$lang['Refresh'] = 'Aktualisieren';
+
+$lang['PHP 5 is required'] = 'PHP 5 ist erforderlich';
+$lang['It appears your webhost is currently running PHP %s.'] = 'Es scheint Ihr Webhost ist derzeit laufenden PHP %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall wird versuchen um Ihre Konfiguration zu PHP 5 Schalten durch die Schaffung oder Änderung einer .Htaccess-Datei.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Hinweis: Sie können Ihre Konfiguration indem manuel Schalten und starten Sie wieder dass NetInstall.';
+$lang['Try to configure PHP 5'] = 'Versuch zu konfigurieren PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Abrufen und entpacken Piwigo';
+$lang['Destination:'] = 'Reiseziel:';
+
+$lang['Sorry!'] = 'Bekümmert!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall kan nicht PHP 5 zu konfigurieren.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = "Sie können sich beziehen auf Ihrem Hosting-Anbieter die Unterstützung und sehen wie Sie könnte Umstellung auf PHP 5 von Ihnen.";
+$lang['Hope to see you back soon.'] = 'Hoffen, Sie bald wieder zurück.';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'Es scheint wie eine frühere Piwigo Installation ist noch Sitzung in diesem Raum.';
+$lang['You need to rename or remove it before we can go further...'] = 'Sie müssen umbenennen oder entfernen es bevor wir können noch weiter gehen ...';
+$lang['Needed files are not present.'] = 'Benötigten Dateien nicht vorhanden sind.';
+$lang['Invalid zip file.'] = 'Ungültige zip-Datei.';
+$lang['It seems that the zip file was not extracted.'] = 'Es scheint dass die Zip-Datei wurde nicht extrahiert.';
+
+$lang['Congratulations!'] = 'Glückwünsche!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Alles ging gut. Sie sind bereit die Installation starten.';
+$lang['Install Piwigo now'] = 'Jetzt Piwigo installieren';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'Ein Fehler ist aufgetreten beim Greifen die erforderlichen Dateien zu weiter gehen.';
+$lang['Something went wrong...'] = 'Etwas schief gelaufen ist ...';
+$lang['What are you doing here that way ?!'] = 'Was machst Du denn hier so ?!';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'Diese Loader wurde erstmal kodiert für <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Danke!';
Index: /extensions/netinstall/trunk/language/en_UK/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/en_UK/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/en_UK/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+English [UK]
Index: /extensions/netinstall/trunk/language/en_UK/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/en_UK/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/en_UK/loader.lang.txt	(revision 3291)
@@ -0,0 +1,61 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Welcome to NetInstall!';
+$lang['Language'] = 'Language';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Right after then, you will be redirect to the Piwigo Setup Wizard.';
+
+$lang['Write access is needed'] = 'Write access is needed';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.';
+$lang['Refresh'] = 'Refresh';
+
+$lang['PHP 5 is required'] = 'PHP 5 is required';
+$lang['It appears your webhost is currently running PHP %s.'] = 'It appears your webhost is currently running PHP %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Note you can change your configuration by yourself and restart NetInstall after that.';
+$lang['Try to configure PHP 5'] = 'Try to configure PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Retrieve and unzip Piwigo';
+$lang['Destination:'] = 'Destination:';
+
+$lang['Sorry!'] = 'Sorry!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall was not able to configure PHP 5.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = "You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself.";
+$lang['Hope to see you back soon.'] = 'Hope to see you back soon.';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'It seems like a previous Piwigo installation is still sitting in that space.';
+$lang['You need to rename or remove it before we can go further...'] = 'You need to rename or remove it before we can go further...';
+$lang['Needed files are not present.'] = 'Needed files are not present.';
+$lang['Invalid zip file.'] = 'Invalid zip file.';
+$lang['It seems that the zip file was not extracted.'] = 'It seems that the zip file was not extracted.';
+
+$lang['Congratulations!'] = 'Congratulations!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Everything went fine. You are now ready to start the installation procedure.';
+$lang['Install Piwigo now'] = 'Install Piwigo now';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'An error occurred while grabbing the necessary files to go on.';
+$lang['Something went wrong...'] = 'Something went wrong ...';
+$lang['What are you doing here that way ?!'] = 'What are you doing here that way ?!';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!';
Index: /extensions/netinstall/trunk/language/es_ES/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/es_ES/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/es_ES/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+Español [ES]
Index: /extensions/netinstall/trunk/language/es_ES/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/es_ES/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/es_ES/loader.lang.txt	(revision 3291)
@@ -0,0 +1,61 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Bienvenidos a NetInstall !';
+$lang['Language'] = 'Language';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'Este instrumento permite recuperar la última versión de Piwigo y ello relajarse sobre su espacio web.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Ustedes serán redirigés luego hacia la página de instalación de Piwigo.';
+
+$lang['Write access is needed'] = 'Los derechos de acceso en escritura son necesarios ';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'NetInstall no tiene el derecho a escribir en el expediente corriente: esto es indispensable.';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Trate de cambiar los autorizaciones para autorizar el acceso en escritura, luego recargue la página apretando el botón "Actualizar".';
+$lang['Refresh'] = 'Actualizar';
+
+$lang['PHP 5 is required'] = 'PHP 5 es requerido';
+$lang['It appears your webhost is currently running PHP %s.'] = 'Aparentemente, la versión PHP de su hébergeur es PHP %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall va a tratar de pasar en PHP 5 creando o modificando el fichero .htaccess.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Anote que usted mismo puede cambiar la configuración PHP y volver a lanzar a NetInstall después.';
+$lang['Try to configure PHP 5'] = 'Tratar de configurar PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Cargar y relajarse Piwigo';
+$lang['Destination:'] = 'Destino:';
+
+$lang['Sorry!'] = 'Desolado!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall no pudo configurar PHP 5.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = 'Usted debe ponerse en contacto con su hébergeur con el fin de saber cómo configurar PHP 5';
+$lang['Hope to see you back soon.'] = 'Esperando verle de revisarle muy pronto...';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'Aparentemente, una instalación anterior de Piwigo está ya presente aquí.';
+$lang['You need to rename or remove it before we can go further...'] = 'Usted debe renombrarla o suprimirla antes de ir más lejos...';
+$lang['Needed files are not present.'] = 'Los ficheros necesarios son faltantes.';
+$lang['Invalid zip file.'] = 'Archiva zip inválida.';
+$lang['It seems that the zip file was not extracted.'] = 'Los ficheros no han sido extraídos correctamente.';
+
+$lang['Congratulations!'] = 'Félicitation!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Todo se celebró correctamente. Usted ahora está dispuesto a lanzar el procedimiento de instalación.';
+$lang['Install Piwigo now'] = 'Instalar Piwigo';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'Un error sobrevino en el momento de la recuperación de los ficheros.';
+$lang['Something went wrong...'] = 'Un error sobrevino...';
+$lang['What are you doing here that way ?!'] = '¿ Qué hace aquí? !';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'Este installeur inicialmente ha sido codificado para <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. ¡Gracias!';
Index: /extensions/netinstall/trunk/language/fr_FR/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/fr_FR/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/fr_FR/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+Français [FR]
Index: /extensions/netinstall/trunk/language/fr_FR/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/fr_FR/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/fr_FR/loader.lang.txt	(revision 3291)
@@ -0,0 +1,61 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Bienvenue sur NetInstall!';
+$lang['Language'] = 'Langue';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'Cet outil permet de récupérer la dernière version de Piwigo et la décompresser sur votre espace web.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Vous serez redirigés ensuite vers la page d\'installation de Piwigo.';
+
+$lang['Write access is needed'] = 'Les droits d\'accès en écriture sont nécessaires';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'NetInstall n\'a pas le droit d\'écrire dans le dossier courant: ceci est indispensable.';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Essayez de changer les permissions pour autoriser l\'accès en écriture, puis rechargez la page en appuyant sur le bouton "Actualiser".';
+$lang['Refresh'] = 'Actualiser';
+
+$lang['PHP 5 is required'] = 'PHP 5 est requis';
+$lang['It appears your webhost is currently running PHP %s.'] = 'Apparemment, la version PHP de votre hébergeur est PHP %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall va essayer de passer en PHP 5 en créant ou en modifiant le fichier .htaccess.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Notez que vous pouvez changer vous-même la configuration PHP et re-lancer NetInstall après.';
+$lang['Try to configure PHP 5'] = 'Essayer de configurer PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Télécharger et décompresser Piwigo';
+$lang['Destination:'] = 'Destination:';
+
+$lang['Sorry!'] = 'Désolé!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall n\'a pas pu configurer PHP 5.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = 'Vous devez contacter votre hébergeur afin de savoir comment configurer PHP 5';
+$lang['Hope to see you back soon.'] = 'En espérant vous revoir très prochainement...';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'Apparemment, une installation antérieur de Piwigo est déjà présente ici.';
+$lang['You need to rename or remove it before we can go further...'] = 'Vous devez la renommer ou la supprimer avant d\'aller plus loin...';
+$lang['Needed files are not present.'] = 'Les fichiers nécessaires sont manquants.';
+$lang['Invalid zip file.'] = 'Archive zip invalide.';
+$lang['It seems that the zip file was not extracted.'] = 'Les fichiers n\'ont pas été extraits correctement.';
+
+$lang['Congratulations!'] = 'Félicitation!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Tout s\'est déroulé correctement. Vous êtes maintenant prêt à lancer la procédure d\'installation.';
+$lang['Install Piwigo now'] = 'Installer Piwigo';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'Une erreur est survenue lors de la récupération des fichiers.';
+$lang['Something went wrong...'] = 'Une erreur est survenue...';
+$lang['What are you doing here that way ?!'] = 'Qu\'est-ce que vous faites ici ?!';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'Cet installeur a initialement été codé pour <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Merci!';
Index: /extensions/netinstall/trunk/language/it_IT/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/it_IT/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/it_IT/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+Italiano [IT]
Index: /extensions/netinstall/trunk/language/it_IT/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/it_IT/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/it_IT/loader.lang.txt	(revision 3291)
@@ -0,0 +1,61 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Benvenuti su NetInstall!';
+$lang['Language'] = 'Lingua';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'Questo TOOL permette di recuperare l\'ultima versione di Piwigo e di dezipparla sul proprio spazio web.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Verrete reindirizzati verso la pagina d\'installazione di Piwigo.';
+
+$lang['Write access is needed'] = 'Sono necessari dei diritti in scrittura';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'Sembrerebbe che NetInstall non abbia i diritti di scrittura sulla directory corrente: ciò è necessario';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Provate a cambiare i permessi per consentire l\'accesso in scrittura, poi ricaricare la pagina con il bottone "Refresh".';
+$lang['Refresh'] = 'Refresh';
+
+$lang['PHP 5 is required'] = 'È necessario PHP 5';
+$lang['It appears your webhost is currently running PHP %s.'] = 'Sembrerebbe che la versione del vostro server è PHP %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall cerchrà di passare in PHP 5 creando o modificando il file .htaccess.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Notate che potete cambiare manualmente la configurazione e rilanciare NetInstall.';
+$lang['Try to configure PHP 5'] = 'Provate a configuratre PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Uplodare e dezippare Piwigo';
+$lang['Destination:'] = 'Disinstallazione:';
+
+$lang['Sorry!'] = 'Spiacente!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall non a potuto configurare PHP 5.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = 'Dovete contattare il votro provider per chiedere come configurare PHP 5.';
+$lang['Hope to see you back soon.'] = 'Sperando di rivedervi prossimamente ...';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'Sembra che esisti un\'installazione anteriore di Piwigo.';
+$lang['You need to rename or remove it before we can go further...'] = 'Dovete rinomarla o cancellarla prima di continuare...';
+$lang['Needed files are not present.'] = 'Mancano i file necessari.';
+$lang['Invalid zip file.'] = 'file zip non valido.';
+$lang['It seems that the zip file was not extracted.'] = 'I file non sono stati estratti correttamente.';
+
+$lang['Congratulations!'] = 'Congratulazione!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Si è tutto svolto correttamente. Siete pronti a lanciare la procedura d\'installazione.';
+$lang['Install Piwigo now'] = 'Installare Piwigo ora';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'Errore durante l\'upload dei file.';
+$lang['Something went wrong...'] = 'Qualcosa è andato male ...';
+$lang['What are you doing here that way ?!'] = 'Cosa fate qui ?!';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'Questo installatore automatico è stato inizialmente creato per <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Grazie!';
Index: /extensions/netinstall/trunk/language/nl_NL/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/nl_NL/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/nl_NL/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+Dutch [NL]
Index: /extensions/netinstall/trunk/language/nl_NL/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/nl_NL/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/nl_NL/loader.lang.txt	(revision 3291)
@@ -0,0 +1,62 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+/* TODO */
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Welcome to NetInstall!';
+$lang['Language'] = 'Language';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Right after then, you will be redirect to the Piwigo Setup Wizard.';
+
+$lang['Write access is needed'] = 'Write access is needed';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.';
+$lang['Refresh'] = 'Refresh';
+
+$lang['PHP 5 is required'] = 'PHP 5 is required';
+$lang['It appears your webhost is currently running PHP %s.'] = 'It appears your webhost is currently running PHP %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Note you can change your configuration by yourself and restart NetInstall after that.';
+$lang['Try to configure PHP 5'] = 'Try to configure PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Retrieve and unzip Piwigo';
+$lang['Destination:'] = 'Destination:';
+
+$lang['Sorry!'] = 'Sorry!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall was not able to configure PHP 5.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = "You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself.";
+$lang['Hope to see you back soon.'] = 'Hope to see you back soon.';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'It seems like a previous Piwigo installation is still sitting in that space.';
+$lang['You need to rename or remove it before we can go further...'] = 'You need to rename or remove it before we can go further...';
+$lang['Needed files are not present.'] = 'Needed files are not present.';
+$lang['Invalid zip file.'] = 'Invalid zip file.';
+$lang['It seems that the zip file was not extracted.'] = 'It seems that the zip file was not extracted.';
+
+$lang['Congratulations!'] = 'Congratulations!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Everything went fine. You are now ready to start the installation procedure.';
+$lang['Install Piwigo now'] = 'Install Piwigo now';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'An error occurred while grabbing the necessary files to go on.';
+$lang['Something went wrong...'] = 'Something went wrong ...';
+$lang['What are you doing here that way ?!'] = 'What are you doing here that way ?!';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!';
Index: /extensions/netinstall/trunk/language/pl_PL/iso.txt
===================================================================
--- /extensions/netinstall/trunk/language/pl_PL/iso.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/pl_PL/iso.txt	(revision 3291)
@@ -0,0 +1,1 @@
+Polski [PL]
Index: /extensions/netinstall/trunk/language/pl_PL/loader.lang.txt
===================================================================
--- /extensions/netinstall/trunk/language/pl_PL/loader.lang.txt	(revision 3291)
+++ /extensions/netinstall/trunk/language/pl_PL/loader.lang.txt	(revision 3291)
@@ -0,0 +1,61 @@
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Piwigo NetInstall'] = 'Piwigo NetInstall';
+$lang['Welcome to NetInstall!'] = 'Witamy w NetInstall!';
+$lang['Language'] = 'Język';
+$lang['This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.'] = 'To narzędzie pozwala pobrać aktualną wersję Piwigo jako plik .zip, a następnie rozpakować ją na Twoim serwerze www.';
+$lang['Right after then, you will be redirect to the Piwigo Setup Wizard.'] = 'Zaraz po tym, zostaniesz przekierowany do Kreatora Instalacji Piwigo.';
+
+$lang['Write access is needed'] = 'Prawa do zapisu są wymagane';
+$lang['It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'] = 'Wygląda na to, że NetInstall nie będzie mógł zapisywać do bieżącego katalogu, co jest wymagane w celu kontynuowania instalacji.';
+$lang['Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.'] = 'Spróbuj proszę dodać uprawnienia do zapisu, a następnie załaduj tę stronę z wykorzystaniem przycisku Odśwież (F5).';
+$lang['Refresh'] = 'Odśwież';
+
+$lang['PHP 5 is required'] = 'PHP 5 jest wymagane';
+$lang['It appears your webhost is currently running PHP %s.'] = 'Twój serwer aktualnie używa PHP w wersji %s.';
+$lang['NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'] = 'NetInstall może spróbować przełączyć Twoją konfigurację do PHP 5 poprzez modyfikację pliku .htaccess.';
+$lang['Note you can change your configuration by yourself and restart NetInstall after that.'] = 'Możesz również zmienić tę konfigurację sam, a następnie uruchomić ponownie NetInstall.';
+$lang['Try to configure PHP 5'] = 'Spróbuj skonfigurować PHP 5';
+
+$lang['Retrieve and unzip Piwigo'] = 'Pobierz i rozpakuj Piwigo';
+$lang['Destination:'] = 'Lokalizacja:';
+
+$lang['Sorry!'] = 'Niestety!';
+$lang['NetInstall was not able to configure PHP 5.'] = 'NetInstall nie mógł skonfigurować Twojego PHP 5.';
+$lang["You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."] = "Możesz skontaktować się z działem wsparcia Twojego providera aby dowiedzieć się jak włączyć PHP 5.";
+$lang['Hope to see you back soon.'] = 'Do zobaczenia wkrótce.';
+
+$lang['It seems like a previous Piwigo installation is still sitting in that space.'] = 'Wygląda na to, że poprzednia instalacja Piwigo w dalszym ciągu znajduje się w tej lokalizacji.';
+$lang['You need to rename or remove it before we can go further...'] = 'Musisz zmienić nazwe katalogu z poprzednią wersją lub usunąć przed kontynuacją...';
+$lang['Needed files are not present.'] = 'Brak wymaganych plików.';
+$lang['Invalid zip file.'] = 'Niepoprawny plik zip.';
+$lang['It seems that the zip file was not extracted.'] = 'Wygląda na to, że plik zip nie został rozpakowany.';
+
+$lang['Congratulations!'] = 'Gratulacje!';
+$lang['Everything went fine. You are now ready to start the installation procedure.'] = 'Wszystko przebiegło pomyślnie. Jesteś teraz gotowy aby rozpocząć procedurę instalacji.';
+$lang['Install Piwigo now'] = 'Zainstaluj Piwigo teraz';
+$lang['An error occurred while grabbing the necessary files to go on.'] = 'Wystąpił błąd podczas pobierania plików wymaganych do instalacji.';
+$lang['Something went wrong...'] = 'Któraś z operacji się nie powiodła...';
+$lang['What are you doing here that way ?!'] = 'Co próbujesz zrobi w ten sposób?!';
+
+$lang['This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!'] = 'Oryginalnie instalator został przygotowany dla <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Dziekujemy!';
Index: /extensions/netinstall/trunk/lib.files.txt
===================================================================
--- /extensions/netinstall/trunk/lib.files.txt	(revision 3291)
+++ /extensions/netinstall/trunk/lib.files.txt	(revision 3291)
@@ -0,0 +1,495 @@
+<?php
+# ***** BEGIN LICENSE BLOCK *****
+# This file is part of Clearbricks.
+# Copyright (c) 2006 Olivier Meunier and contributors. All rights
+# reserved.
+#
+# Clearbricks is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# Clearbricks is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with Clearbricks; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+# ***** END LICENSE BLOCK *****
+
+class files
+{
+	# Default 
+	public static $dir_mode = null;
+	
+	# Supported MIME types
+	public static $mimeType	= array(
+			'odt'	=> 'application/vnd.oasis.opendocument.text',
+			'odp'	=> 'application/vnd.oasis.opendocument.presentation',
+			'ods'	=> 'application/vnd.oasis.opendocument.spreadsheet',
+			
+			'sxw'	=> 'application/vnd.sun.xml.writer',
+			'sxc'	=> 'application/vnd.sun.xml.calc',
+			'sxi'	=> 'application/vnd.sun.xml.impress',
+			
+			'ppt' 	=> 'application/mspowerpoint',
+			'doc'	=> 'application/msword',
+			'xls'	=> 'application/msexcel',			
+			'rtf'	=> 'application/rtf',
+			
+			'pdf'	=> 'application/pdf',
+			'ps'		=> 'application/postscript',
+			'ai'		=> 'application/postscript',
+			'eps'	=> 'application/postscript',
+			
+			'bin'	=> 'application/octet-stream',
+			'exe'	=> 'application/octet-stream',
+			
+			'deb'	=> 'application/x-debian-package',
+			'gz'		=> 'application/x-gzip',
+			'jar'	=> 'application/x-java-archive',
+			'rar'	=> 'application/rar',
+			'rpm'	=> 'application/x-redhat-package-manager',
+			'tar'	=> 'application/x-tar',
+			'tgz'	=> 'application/x-gtar',
+			'zip'	=> 'application/zip',
+			
+			'aiff'	=> 'audio/x-aiff',
+			'ua'		=> 'audio/basic',
+			'mp3'	=> 'audio/mpeg3',
+			'mid'	=> 'audio/x-midi',
+			'midi'	=> 'audio/x-midi',
+			'ogg'	=> 'application/ogg',
+			'wav'	=> 'audio/x-wav',
+			
+			'swf'	=> 'application/x-shockwave-flash',
+			'swfl'	=> 'application/x-shockwave-flash',
+			
+			'bmp'	=> 'image/bmp',
+			'gif'	=> 'image/gif',
+			'jpeg'	=> 'image/jpeg',
+			'jpg'	=> 'image/jpeg',
+			'jpe'	=> 'image/jpeg',
+			'png'	=> 'image/png',
+			'tiff'	=> 'image/tiff',
+			'tif'	=> 'image/tiff',
+			'xbm'	=> 'image/x-xbitmap',
+			
+			'css'	=> 'text/css',
+			'js'		=> 'text/javascript',
+			'html'	=> 'text/html',
+			'htm'	=> 'text/html',
+			'txt'	=> 'text/plain',
+			'rtf'	=> 'text/richtext',
+			'rtx'	=> 'text/richtext',
+			
+			'mpg'	=> 'video/mpeg',
+			'mpeg'	=> 'video/mpeg',
+			'mpe'	=> 'video/mpeg',
+			'viv'	=> 'video/vnd.vivo',
+			'vivo'	=> 'video/vnd.vivo',
+			'qt'		=> 'video/quicktime',
+			'mov'	=> 'video/quicktime',
+			'm4v'	=> 'video/x-m4v',
+			'flv'	=> 'video/x-flv',
+			'avi'	=> 'video/x-msvideo'
+		);
+	
+	public static function scandir($d,$order=0)
+	{
+		$res = array();
+		$dh = @opendir($d);
+		
+		if ($dh === false) {
+			throw new Exception(__('Unable to open directory.'));
+		}
+		
+		while (($f = readdir($dh)) !== false) {
+			$res[] = $f;
+		}
+		closedir($dh);
+		
+		sort($res);
+		if ($order == 1) {
+			rsort($res);
+		}
+		
+		return $res;
+	}
+	
+	public static function getExtension($f)
+	{
+		$f = explode('.',basename($f));
+		
+		if (count($f) <= 1) { return ''; }
+		
+		return strtolower($f[count($f)-1]);
+	}
+	
+	public static function getMimeType($f)
+	{
+		$ext = self::getExtension($f);
+		$types = self::mimeTypes();
+		
+		if (isset($types[$ext])) {
+			return $types[$ext];
+		} else {
+			return 'text/plain';
+		}
+	}
+	
+	public static function mimeTypes()
+	{
+		return self::$mimeType;
+	}
+	
+	public static function registerMimeTypes($tab)
+	{
+		self::$mimeType = array_merge(self::$mimeType, $tab);
+	}
+	
+	public static function isDeletable($f)
+	{
+		if (is_file($f)) {
+			return is_writable(dirname($f));
+		} elseif (is_dir($f)) {
+			return (is_writable(dirname($f)) && count(files::scandir($f)) <= 2);
+		}
+	}
+	
+	# Recusive remove (rm -rf)
+	public static function deltree($dir)
+	{
+		$current_dir = opendir($dir);
+		while($entryname = readdir($current_dir))
+		{
+			if (is_dir($dir.'/'.$entryname) and ($entryname != '.' and $entryname!='..'))
+			{
+				if (!files::deltree($dir.'/'.$entryname)) {
+					return false;
+				}
+			}
+			elseif ($entryname != '.' and $entryname!='..')
+			{
+				if (!@unlink($dir.'/'.$entryname)) {
+					return false;
+				}
+			}
+		}
+		closedir($current_dir);
+		return @rmdir($dir);
+	}
+	
+	public static function touch($f)
+	{
+		if (is_writable($f)) {
+			if (function_exists('touch')) {
+				@touch($f);
+			} else {
+				# Very bad hack
+				@file_put_contents($f,file_get_contents($f));
+			}
+		}
+	}
+	
+	public static function makeDir($f,$r=false)
+	{
+		if (empty($f)) {
+			return;
+		}
+		
+		if (DIRECTORY_SEPARATOR == '\\') {
+			$f = str_replace('/','\\',$f);
+		}
+		
+		if (is_dir($f)) {
+			return;
+		}
+		
+		if ($r)
+		{
+			$dir = path::real($f,false);
+			$dirs = array();
+			
+			while (!is_dir($dir)) {
+				array_unshift($dirs,basename($dir));
+				$dir = dirname($dir);
+			}
+			
+			foreach ($dirs as $d)
+			{
+				$dir .= DIRECTORY_SEPARATOR.$d;
+				if ($d != '' && !is_dir($dir)) {
+					self::makeDir($dir);
+				}
+			}
+		}
+		else
+		{
+			if (@mkdir($f) === false) {
+				throw new Exception(__('Unable to create directory.'));
+			}
+			self::inheritChmod($f);
+		}
+	}
+	
+	public static function inheritChmod($file)
+	{
+		if (!function_exists('fileperms') || !function_exists('chmod')) {
+			return false;
+		}
+		
+		if (self::$dir_mode != null) {
+			return @chmod($file,self::$dir_mode);
+		} else {
+			return @chmod($file,fileperms(dirname($file)));
+		}
+	}
+	
+	public static function putContent($f, $f_content)
+	{
+		if (file_exists($f) && !is_writable($f)) {	
+			throw new Exception(__('File is not writable.'));
+		}
+		
+		$fp = @fopen($f, 'w');
+		
+		if ($fp === false) {
+			throw new Exception(__('Unable to open file.'));
+		}
+		
+		fwrite($fp,$f_content,strlen($f_content));
+		fclose($fp);
+		return true;
+	}
+	
+	public static function size($size)
+	{
+		$kb = 1024;
+		$mb = 1024 * $kb;
+		$gb = 1024 * $mb;
+		$tb = 1024 * $gb;
+		
+		if($size < $kb) {
+			return $size." B";
+		}
+		else if($size < $mb) {
+			return round($size/$kb,2)." KB";
+		}
+		else if($size < $gb) {
+			return round($size/$mb,2)." MB";
+		}
+		else if($size < $tb) {
+			return round($size/$gb,2)." GB";
+		}
+		else {
+			return round($size/$tb,2)." TB";
+		}
+	}
+	
+	public static function str2bytes($v)
+	{
+		$v = trim($v);
+		$last = strtolower(substr($v,-1,1));
+		
+		switch($last)
+		{
+			case 'g':
+				$v *= 1024;
+			case 'm':
+				$v *= 1024;
+			case 'k':
+				$v *= 1024;
+		}
+		
+		return $v;
+	}
+	
+	public static function uploadStatus($file)
+	{
+		if (!isset($file['error'])) {
+			throw new Exception(__('Not an uploaded file.'));
+		}
+		
+		switch ($file['error']) {
+			case UPLOAD_ERR_OK:
+				return true;
+			case UPLOAD_ERR_INI_SIZE:
+			case UPLOAD_ERR_FORM_SIZE:
+				throw new Exception(__('The uploaded file exceeds the maximum file size allowed.'));
+				return false;
+			case UPLOAD_ERR_PARTIAL:
+				throw new Exception(__('The uploaded file was only partially uploaded.'));
+				return false;
+			case UPLOAD_ERR_NO_FILE:
+				throw new Exception(__('No file was uploaded.'));
+				return false;
+			case UPLOAD_ERR_NO_TMP_DIR:
+				throw new Exception(__('Missing a temporary folder.'));
+				return false;
+			case UPLOAD_ERR_CANT_WRITE:
+				throw new Exception(__('Failed to write file to disk.'));
+				return false;
+			default:
+				return true;
+		}
+	}
+	
+	# Packages generation methods
+	#
+	public static function getDirList($dirName, &$contents = null)
+	{
+		if (!$contents) {
+			$contents = array('dirs'=> array(),'files' => array());
+		}			
+		
+		$exclude_list=array('.','..','.svn');
+		
+		if (empty($res)) {
+			$res = array();
+		}
+		
+		$dirName = preg_replace('|/$|','',$dirName);
+		
+		if (!is_dir($dirName)) {
+			throw new Exception(sprintf(__('%s is not a directory.'),$dirName));
+		}
+		
+		$contents['dirs'][] = $dirName;
+		
+		$d = @dir($dirName);
+		
+		if ($d === false) {
+			throw new Exception(__('Unable to open directory.'));
+		}
+		
+		while($entry = $d->read())
+		{
+			if (!in_array($entry,$exclude_list))
+			{
+				if (is_dir($dirName.'/'.$entry))
+				{
+					files::getDirList($dirName.'/'.$entry, $contents);
+				}
+				else
+				{
+					$contents['files'][] = $dirName.'/'.$entry;
+				}
+			}
+		}
+		$d->close();
+		
+		return $contents;
+	}
+	
+	public static function tidyFileName($n)
+	{
+		$n = text::deaccent($n);
+		$n = preg_replace('/^[.]/u','',$n);
+		return preg_replace('/[^A-Za-z0-9._-]/u','_',$n);
+	}
+}
+
+
+class path
+{
+	public static function real($p,$strict=true)
+	{
+		$os = (DIRECTORY_SEPARATOR == '\\') ? 'win' : 'nix';
+		
+		# Absolute path?
+		if ($os == 'win') {
+			$_abs = preg_match('/^\w+:/',$p);
+		} else {
+			$_abs = substr($p,0,1) == '/';
+		}
+		
+		# Standard path form
+		if ($os == 'win') {
+			$p = str_replace('\\','/',$p);
+		}
+		
+		# Adding root if !$_abs 
+		if (!$_abs) {
+			$p = dirname($_SERVER['SCRIPT_FILENAME']).'/'.$p;
+		}
+		
+		# Clean up
+		$p = preg_replace('|/+|','/',$p);
+		
+		if (strlen($p) > 1) {
+			$p = preg_replace('|/$|','',$p);
+		}
+		
+		$_start = '';
+		if ($os == 'win') {
+			list($_start,$p) = explode(':',$p);
+			$_start .= ':/';
+		} else {
+			$_start = '/';
+		}
+		$p = substr($p,1);
+		
+		# Go through
+		$P = explode('/',$p);
+		$res = array();
+		
+		for ($i=0;$i<count($P);$i++)
+		{
+			if ($P[$i] == '.') {
+				continue;
+			}
+			
+			if ($P[$i] == '..') {
+				if (count($res) > 0) {
+					array_pop($res);
+				}
+			} else {
+				array_push($res,$P[$i]);
+			}
+		}
+		
+		$p = $_start.implode('/',$res);
+		
+		if ($strict && !@file_exists($p)) {
+			return false;
+		}
+		
+		return $p;
+	}
+	
+	public static function clean($p)
+	{
+		$p = str_replace('..','',$p);
+		$p = preg_replace('|/{2,}|','/',$p);
+		$p = preg_replace('|/$|','',$p);
+		
+		return $p;
+	}
+	
+	public static function info($f)
+	{
+		$p = pathinfo($f);
+		$res = array();
+		
+		$res['dirname'] = $p['dirname'];
+		$res['basename'] = $p['basename'];
+		$res['extension'] = isset($p['extension']) ? $p['extension'] : '';
+		$res['base'] = preg_replace('/\.'.preg_quote($res['extension'],'/').'$/','',$res['basename']);
+		
+		return $res;
+	}
+	
+	public static function fullFromRoot($p,$root)
+	{
+		if (substr($p,0,1) == '/') {
+			return $p;
+		}
+		
+		return $root.'/'.$p;
+	}
+}
+?>
Index: /extensions/netinstall/trunk/loader.css
===================================================================
--- /extensions/netinstall/trunk/loader.css	(revision 3291)
+++ /extensions/netinstall/trunk/loader.css	(revision 3291)
@@ -0,0 +1,139 @@
+html, body {
+  min-height: 100%;
+}
+
+*, :focus, :active, input:active, a:active, input:focus, a:focus {
+  outline-color: -moz-use-text-color;
+  outline-style: none;
+  outline-width: 0;
+}
+
+a {
+  border-width: 0;
+  text-decoration: none;
+  color: #FF7700;
+}
+
+body {
+  background: #111111 url(images/bottom-left-bg.jpg) no-repeat fixed left bottom;
+  color: #666666;
+  margin: 0;
+  padding: 0;
+  min-width: 60em;
+  font-family: Univers,Helvetica,Optima,"Bitstream Vera Sans",sans-serif;
+  font-size: 0.8em;
+  text-align: center;
+}
+
+#headbranch {
+  background: transparent url(images/top-left-bg.jpg) no-repeat scroll left top;
+  height: 240px;
+  left: 0;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  top: 0;
+  width: 233px;
+  z-index: -1;
+}
+
+#theHeader {
+  background: transparent url(images/piwigo_logo_sombre_214x100.png) no-repeat scroll 245px top;
+  margin: 0;
+  min-height: 105px;
+  padding: 0;
+}
+
+#content {
+  background: #222222 url(images/fillet.png) repeat-x scroll left top;
+  margin: auto;
+  margin-top: 9px;
+  text-align: left;
+  width: 800px;
+  padding: 25px;
+  z-index: 99;
+  color: #666666;
+}
+
+#footer {
+  width: 800px;
+  margin: auto;
+  text-align: right;
+  margin-top: 15px;
+}
+
+h2 {
+  color: #666666;
+  font-weight: bold;
+  letter-spacing: 2px;
+  text-align: right;
+  text-transform: none;
+  width: 54%;
+  display: block;
+  font-size: 28px;
+  height: 104px;
+  margin: 0 20px;
+  overflow: hidden;
+  padding: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+}
+
+h3 {
+  font-size: 15px;
+  font-weight: bold;
+}
+
+select, input {
+  border: 1px solid #666666;
+  background-color: #444444;
+  color: #999999;
+  font-size: 1em;
+  margin: 0;
+}
+
+input[type="submit"] {
+  text-align: center;
+  background-color: #222222;
+  border-color: #FF3363;
+  color: #FF3363;
+}
+
+input[type="submit"]:hover {
+  cursor: pointer;
+  color: #999;
+  border-color: #666;
+}
+
+label {
+  color: #ff3363
+}
+
+.destination {
+  text-align: center;
+  margin-top: 2em;
+  font-weight: bold;
+}
+
+.language {
+  margin-left: 1.5em;
+  margin-bottom: 2em;
+}
+
+.button {
+  text-align: center;
+  margin-top: 2em;
+}
+
+.msg {
+  padding: 3px 35px;
+}
+
+.notice {
+  color: #f70;
+}
+
+.warning {
+  color: #f30;
+}
Index: /extensions/netinstall/trunk/piwigo-netinstall.php
===================================================================
--- /extensions/netinstall/trunk/piwigo-netinstall.php	(revision 3291)
+++ /extensions/netinstall/trunk/piwigo-netinstall.php	(revision 3291)
@@ -0,0 +1,522 @@
+<?php
+# -- BEGIN LICENSE BLOCK ----------------------------------
+#
+# This file is part of Piwigo.
+#
+# Copyright (c) 2003-2008 Olivier Meunier and contributors
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK ------------------------------------
+
+// +-----------------------------------------------------------------------+
+// |                              Configuration                            |
+// +-----------------------------------------------------------------------+
+
+define('DC_LOADER_SERVICE','http://piwigo.org/download/netinstall/');
+define('DC_LOADER_ARCHIVE','http://piwigo.org/download/dlcounter.php?code=latest');
+
+$available_languages = array(
+  'en_UK' => 'English [UK]',
+  'fr_FR' => 'Français [FR]',
+  'es_ES' => 'Español [ES]',
+  'it_IT' => 'Italiano [IT]',
+  'de_DE' => 'Deutch [DE]',
+  'pl_PL' => 'Polski [PL]',
+//  'nl_NL' => 'Dutch [NL]'      /* Not translated yet */
+);
+
+// +-----------------------------------------------------------------------+
+
+error_reporting(E_ALL & ~E_NOTICE);
+
+getLanguage();
+
+$step = !empty($_REQUEST['step']) ? (integer)$_REQUEST['step'] : 1;
+$got_php5	= version_compare(PHP_VERSION, '5', '>=');
+if (!$got_php5 && $step != 2)
+{
+	$step = 1;
+}
+
+function l10n($str)
+{
+	global $lang;
+
+	return isset($lang[$str]) ? $lang[$str] : $str;
+}
+
+function fetchRemote($src,&$dest,$step=0)
+{
+	if ($step > 3)
+	{
+		return false;
+	}
+
+	// Try curl to read remote file
+	if (function_exists('curl_init'))
+	{
+		$ch = @curl_init(); 
+		@curl_setopt($ch, CURLOPT_URL, $src); 
+		@curl_setopt($ch, CURLOPT_HEADER, 0); 
+		@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
+		@curl_setopt($ch, CURLOPT_USERAGENT, 'Piwigo Net Install'); 
+		$content = @curl_exec($ch);
+		@curl_close($ch);
+		if ($content !== false)
+		{
+			write_dest($content, $dest);
+			return true;
+		}
+	}
+
+	// Try file_get_contents to read remote file
+	if ((boolean)ini_get('allow_url_fopen'))
+	{
+		$content = @file_get_contents($src);
+		if ($content !== false)
+		{
+			write_dest($content, $dest);
+			return true;
+		}
+	}
+
+	// Try fsockopen to read remote file
+	$src = parse_url($src);
+	$host = $src['host'];
+	$path = $src['path'];
+	
+	if (($s = @fsockopen($host,80,$errno,$errstr,5)) === false)
+	{
+		return false;
+	}
+
+	fwrite($s,
+		'GET '.$path." HTTP/1.0\r\n"
+		.'Host: '.$host."\r\n"
+		."User-Agent: Piwigo Net Install\r\n"
+		."Accept: text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*\r\n"
+		."\r\n"
+	);
+
+	$i = 0;
+	$in_content = false;
+	while (!feof($s))
+	{
+		$line = fgets($s,4096);
+
+		if (rtrim($line,"\r\n") == '' && !$in_content)
+		{
+			$in_content = true;
+			$i++;
+			continue;
+		}
+		if ($i == 0)
+		{
+			if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/',rtrim($line,"\r\n"), $m))
+			{
+				fclose($s);
+				return false;
+			}
+			$status = (integer) $m[2];
+			if ($status < 200 || $status >= 400)
+			{
+				fclose($s);
+				return false;
+			}
+		}
+		if (!$in_content)
+		{
+			if (preg_match('/Location:\s+?(.+)$/',rtrim($line,"\r\n"),$m))
+			{
+				fclose($s);
+				return fetchRemote(trim($m[1]),$dest,$step+1);
+			}
+			$i++;
+			continue;
+		}
+		write_dest($line, $dest);
+		$i++;
+	}
+	fclose($s);
+	return true;
+}
+
+function write_dest($str, &$dest)
+{
+  if (is_resource($dest))
+	{
+		fwrite($dest, $str);
+	}
+	else
+	{
+		$dest .= $str;
+	}
+}
+
+function getLanguage()
+{
+	global $lang, $available_languages;
+
+	if (isset($_GET['language']) and isset($available_languages[$_GET['language']]))
+	{
+		$language = $_GET['language'];
+	}
+	else
+	{
+		$language = 'en_UK';
+		// Try to get browser language
+		foreach ($available_languages as $language_code => $language_name)
+		{
+			if (substr($language_code,0,2) == @substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2))
+			{
+				$language = $language_code;
+				break;
+			}
+		}
+	}
+	// Retrieve traductions
+	$lang = array();
+	if (fetchRemote(DC_LOADER_SERVICE.'language/'.$language.'/loader.lang.txt', $code))
+	{
+		@eval($code);
+		define('DC_LOADER_LANG', $language);
+	}
+}
+
+function getLocation()
+{
+	$server_name = explode(':',$_SERVER['HTTP_HOST']);
+	$server_name = $server_name[0];
+	if ($_SERVER['SERVER_PORT'] == '443')
+	{
+		$scheme = 'https';
+		$port = '';
+	}
+	elseif (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
+	{
+		$scheme = 'https';
+		$port = ($_SERVER['SERVER_PORT'] != '443') ? ':'.$_SERVER['SERVER_PORT'] : '';
+	}
+	else
+	{
+		$scheme = 'http';
+		$port = ($_SERVER['SERVER_PORT'] != '80') ? ':'.$_SERVER['SERVER_PORT'] : '';
+	}
+	$loc = preg_replace('#/$#','',str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])));
+
+	return $scheme.'://'.$server_name.$port.$loc.'/';
+}
+
+function openPage()
+{
+	header('Content-Type: text/html; charset=UTF-8');
+	echo
+	'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '.
+	' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n".
+	'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.substr(DC_LOADER_LANG,0,2).'" lang="'.substr(DC_LOADER_LANG,0,2).'">'."\n".
+	"<head>\n".
+	' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n".
+	' <title>'.l10n('Piwigo NetInstall').'</title>'."\n".
+	' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n".
+	' <link rel="stylesheet" type="text/css" media="screen" href="'.DC_LOADER_SERVICE.'loader.css" />'."\n".
+	'</head>'."\n".
+	'<body>'."\n".
+	'<div id="headbranch"></div>'."\n".
+	'<div id="theHeader"></div>'."\n".
+	'<div id="content">'."\n".
+	'<h2>'.l10n('Piwigo NetInstall').'</h2>'."\n";
+}
+
+function closePage()
+{
+	echo
+	'</div>'."\n".
+	'<div id="footer">'."\n".
+	l10n('This loader was initialy coded for <a href="http://www.dotclear.net" title="Dotclear">Dotclear</a>. Thanks!')."\n".
+	'</div>'."\n".
+	'</body>'."\n".
+	'</html>';
+}
+
+function initPHP5()
+{
+	$htaccess = dirname(__FILE__).'/.htaccess';
+	if (file_exists($htaccess)) {
+		if (!is_readable($htaccess) || !is_writable($htaccess))
+		{
+			return false;
+		}
+	}
+	$rawdatas = '';
+	if (!fetchRemote(DC_LOADER_SERVICE.'hosting.txt',$rawdatas))
+	{
+		return false;
+	}
+	$rawdatas = explode("\n",$rawdatas);
+	if (!($my_hostname = @gethostbyaddr($_SERVER['SERVER_ADDR'])))
+	{
+		return false;
+	}
+	$found = false;
+	foreach ($rawdatas as $line) {
+		list($name,$hostname,$rule) = explode('|',trim($line));
+		if (preg_match('!'.preg_quote($hostname).'$!',$my_hostname))
+		{
+			$found = $rule;
+			break;
+		}
+	}
+	if ($found) {
+		if (false !== ($fh = @fopen($htaccess,"ab")))
+		{
+			fwrite($fh,"\n".$found);
+			fclose($fh);
+			return true;
+		}
+	}
+	return false;
+}
+
+function cleanFiles()
+{
+	@unlink(dirname(__FILE__).'/pwg_files.php');
+	@unlink(dirname(__FILE__).'/pwg_unzip.php');
+	@unlink(dirname(__FILE__).'/piwigo-install.zip');
+}
+
+function grabFiles()
+{
+	$failed = true;
+	$lib_files = @fopen(dirname(__FILE__).'/pwg_files.php','wb');
+	$lib_unzip = @fopen(dirname(__FILE__).'/pwg_unzip.php','wb');
+	$dc_zip    = @fopen(dirname(__FILE__).'/piwigo-install.zip','wb');
+
+	if (!$lib_files || !$lib_unzip || !$dc_zip)
+	{
+		return false;
+	}
+
+	if (fetchRemote(DC_LOADER_SERVICE.'lib.files.txt',$lib_files))
+	{
+		if (fetchRemote(DC_LOADER_SERVICE.'class.unzip.txt',$lib_unzip))
+		{
+			if (fetchRemote(DC_LOADER_ARCHIVE.'',$dc_zip))
+			{
+				$failed = false;
+			}
+		}
+	}
+
+	fclose($lib_files);
+	fclose($lib_unzip);
+	fclose($dc_zip);
+
+	if ($failed)
+	{
+		cleanFiles();
+		return false;
+	}
+	return true;
+}
+
+function writeMessage($level,$title,$lines)
+{
+	if (empty($lines))
+	{
+		return;
+	}
+
+	echo
+	'<div class="msg '.$level.'">'."\n".
+	'<h3>'.$title.'</h3>'."\n".
+	'<p>'."\n";
+	foreach ($lines as $line)
+	{
+		echo $line.'<br />'."\n";
+	}
+	echo '</p></div>'."\n";
+}
+
+function nextAction($label,$step,$more='')
+{
+	echo
+	'<form action="'.$_SERVER['SCRIPT_NAME'].'?language='.DC_LOADER_LANG.'" method="post">'."\n".
+	$more."\n".
+	'<p class="button"><input type="hidden" name="step" value="'.$step.'" />'."\n".
+	'<input type="hidden" name="lang" value="'.DC_LOADER_LANG.'" />'."\n".
+	'<input type="submit" name="submit" value="'.$label.'"/>'."\n".
+	'</p></form>'."\n";
+}
+
+
+if (!defined('DC_LOADER_LANG'))
+{
+	// No traduction for this part because can't fetch!
+	openPage();
+	echo
+	'<h2>Piwigo NetInstall</h2>'."\n";
+	writeMessage('warning','Damnit!', array(
+		'Due to restrictions in your PHP configuration, NetInstall cannot get its job done.',
+		'Please see Piwigo documentation to perform a normal installation.',
+		'Really sorry for the inconvenience.'
+	));
+	closePage();
+	exit;
+}
+
+switch ($step)
+{
+	case 1 :
+	{
+		openPage();
+		echo '<h3>'.l10n('Welcome to NetInstall!').'</h3>'."\n";
+
+		// Show available languages
+		asort($available_languages);
+		echo
+		'<p class="language">'.l10n('Language').' &nbsp;'."\n".
+		'<select name="language" onchange="document.location = \''.basename(__FILE__).'?language=\'+this.options[this.selectedIndex].value;">'."\n";
+		foreach ($available_languages as $language_code => $language_name)
+		{
+			echo '<option label="'.$language_name.'" value="'.$language_code.'" '.($language_code == DC_LOADER_LANG ? 'selected="selected"' : '').'>'.$language_name.'</option>'."\n";
+		}
+		echo '</select>'."\n".'</p>'."\n";
+
+		echo
+		'<p>'.l10n('This tool is meant to retrieve the latest Piwigo archive and unzip it in your webspace.').'<br />'."\n".
+		l10n('Right after then, you will be redirect to the Piwigo Setup Wizard.').'</p>'."\n";
+
+		if (!is_writable(dirname(__FILE__)))
+		{
+			writeMessage('warning',l10n('Write access is needed'), array(
+				l10n('It looks like NetInstall wont be able to write in the current directory, and this is required to follow on.'),
+				l10n('Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.')
+			));
+			nextAction(l10n('Refresh'),1);
+		}
+		elseif (!$got_php5)
+		{
+			writeMessage('notice',l10n('PHP 5 is required'), array(
+				sprintf(l10n('It appears your webhost is currently running PHP %s.'), PHP_VERSION),
+				l10n('NetInstall may try to switch your configuration to PHP 5 by creating or modifying a .htaccess file.'),
+				l10n('Note you can change your configuration by yourself and restart NetInstall after that.')
+			));
+			nextAction(l10n('Try to configure PHP 5'),2);
+		}
+		else
+		{
+			nextAction(l10n('Retrieve and unzip Piwigo'),3,
+				'<p class="destination"><label for="destination">'.l10n('Destination:').'</label> '.
+				getLocation().
+				' <input type="text" id="destination" name="destination" '.
+				'value="piwigo" size="15" maxlength="100" /></p>'
+			);
+		}
+		closePage();
+		break;
+	}
+
+	case 2 :
+	{
+		if (!empty($_POST['submit']) && !$got_php5)
+		{
+			$got_php5 = initPHP5();
+		}
+		if ($got_php5)
+		{
+			header('Location: '.$_SERVER['SCRIPT_NAME'].'?step=1&language='.DC_LOADER_LANG);
+		}
+		else
+		{
+			openPage();
+			writeMessage('warning',l10n('Sorry!'),array(
+				l10n('NetInstall was not able to configure PHP 5.'),
+				l10n("You may referer to your hosting provider's support and see how you could switch to PHP 5 by yourself."),
+				l10n('Hope to see you back soon.')
+			));
+			closePage();
+		}
+		break;
+	}
+
+	case 3 :
+	{
+		$msg = array(l10n('What are you doing here that way ?!'));
+		$text = '';
+		if (!empty($_POST['submit']) && isset($_POST['destination']))
+		{
+			$msg = array();
+			$dest = preg_replace('/[^A-Za-z0-9_\/-]/','',$_POST['destination']);
+			$dest = preg_replace('#/+#','/',$dest);
+			
+			if (file_exists(dirname(__FILE__).'/./'.$dest.'/include/mysql.inc.php') || file_exists(dirname(__FILE__).'/./'.$dest.'/include/default_config.inc.php'))
+			{
+				$msg[] = l10n('It seems like a previous Piwigo installation is still sitting in that space.');
+				$msg[] = l10n('You need to rename or remove it before we can go further...');
+			}
+			elseif (grabFiles())
+			{
+				$lib_files = dirname(__FILE__).'/pwg_files.php';
+				$lib_unzip = dirname(__FILE__).'/pwg_unzip.php';
+				$dc_zip		= dirname(__FILE__).'/piwigo-install.zip';
+				if (!file_exists($lib_files) || !file_exists($lib_unzip) || !file_exists($dc_zip))
+				{
+					$msg[] = l10n('Needed files are not present.');
+				}
+
+				require $lib_files;
+				require $lib_unzip;
+				$uz = new fileUnzip($dc_zip);
+				$files = $uz->getList();
+				if (count($files) == 0)
+				{
+					$msg[] = l10n('Invalid zip file.');
+				}
+
+				foreach ($files as $k => $v)
+				{
+					if ($v['is_dir'])
+					{
+						continue;
+					}
+					$t = preg_replace('#^[^/]*/#','./'.$dest.'/',$k);
+					$uz->unzip($k,$t);
+				}
+				$uz->close;
+				unset($uz);
+
+				if (!is_dir(dirname(__FILE__).'/'.$dest))
+				{
+					$msg[] = l10n('It seems that the zip file was not extracted.');
+				}
+				else
+				{
+					# Remove files and self-destruction
+					cleanFiles();
+					unlink(__FILE__);
+
+					$redir = preg_replace('#/+#','/',str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])).'/'.$dest.'/install.php');
+
+					$text = '<h3>'.l10n('Congratulations!').'</h3>'
+					.'<p>'.l10n('Everything went fine. You are now ready to start the installation procedure.').'</p>'
+					.'<form action="'.$redir.'" method="get"><p class="button">'
+					. '<input type="hidden" name="language" value="'.DC_LOADER_LANG.'">'
+					. '<input type="submit" value="'.l10n('Install Piwigo now').'" />'
+					. '</p></form>';
+				}
+			}
+			else
+			{
+				$msg[] = l10n('An error occurred while grabbing the necessary files to go on.');
+			}
+		}
+		openPage();
+		writeMessage('warning',l10n('Something went wrong...'),$msg);
+		echo $text;
+		closePage();
+		break;
+	}
+}
+?>
Index: /extensions/pLoader/tags/2.0.0a/build/build_pLoader.bat
===================================================================
--- /extensions/pLoader/tags/2.0.0a/build/build_pLoader.bat	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/build/build_pLoader.bat	(revision 3291)
@@ -0,0 +1,1 @@
+wxpar.bat @par_options.txt --gui --icon=..\res\favicon.ico -output=pLoader.exe ..\src\pLoader.pl
Index: /extensions/pLoader/tags/2.0.0a/build/par_options.txt
===================================================================
--- /extensions/pLoader/tags/2.0.0a/build/par_options.txt	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/build/par_options.txt	(revision 3291)
@@ -0,0 +1,184 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+# wxpar Getopt::Argfile for PAR::Packer pp
+
+-M attributes.pm
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/mingwm10.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_adv_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_qa_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_html_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxbase28u_net_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_gl_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_aui_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_core_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxbase28u_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/delegates.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_vicar_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_x_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ept_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sun_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_png_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wpg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pdb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_txt_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cip_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xpm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xtrn_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pwp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/type.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_Magick++_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/X11.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cin_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_raw_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pix_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/Xext.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_plasma_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fax_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/configure.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/magic.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sfw_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_map_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_magick_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pdf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_clip_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_url_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rgb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_scr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_locale_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_art_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tiff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_thumbnail_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/analyze.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gray_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_xlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jp2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_braille_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps3_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jbig_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tim_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rla_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pnm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xwd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rle_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cmyk_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_svg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_histogram_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/thresholds.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_magick_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_djvu_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_label_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gif_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/Magick.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpc_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wbmp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tga_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mvg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jbig_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dpx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_viff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/log.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_logo_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dcm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_wand_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dng_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/coder.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/english.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_miff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_msl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_html_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xbm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_exr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_avs_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pict_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jp2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ycbcr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_emf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_topol_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/autosplit.ix
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_zlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xc_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/locale.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cut_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_uyvy_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mat_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_libxml_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_meta_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_matte_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_uil_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_caption_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mtv_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fpx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_yuv_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mono_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_lcms_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sgi_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_otb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_palm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_vid_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sct_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_bmp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_clipboard_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_tiff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/colors.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tile_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cineon_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xcf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dot_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gradient_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fits_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_avi_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_psd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_bzlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_ttf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wmf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_stegano_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_preview_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_info_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_null_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pattern_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_icon_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ttf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ipl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_png_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dds_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/type-ghostscript.xml
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Windows.pm;lib/File/HomeDir/Windows.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Darwin.pm;lib/File/HomeDir/Darwin.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Driver.pm;lib/File/HomeDir/Driver.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/MacOS9.pm;lib/File/HomeDir/MacOS9.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Unix.pm;lib/File/HomeDir/Unix.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP.pm;lib/JSON/PP.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP56.pm;lib/JSON/PP56.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP58.pm;lib/JSON/PP58.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP5005.pm;lib/JSON/PP5005.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP/Boolean.pm;lib/JSON/PP/Boolean.pm"
+-l pLoader.exe.manifest
Index: /extensions/pLoader/tags/2.0.0a/res/global_settings_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0a/res/global_settings_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/res/global_settings_wdr.pl	(revision 3291)
@@ -0,0 +1,93 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: global_settings.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxRA_SPECIFY_ROWS );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_GLOBAL_AUTHOR); $ID_GLOBAL_AUTHOR = 10001;
+use vars qw($ID_GLOBAL_NAME_PREFIX); $ID_GLOBAL_NAME_PREFIX = 10002;
+use vars qw($ID_GLOBAL_THUMB_SIZE); $ID_GLOBAL_THUMB_SIZE = 10003;
+use vars qw($ID_GLOBAL_RESIZED_W); $ID_GLOBAL_RESIZED_W = 10004;
+use vars qw($ID_GLOBAL_RESIZED_H); $ID_GLOBAL_RESIZED_H = 10005;
+use vars qw($ID_GLOBAL_ROTATE); $ID_GLOBAL_ROTATE = 10006;
+use vars qw($ID_GLOBAL_HIGH); $ID_GLOBAL_HIGH = 10007;
+
+sub GlobalSettings {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Default author :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item3 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_AUTHOR, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Photo name  prefix :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_NAME_PREFIX, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item5, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Site thumbnail size :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item6, 0, wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_THUMB_SIZE, "", wxDefaultPosition, [80,-1], 0 );
+    $item1->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Site image width :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_RESIZED_W, "", wxDefaultPosition, [80,-1], 0 );
+    $item1->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item10 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Site image height :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item11 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_RESIZED_H, "", wxDefaultPosition, [80,-1], 0 );
+    $item1->AddWindow( $item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item12 ) = Wx::RadioBox->new( $_[0], $main::ID_GLOBAL_ROTATE, "Auto rotate image", wxDefaultPosition, wxDefaultSize, 
+        ["Yes","No"] , 1, wxRA_SPECIFY_ROWS );
+    $item1->AddWindow( $item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item13 ) = Wx::RadioBox->new( $_[0], $main::ID_GLOBAL_HIGH, "Upload high (original size) ", wxDefaultPosition, wxDefaultSize, 
+        ["No","Yes"] , 1, wxRA_SPECIFY_ROWS );
+    $item1->AddWindow( $item13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0a/res/intro.html
===================================================================
--- /extensions/pLoader/tags/2.0.0a/res/intro.html	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/res/intro.html	(revision 3291)
@@ -0,0 +1,6 @@
+<body style="background-color:#111111">
+  <div style="margin:5em auto; color:#777777; font-size:2em; text-align:center;">
+    <img src="piwigo_logo.png" style="margin-bottom:1em"/><br />
+    Drop your photos
+  </div>
+</body>
Index: /extensions/pLoader/tags/2.0.0a/res/login_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0a/res/login_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/res/login_wdr.pl	(revision 3291)
@@ -0,0 +1,91 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: login.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxTE_PASSWORD );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_PWG_URL); $ID_PWG_URL = 10001;
+use vars qw($ID_PWG_USERNAME); $ID_PWG_USERNAME = 10002;
+use vars qw($ID_PWG_PASSWORD); $ID_PWG_PASSWORD = 10003;
+use vars qw($ID_PWG_OK); $ID_PWG_OK = 10004;
+use vars qw($ID_PWG_CANCEL); $ID_PWG_CANCEL = 10005;
+
+sub Login {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    $item0->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item2 ) = Wx::StaticBox->new( $_[0], -1, "" );
+    my( $item1 ) = Wx::StaticBoxSizer->new( $item2, wxVERTICAL );
+    
+    my( $item3 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Piwigo url", wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $_[0], $main::ID_PWG_URL, "", wxDefaultPosition, [400,-1], 0 );
+    $item3->AddWindow( $item5, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Admin. username :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $_[0], $main::ID_PWG_USERNAME, "", wxDefaultPosition, [200,-1], 0 );
+    $item3->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Admin. password :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $_[0], $main::ID_PWG_PASSWORD, "", wxDefaultPosition, [200,-1], wxTE_PASSWORD );
+    $item3->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->Add( $item3, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->AddSpace( 20, 30, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item10 ) = Wx::BoxSizer->new( wxHORIZONTAL );
+    
+    my( $item11 ) = Wx::Button->new( $_[0], $main::ID_PWG_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 );
+    $item11->SetDefault();
+    $item10->AddWindow( $item11, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item12 ) = Wx::Button->new( $_[0], $main::ID_PWG_CANCEL, "Cancel", wxDefaultPosition, wxDefaultSize, 0 );
+    $item10->AddWindow( $item12, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item10, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0a/res/photo_exif_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0a/res/photo_exif_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/res/photo_exif_wdr.pl	(revision 3291)
@@ -0,0 +1,118 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: photo_exif.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_EXIF_CREATE_DATE); $ID_EXIF_CREATE_DATE = 10001;
+use vars qw($ID_EXIF_WIDTH); $ID_EXIF_WIDTH = 10002;
+use vars qw($ID_EXIF_HEIGHT); $ID_EXIF_HEIGHT = 10003;
+use vars qw($ID_EXIF_ORIENTATION); $ID_EXIF_ORIENTATION = 10004;
+use vars qw($ID_EXIF_ISO); $ID_EXIF_ISO = 10005;
+use vars qw($ID_EXIF_SHUTTER_SPEED); $ID_EXIF_SHUTTER_SPEED = 10006;
+use vars qw($ID_EXIF_APERTURE); $ID_EXIF_APERTURE = 10007;
+use vars qw($ID_EXIF_FOCAL_LENGTH); $ID_EXIF_FOCAL_LENGTH = 10008;
+use vars qw($ID_EXIF_MODEL); $ID_EXIF_MODEL = 10009;
+use vars qw($ID_EXIF_LENS); $ID_EXIF_LENS = 10010;
+
+sub PhotoExif {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Create date :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_CREATE_DATE, "", wxDefaultPosition, [100,-1], 0 );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Width :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_WIDTH, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Height :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_HEIGHT, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Orientation :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_ORIENTATION, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item10 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "ISO :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item11 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_ISO, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item12 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Shutter speed :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item13 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_SHUTTER_SPEED, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item14 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Aperture :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item15 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_APERTURE, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item16 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Focal length :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item17 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_FOCAL_LENGTH, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item18 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Model :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item19 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_MODEL, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item20 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Lens :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item21 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_LENS, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0a/res/photo_properties_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0a/res/photo_properties_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/res/photo_properties_wdr.pl	(revision 3291)
@@ -0,0 +1,88 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: photo_properties.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxLI_HORIZONTAL wxTE_MULTILINE );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_PHOTO); $ID_PHOTO = 10000;
+use vars qw($ID_LINE); $ID_LINE = 10001;
+use vars qw($ID_TEXT); $ID_TEXT = 10002;
+use vars qw($ID_PHOTO_AUTHOR); $ID_PHOTO_AUTHOR = 10003;
+use vars qw($ID_PHOTO_NAME); $ID_PHOTO_NAME = 10004;
+use vars qw($ID_PHOTO_COMMENT); $ID_PHOTO_COMMENT = 10005;
+use vars qw($ID_PHOTO_CREATE_DATE); $ID_PHOTO_CREATE_DATE = 10006;
+
+sub PhotoProperties {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    $item1->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item2 ) = Wx::StaticBitmap->new( $_[0], $main::ID_PHOTO, wxNullBitmap, wxDefaultPosition, [120,120] );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->AddSpace( 10, 5, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticLine->new( $_[0], $main::ID_LINE, wxDefaultPosition, [400,-1], wxLI_HORIZONTAL );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Author :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $_[0], $main::ID_PHOTO_AUTHOR, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Photo name :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $_[0], $main::ID_PHOTO_NAME, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item7, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Comment :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item8, 0, wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $_[0], $main::ID_PHOTO_COMMENT, "", wxDefaultPosition, [400,100], wxTE_MULTILINE );
+    $item1->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item10 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Create date :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item11 ) = Wx::StaticText->new( $_[0], $main::ID_PHOTO_CREATE_DATE, "", wxDefaultPosition, [100,-1], 0 );
+    $item1->AddWindow( $item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0a/res/progress_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0a/res/progress_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/res/progress_wdr.pl	(revision 3291)
@@ -0,0 +1,75 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: progress.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxLI_HORIZONTAL );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_PROGRESS_TXT); $ID_PROGRESS_TXT = 10000;
+use vars qw($ID_STATICBITMAP); $ID_STATICBITMAP = 10001;
+use vars qw($ID_PROGRESS_GAUGE); $ID_PROGRESS_GAUGE = 10002;
+use vars qw($ID_LINE); $ID_LINE = 10003;
+use vars qw($ID_PROGRESS_OK); $ID_PROGRESS_OK = 10004;
+
+sub ProcessingProgress {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_PROGRESS_TXT, "Processing", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticBitmap->new( $_[0], $main::ID_STATICBITMAP, wxNullBitmap, wxDefaultPosition, [100,100] );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+
+    $item1->AddSpace( 20, 30, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item4 ) = Wx::Gauge->new( $_[0], $main::ID_PROGRESS_GAUGE, 100, wxDefaultPosition, [400,12], 0 );
+    $item1->AddWindow( $item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item5 ) = Wx::StaticLine->new( $_[0], $main::ID_LINE, wxDefaultPosition, [20,-1], wxLI_HORIZONTAL );
+    $item0->AddWindow( $item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::BoxSizer->new( wxHORIZONTAL );
+    
+    my( $item7 ) = Wx::Button->new( $_[0], $main::ID_PROGRESS_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 );
+    $item6->AddWindow( $item7, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item6, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxApp.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxApp.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxApp.pm	(revision 3291)
@@ -0,0 +1,795 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxApp;
+use strict;
+use base qw/Wx::App Class::Accessor::Fast/;    
+use Wx qw/
+             wxBITMAP_TYPE_GIF 
+             wxBITMAP_TYPE_ICO 
+             wxBITMAP_TYPE_BMP 
+             wxBITMAP_TYPE_PNG 
+             wxBITMAP_TYPE_JPEG
+             wxIMAGE_QUALITY_NORMAL
+             wxIMAGE_QUALITY_HIGH
+             wxSPLASH_CENTRE_ON_SCREEN 
+             wxSPLASH_TIMEOUT
+             wxDefaultPosition 
+             wxDefaultSize 
+             wxSIMPLE_BORDER 
+             wxFRAME_TOOL_WINDOW
+             wxFRAME_NO_TASKBAR wxSTAY_ON_TOP
+             wxWHITE
+             wxICON_EXCLAMATION
+             wxOK 
+             wxLANGUAGE_ABKHAZIAN   
+             wxLANGUAGE_AFAR   
+             wxLANGUAGE_AFRIKAANS   
+             wxLANGUAGE_ALBANIAN   
+             wxLANGUAGE_AMHARIC   
+             wxLANGUAGE_ARABIC   
+             wxLANGUAGE_ARABIC_ALGERIA   
+             wxLANGUAGE_ARABIC_BAHRAIN   
+             wxLANGUAGE_ARABIC_EGYPT   
+             wxLANGUAGE_ARABIC_IRAQ   
+             wxLANGUAGE_ARABIC_JORDAN   
+             wxLANGUAGE_ARABIC_KUWAIT   
+             wxLANGUAGE_ARABIC_LEBANON   
+             wxLANGUAGE_ARABIC_LIBYA   
+             wxLANGUAGE_ARABIC_MOROCCO   
+             wxLANGUAGE_ARABIC_OMAN   
+             wxLANGUAGE_ARABIC_QATAR   
+             wxLANGUAGE_ARABIC_SAUDI_ARABIA   
+             wxLANGUAGE_ARABIC_SUDAN   
+             wxLANGUAGE_ARABIC_SYRIA   
+             wxLANGUAGE_ARABIC_TUNISIA   
+             wxLANGUAGE_ARABIC_UAE   
+             wxLANGUAGE_ARABIC_YEMEN   
+             wxLANGUAGE_ARMENIAN   
+             wxLANGUAGE_ASSAMESE   
+             wxLANGUAGE_AYMARA   
+             wxLANGUAGE_AZERI   
+             wxLANGUAGE_AZERI_CYRILLIC   
+             wxLANGUAGE_AZERI_LATIN   
+             wxLANGUAGE_BASHKIR   
+             wxLANGUAGE_BASQUE   
+             wxLANGUAGE_BELARUSIAN   
+             wxLANGUAGE_BENGALI   
+             wxLANGUAGE_BHUTANI   
+             wxLANGUAGE_BIHARI   
+             wxLANGUAGE_BISLAMA   
+             wxLANGUAGE_BRETON   
+             wxLANGUAGE_BULGARIAN   
+             wxLANGUAGE_BURMESE   
+             wxLANGUAGE_CAMBODIAN   
+             wxLANGUAGE_CATALAN   
+             wxLANGUAGE_CHINESE   
+             wxLANGUAGE_CHINESE_SIMPLIFIED   
+             wxLANGUAGE_CHINESE_TRADITIONAL   
+             wxLANGUAGE_CHINESE_HONGKONG   
+             wxLANGUAGE_CHINESE_MACAU   
+             wxLANGUAGE_CHINESE_SINGAPORE   
+             wxLANGUAGE_CHINESE_TAIWAN   
+             wxLANGUAGE_CORSICAN   
+             wxLANGUAGE_CROATIAN   
+             wxLANGUAGE_CZECH   
+             wxLANGUAGE_DANISH   
+             wxLANGUAGE_DUTCH   
+             wxLANGUAGE_DUTCH_BELGIAN   
+             wxLANGUAGE_ENGLISH   
+             wxLANGUAGE_ENGLISH_UK   
+             wxLANGUAGE_ENGLISH_US   
+             wxLANGUAGE_ENGLISH_AUSTRALIA   
+             wxLANGUAGE_ENGLISH_BELIZE   
+             wxLANGUAGE_ENGLISH_BOTSWANA   
+             wxLANGUAGE_ENGLISH_CANADA   
+             wxLANGUAGE_ENGLISH_CARIBBEAN   
+             wxLANGUAGE_ENGLISH_DENMARK   
+             wxLANGUAGE_ENGLISH_EIRE   
+             wxLANGUAGE_ENGLISH_JAMAICA   
+             wxLANGUAGE_ENGLISH_NEW_ZEALAND   
+             wxLANGUAGE_ENGLISH_PHILIPPINES   
+             wxLANGUAGE_ENGLISH_SOUTH_AFRICA   
+             wxLANGUAGE_ENGLISH_TRINIDAD   
+             wxLANGUAGE_ENGLISH_ZIMBABWE   
+             wxLANGUAGE_ESPERANTO   
+             wxLANGUAGE_ESTONIAN   
+             wxLANGUAGE_FAEROESE   
+             wxLANGUAGE_FARSI   
+             wxLANGUAGE_FIJI   
+             wxLANGUAGE_FINNISH   
+             wxLANGUAGE_FRENCH   
+             wxLANGUAGE_FRENCH_BELGIAN   
+             wxLANGUAGE_FRENCH_CANADIAN   
+             wxLANGUAGE_FRENCH_LUXEMBOURG   
+             wxLANGUAGE_FRENCH_MONACO   
+             wxLANGUAGE_FRENCH_SWISS   
+             wxLANGUAGE_FRISIAN   
+             wxLANGUAGE_GALICIAN   
+             wxLANGUAGE_GEORGIAN   
+             wxLANGUAGE_GERMAN   
+             wxLANGUAGE_GERMAN_AUSTRIAN   
+             wxLANGUAGE_GERMAN_BELGIUM   
+             wxLANGUAGE_GERMAN_LIECHTENSTEIN   
+             wxLANGUAGE_GERMAN_LUXEMBOURG   
+             wxLANGUAGE_GERMAN_SWISS   
+             wxLANGUAGE_GREEK   
+             wxLANGUAGE_GREENLANDIC   
+             wxLANGUAGE_GUARANI   
+             wxLANGUAGE_GUJARATI   
+             wxLANGUAGE_HAUSA   
+             wxLANGUAGE_HEBREW   
+             wxLANGUAGE_HINDI   
+             wxLANGUAGE_HUNGARIAN   
+             wxLANGUAGE_ICELANDIC   
+             wxLANGUAGE_INDONESIAN   
+             wxLANGUAGE_INTERLINGUA   
+             wxLANGUAGE_INTERLINGUE   
+             wxLANGUAGE_INUKTITUT   
+             wxLANGUAGE_INUPIAK   
+             wxLANGUAGE_IRISH   
+             wxLANGUAGE_ITALIAN   
+             wxLANGUAGE_ITALIAN_SWISS   
+             wxLANGUAGE_JAPANESE   
+             wxLANGUAGE_JAVANESE   
+             wxLANGUAGE_KANNADA   
+             wxLANGUAGE_KASHMIRI   
+             wxLANGUAGE_KASHMIRI_INDIA   
+             wxLANGUAGE_KAZAKH   
+             wxLANGUAGE_KERNEWEK   
+             wxLANGUAGE_KINYARWANDA   
+             wxLANGUAGE_KIRGHIZ   
+             wxLANGUAGE_KIRUNDI   
+             wxLANGUAGE_KONKANI   
+             wxLANGUAGE_KOREAN   
+             wxLANGUAGE_KURDISH   
+             wxLANGUAGE_LAOTHIAN   
+             wxLANGUAGE_LATIN   
+             wxLANGUAGE_LATVIAN   
+             wxLANGUAGE_LINGALA   
+             wxLANGUAGE_LITHUANIAN   
+             wxLANGUAGE_MACEDONIAN   
+             wxLANGUAGE_MALAGASY   
+             wxLANGUAGE_MALAY   
+             wxLANGUAGE_MALAYALAM   
+             wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM   
+             wxLANGUAGE_MALAY_MALAYSIA   
+             wxLANGUAGE_MALTESE   
+             wxLANGUAGE_MANIPURI   
+             wxLANGUAGE_MAORI   
+             wxLANGUAGE_MARATHI   
+             wxLANGUAGE_MOLDAVIAN   
+             wxLANGUAGE_MONGOLIAN   
+             wxLANGUAGE_NAURU   
+             wxLANGUAGE_NEPALI   
+             wxLANGUAGE_NEPALI_INDIA   
+             wxLANGUAGE_NORWEGIAN_BOKMAL   
+             wxLANGUAGE_NORWEGIAN_NYNORSK   
+             wxLANGUAGE_OCCITAN   
+             wxLANGUAGE_ORIYA   
+             wxLANGUAGE_OROMO   
+             wxLANGUAGE_PASHTO   
+             wxLANGUAGE_POLISH   
+             wxLANGUAGE_PORTUGUESE   
+             wxLANGUAGE_PORTUGUESE_BRAZILIAN   
+             wxLANGUAGE_PUNJABI   
+             wxLANGUAGE_QUECHUA   
+             wxLANGUAGE_RHAETO_ROMANCE   
+             wxLANGUAGE_ROMANIAN   
+             wxLANGUAGE_RUSSIAN   
+             wxLANGUAGE_RUSSIAN_UKRAINE   
+             wxLANGUAGE_SAMI   
+             wxLANGUAGE_SAMOAN   
+             wxLANGUAGE_SANGHO   
+             wxLANGUAGE_SANSKRIT   
+             wxLANGUAGE_SCOTS_GAELIC   
+             wxLANGUAGE_SERBIAN   
+             wxLANGUAGE_SERBIAN_CYRILLIC   
+             wxLANGUAGE_SERBIAN_LATIN   
+             wxLANGUAGE_SERBO_CROATIAN   
+             wxLANGUAGE_SESOTHO   
+             wxLANGUAGE_SETSWANA   
+             wxLANGUAGE_SHONA   
+             wxLANGUAGE_SINDHI   
+             wxLANGUAGE_SINHALESE   
+             wxLANGUAGE_SISWATI   
+             wxLANGUAGE_SLOVAK   
+             wxLANGUAGE_SLOVENIAN   
+             wxLANGUAGE_SOMALI   
+             wxLANGUAGE_SPANISH   
+             wxLANGUAGE_SPANISH_ARGENTINA   
+             wxLANGUAGE_SPANISH_BOLIVIA   
+             wxLANGUAGE_SPANISH_CHILE   
+             wxLANGUAGE_SPANISH_COLOMBIA   
+             wxLANGUAGE_SPANISH_COSTA_RICA   
+             wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC   
+             wxLANGUAGE_SPANISH_ECUADOR   
+             wxLANGUAGE_SPANISH_EL_SALVADOR   
+             wxLANGUAGE_SPANISH_GUATEMALA   
+             wxLANGUAGE_SPANISH_HONDURAS   
+             wxLANGUAGE_SPANISH_MEXICAN   
+             wxLANGUAGE_SPANISH_MODERN   
+             wxLANGUAGE_SPANISH_NICARAGUA   
+             wxLANGUAGE_SPANISH_PANAMA   
+             wxLANGUAGE_SPANISH_PARAGUAY   
+             wxLANGUAGE_SPANISH_PERU   
+             wxLANGUAGE_SPANISH_PUERTO_RICO   
+             wxLANGUAGE_SPANISH_URUGUAY   
+             wxLANGUAGE_SPANISH_US   
+             wxLANGUAGE_SPANISH_VENEZUELA   
+             wxLANGUAGE_SUNDANESE   
+             wxLANGUAGE_SWAHILI   
+             wxLANGUAGE_SWEDISH   
+             wxLANGUAGE_SWEDISH_FINLAND   
+             wxLANGUAGE_TAGALOG   
+             wxLANGUAGE_TAJIK   
+             wxLANGUAGE_TAMIL   
+             wxLANGUAGE_TATAR   
+             wxLANGUAGE_TELUGU   
+             wxLANGUAGE_THAI   
+             wxLANGUAGE_TIBETAN   
+             wxLANGUAGE_TIGRINYA   
+             wxLANGUAGE_TONGA   
+             wxLANGUAGE_TSONGA   
+             wxLANGUAGE_TURKISH   
+             wxLANGUAGE_TURKMEN   
+             wxLANGUAGE_TWI   
+             wxLANGUAGE_UIGHUR   
+             wxLANGUAGE_UKRAINIAN   
+             wxLANGUAGE_URDU   
+             wxLANGUAGE_URDU_INDIA   
+             wxLANGUAGE_URDU_PAKISTAN   
+             wxLANGUAGE_UZBEK   
+             wxLANGUAGE_UZBEK_CYRILLIC   
+             wxLANGUAGE_UZBEK_LATIN   
+             wxLANGUAGE_VALENCIAN   
+             wxLANGUAGE_VIETNAMESE   
+             wxLANGUAGE_VOLAPUK   
+             wxLANGUAGE_WELSH   
+             wxLANGUAGE_WOLOF   
+             wxLANGUAGE_XHOSA   
+             wxLANGUAGE_YIDDISH   
+             wxLANGUAGE_YORUBA   
+             wxLANGUAGE_ZHUANG   
+             wxLANGUAGE_ZULU  
+         /;
+use Uploader::GUI::wxFrameAUI;
+use File::Slurp ;
+use Data::Dumper;
+use Storable;
+use File::HomeDir;
+use File::Spec;
+use Uploader::PWG;
+use Uploader::ImageList;
+use Uploader::GUI::wxLoginDlg;
+use Wx::Locale qw/:default/;
+
+
+$|=1;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          pwg
+          site_url
+          site_username
+          site_password
+          rejects
+          imagelist
+          storable_file
+          wx_thumb_dir
+          resized_dir
+          preview_dir
+          userdata_dir
+          resized_dir
+          thumb_dir
+          conf_file
+          locale
+          current_language
+      / 
+);
+
+sub FilterEvent {
+    my( $self, $event ) = @_;
+    
+    Wx::LogMessage "EventType %s", $event->GetEventType();
+    
+    return -1;
+}
+
+sub OnInit {
+    my( $self ) = @_;
+
+    Wx::InitAllImageHandlers();
+    my $applicationName = "pLoader" ;
+    $self->SetAppName( $applicationName );
+    $self->SetVendorName( "Piwigo Team" );
+
+    $self->{IMGTYPE} = {
+        'jpg' => wxBITMAP_TYPE_JPEG,
+        'gif' => wxBITMAP_TYPE_GIF,
+        'png' => wxBITMAP_TYPE_PNG,
+    };
+
+    $self->_readParams2( 'locale.ini' ) ;
+
+    $self->_init_userdir;
+
+
+    my $conf = retrieve $self->conf_file if -e $self->conf_file;	
+
+    if(defined $conf ){
+        $self->SetKeyValues($conf);
+    }
+    else {
+        $self->_readParams( 'pLoader.ini' ) unless defined $conf ;
+    }
+
+
+    $self->site_url(
+        $self->{site_url}
+    );
+
+    $self->site_username(
+        $self->{site_username}
+    );
+    $self->site_password(
+        $self->{site_password}
+    );
+    $self->current_language(
+        $self->{current_language}||wxLANGUAGE_ENGLISH
+    );
+
+    
+    $self->init_locale;
+    
+
+
+    my $ok = $self->Login();
+    # user pressed OK
+    if($ok){
+        $self->pwg(
+            # get these parameters from dialog or from file
+            Uploader::PWG->new(
+                {
+                    site_url       => $self->site_url,
+                    site_username  => $self->site_username,
+                    site_password  => $self->site_password,
+                }
+            )
+        );
+      
+    
+        $self->_init_imagelist;
+        $self->_init_thumbimagelist;
+        
+        $self->_init_frame;
+    }
+
+    $ok;
+}
+
+my $locale;
+sub init_locale {
+    my ( $self, $language ) = @_;
+    
+    $self->current_language(
+        $language
+    ) if defined $language;
+
+    undef $locale;
+    $locale = Wx::Locale->new(
+        $self->current_language
+    );
+    $locale->AddCatalogLookupPathPrefix( '../locale');
+    if(!$locale->AddCatalog( 'pLoader' )){
+        print "Cannot find translation catalog files. Use default language\n";
+    }
+	
+}
+
+sub StoreConnectionProperties {
+    my ( $self ) = @_;
+
+    eval {    
+        store( 
+            {
+                map{
+                   $_ => $self->{$_},
+                }
+                qw/
+                    site_url
+                    site_username
+                    site_password
+                    current_language
+                /
+            },
+            $self->conf_file
+        );
+    };
+}
+
+sub _init_imagelist {
+    my ( $self ) = @_;	
+
+    my $stored_imagelist;
+    
+    if( -e $self->storable_file ){
+        eval {
+            $stored_imagelist = retrieve $self->storable_file;
+        };
+        if($@){
+            Wx::LogMessage(
+                "An error has occured. Can not read %s\n%s",
+                $self->storable_file,
+                $@
+            );
+            $stored_imagelist = $self->_default_imagelist_params ;
+        }
+    }
+    else{
+        $stored_imagelist = $self->_default_imagelist_params ;
+    }
+
+    $self->imagelist(
+        Uploader::ImageList->new(
+            $stored_imagelist
+        )
+    );
+
+    $self->imagelist->ResizeCallback(
+        sub { $self->ResizeImage(@_) }
+    );
+}
+
+
+sub _default_imagelist_params {
+    my ( $self ) = @_ ;
+
+    my $params = {
+       	thumb_size       => 120,
+        site_thumb_dir   => $self->thumb_dir,
+       	wx_thumb_size    => 120,
+        wx_thumb_dir     => $self->wx_thumb_dir,
+        preview_ratio    => 25, 
+        preview_dir      => $self->preview_dir,
+        resize_w         => 800,
+        resize_h         => 600,
+        site_resized_dir => $self->resized_dir,
+      	type             => 'jpg',
+      	filter           => 'Lanczos',
+      	blur             => 0.9,
+      	quality          => 100,
+      	prefix           => 'TN',
+      	count            => 0,
+        storable_file    => $self->storable_file,
+        images           => [],
+        userdata_dir     => $self->userdata_dir,
+        default_name_prefix => 'Photo',
+        upload_rejects  =>  [],
+        ResizeCallback  => sub { $self->ResizeImage(@_) },
+    };
+
+    return $params;
+}
+
+sub Login {
+    my ( $self ) = @_;	
+
+    my $dlg = Uploader::GUI::wxLoginDlg->new(
+        {
+            title         => gettext("Piwigo login"),
+            site_url      => sub { $self->site_url(@_) },
+            site_username => sub { $self->site_username(@_) },	
+            site_password => sub { $self->site_password(@_) },	
+        }
+    );
+
+    my $icon = Wx::Icon->new();
+    $icon->LoadFile('../res/favicon.ico', wxBITMAP_TYPE_ICO);
+    $dlg->SetIcon($icon);	
+
+    
+    my $rval = $dlg->ShowModal();
+    $dlg->Destroy;
+    
+    $rval;
+}
+
+sub _init_userdir {
+    my ( $self ) = @_;
+    
+    my $applicationName = $self->GetAppName ;
+    my $userdatadir = File::Spec->canonpath(
+        File::Spec->catfile(
+            File::HomeDir->my_data(), 
+            "\.$applicationName"
+        )
+    );
+
+    if(! -d $userdatadir){
+        if(! mkdir $userdatadir){
+            Wx::MessageBox( 
+                sprintf(
+                    "%s directory creation failed",
+                    $userdatadir,
+                ),
+                "pLoader working directory creation error",
+                wxOK | wxICON_EXCLAMATION, 
+            );
+
+            $userdatadir = File::Spec->canonpath(
+                File::Spec->catfile(
+                    File::Spec->tmpdir(), 
+                    "\.$applicationName"
+                )
+            );
+            mkdir $userdatadir;
+        }	
+    }
+
+    $self->userdata_dir($userdatadir);
+    
+    $self->conf_file(
+        File::Spec->catfile(
+            $self->userdata_dir, 
+            ".$applicationName.conf"
+        )
+    );
+
+    
+
+    $self->storable_file(
+        File::Spec->catfile($self->userdata_dir, 'pLoader.dat')
+    );
+    
+    my $thumbdir = File::Spec->catfile($self->userdata_dir, 'thumbnails');
+    mkdir $thumbdir unless -d $thumbdir ;
+    $self->thumb_dir($thumbdir);
+
+    my $wxthumbdir = File::Spec->catfile($self->userdata_dir, 'wxthumbnails');
+    mkdir $wxthumbdir unless -d $wxthumbdir ;
+    $self->wx_thumb_dir($wxthumbdir);
+
+
+    my $resizedir = File::Spec->catfile($self->userdata_dir, 'resize');
+    mkdir $resizedir unless -d $resizedir ;
+    $self->resized_dir($resizedir);
+
+    my $previewdir = File::Spec->catfile($self->userdata_dir, 'preview');
+    mkdir $previewdir unless -d $previewdir ;
+    $self->preview_dir($previewdir);
+
+	
+}
+
+sub _init_thumbimagelist {
+    my ( $self ) = @_;
+
+    
+    $self->imagelist->wx_thumb_imglist(
+        Wx::ImageList->new( 
+            $self->imagelist->wx_thumb_size, 
+            $self->imagelist->wx_thumb_size, 
+            1,
+            0
+        )
+    );
+    
+    # reload images 
+    $self->_reload_thumb_images;
+}
+
+
+sub _reload_thumb_images {
+    my ( $self ) = @_;
+    
+    my $wximagelist = $self->imagelist->wx_thumb_imglist;
+    my $images = $self->imagelist->images;
+
+    map {
+        $wximagelist->Add(
+            Wx::Bitmap->new( 
+                $_->wx_thumb_file, 
+                $self->GetWxBitmapType($self->imagelist->type), 
+            )
+        );
+    }
+    @$images ;
+
+}
+
+sub GetWxBitmapType {
+    my ( $self, $type ) = @_;
+    
+    $self->{IMGTYPE}->{$type};
+}
+
+
+sub ResizeImage {
+    my ( $self, $image_file, $image_file_out, $type, $ratio, $width, $height, $quality ) = @_;
+   
+
+    my $image = Wx::Image->new(
+            $image_file, 
+            $self->GetWxBitmapType($type),
+            0
+    );
+    
+    my $w;
+    my $h;
+
+    my $img_w = $image->GetWidth;
+    my $img_h = $image->GetHeight;
+    
+    # use a ratio ( 25% default ) if defined
+    # default ratio is used for preview.
+    if($ratio){
+    	$w = $ratio*$img_w/100 ;
+        $h = $ratio*$img_h/100 ;
+    }
+    # use specified width and height
+    else{
+        # portrait
+        if( $img_w < $img_h ){
+            $w = $height;
+        }
+        else{
+            $w = $width;
+        }
+        # to respect aspect ratio
+        $h = sprintf(
+            "%.0f",
+            ($w*$img_h)/$img_w
+        );
+    }
+
+    $image->Rescale(
+        $w,
+        $h,
+        wxIMAGE_QUALITY_HIGH
+    );
+    
+    $quality ||= 90;
+    
+    $image->SetOption( 
+        "quality", 
+        $quality 
+    );
+    
+    if(!$image->SaveFile(
+        $image_file_out,
+        $self->GetWxBitmapType($type),
+    )){
+    	Wx::LogMessage(
+    	    "An error has occured. Can not save file %s",
+    	    $image_file_out,
+    	)
+    };
+}
+
+sub _init_frame {
+    my ( $self ) = @_ ;	
+
+    my $config = Wx::ConfigBase::Get;
+
+    my $x = $config->ReadInt( "X", 50 );
+    my $y = $config->ReadInt( "Y", 50 );
+    my $w = $config->ReadInt( "Width", 1024 );
+    my $h = $config->ReadInt( "height", 768 );
+    my $sv = $config->ReadInt( "splitVertical", 150 );
+    my $sh = $config->ReadInt( "splitHorizontal", 300 );
+	
+    my $url;
+    if($self->pwg->login_result->{stat} eq 'ok'){
+        $url = $self->site_url;    
+    }
+    else{
+        $url = gettext("Not connected");
+        Wx::MessageBox( 
+            sprintf(
+                "%s\n\n%s %s %s",
+                $self->pwg->login_result->{message},
+                gettext("Connection to"),
+                $self->site_url,
+                gettext("failed"),
+            ),
+            gettext("Piwigo login error"),
+            wxOK | wxICON_EXCLAMATION, 
+        );
+    }	
+    	
+
+    my ( $frame ) = Uploader::GUI::wxFrameAUI->new( 
+        {
+            x         => $x,
+            y         => $y,
+            width     => $w,
+            height    => $h,
+            title     => "pLoader - Piwigo uploader 2.0.0a - [$url]" ,
+            pwg       => $self->pwg,
+            imagelist => $self->imagelist,
+        }
+    );
+	
+	#printf("Config x %s, y %s, w %s, h %s\n", $x, $y, $w, $h);
+	#$frame->SetSize( $x, $y, $w, $h );
+    $frame->Show( 1 );
+    $self->SetTopWindow( $frame );
+
+    my $icon = Wx::Icon->new();
+    $icon->LoadFile('../res/favicon.ico', wxBITMAP_TYPE_ICO);
+    $frame->SetIcon($icon);	
+
+
+    return 1;
+}
+
+
+sub _readParams {
+	my( $self, $file ) = @_ ;
+
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params ; " ;
+		eval $expr ;
+	}
+	
+	return unless 'ARRAY' eq ref $paramValues ;
+	
+	if(scalar(@$paramValues )){
+	    my $params = $paramValues->[0] ;
+	    $self->SetKeyValues($params);
+	}
+}
+
+sub _readParams2 {
+	my( $self, $file ) = @_ ;
+
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params ; " ;
+		eval $expr ;
+	}
+	
+	return unless 'HASH' eq ref $paramValues ;
+	
+	$self->SetKeyValues($paramValues);
+}
+
+
+sub SetKeyValues {
+    my ( $self, $params )= @_;	
+
+    foreach( keys %$params ) {
+        $self->{$_} = $params->{$_} ;
+    }
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxExportJobsDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxExportJobsDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxExportJobsDlg.pm	(revision 3291)
@@ -0,0 +1,221 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxExportJobsDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+#use TDSC::GUI::export_dlg;
+use Wx::Event qw/
+                    EVT_CHECKLISTBOX
+                    EVT_RADIOBOX
+                    EVT_BUTTON
+                    EVT_UPDATE_UI
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           clbjobs
+           rbolanguage
+           output_path
+           language
+           btok
+           jobs
+      / 
+);
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::DSExportJobs($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->clbjobs( $self->FindWindow($main::ID_EXPORT_JOBS) );
+    $self->rbolanguage( $self->FindWindow($main::ID_LANGUAGE) );
+    $self->btok( $self->FindWindow($main::ID_EXPORT_OK) );
+    
+
+    # Undefined is default and hidden : no default language choice
+    $self->rbolanguage->SetSelection(2);
+    $self->rbolanguage->Show(2, 0);
+    
+    
+
+    $self->clbjobs->InsertItems( $params->{jobs}, 0 );
+    $self->_restorePrevValues( $params );
+    
+    $self;    
+}
+
+sub _restorePrevValues {
+    my ( $self, $params ) = @_;
+    
+    if ( defined( $params->{prevjobs} ) ){
+        my $selected = {};
+        map {
+            $selected->{$_} = 1;
+        }
+        @{$params->{prevjobs}};
+        
+        # restore prev export selection
+        for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+          if($selected->{$self->clbjobs->GetString($i)}){
+              $self->clbjobs->Check($i, 1);
+          }
+        }    	
+        $self->jobs( $params->{prevjobs} );
+    }
+    else {
+        $self->jobs( [] );	
+    }
+    
+    if ( defined( $params->{output_path} ) ){
+        $self->output_path( $params->{output_path} );
+    }	
+
+    if ( defined( $params->{language} ) ){
+        $self->language( $params->{language} );
+    }
+    else {
+    	# Undefined
+        $self->language( 2 );
+    }
+
+}
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_SELECT_ALL, \&OnSelectAll );
+    EVT_BUTTON( $self, $main::ID_REVERSE_SEL, \&OnReverseSelection );
+    EVT_BUTTON( $self, $main::ID_EXPORT_OK, \&OnExportOK );
+    EVT_BUTTON( $self, $main::ID_EXPORT_CANCEL, \&OnExportCancel );
+    EVT_BUTTON( $self, $main::ID_EXPORT_DIRDIALOG, \&OnExportDirDialog );
+    EVT_CHECKLISTBOX($self, $main::ID_EXPORT_JOBS, \&OnCheckListBox ) ;
+    EVT_RADIOBOX($self, $main::ID_LANGUAGE, \&OnRadioBox ) ;
+    
+    EVT_UPDATE_UI( $self, $self, \&OnUpdateUI ) ;   
+	
+}
+
+# UI context management
+sub OnUpdateUI {
+    my ( $self, $event ) = @_;
+    
+    $self->FindWindow($main::ID_EXPORT_DIRECTORY)->SetValue( $self->output_path );
+    $self->FindWindow($main::ID_LANGUAGE)->SetSelection( $self->language );
+    
+    # Enable OK if required properties are set
+    $self->btok->Enable(1) if (
+        defined $self->output_path &&
+        2 != $self->rbolanguage->GetSelection &&
+        scalar @{$self->jobs}
+    );
+	
+}
+
+sub OnRadioBox {
+    my ( $self, $event ) = @_;
+
+    $self->language($event->GetInt);
+}
+
+sub OnCheckListBox {
+    my ( $self, $event ) = @_;
+    
+    $self->SelectedJobs();
+}
+
+sub OnExportDirDialog {
+    my ( $self, $event ) = @_;
+
+    my $dialog = Wx::DirDialog->new( $self );
+
+    if( $dialog->ShowModal == wxID_CANCEL ) {
+        Wx::LogMessage( "User cancelled the dialog" );
+    } else {
+        Wx::LogMessage( "Export directory: %s", $dialog->GetPath );
+        $self->output_path( $dialog->GetPath );
+    }
+
+    $dialog->Destroy;
+	
+}
+
+sub OnExportOK {
+    my ( $self, $event ) = @_;
+    
+    $self->EndModal(wxID_OK);
+ 
+}
+
+sub OnExportCancel {
+    my ( $self, $event ) = @_;
+    
+    $self->EndModal(wxID_CANCEL);
+}
+
+sub OnSelectAll {
+    my ( $self, $event ) = @_;
+    
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+      $self->clbjobs->Check($i, 1) if !$self->clbjobs->IsChecked($i);	
+    }	
+    $self->SelectedJobs();
+}
+
+sub OnReverseSelection {
+    my ( $self, $event ) = @_;
+    
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+      if($self->clbjobs->IsChecked($i)){
+          $self->clbjobs->Check($i, 0);
+      }
+      else{
+          $self->clbjobs->Check($i, 1);
+      }	
+    }
+    $self->SelectedJobs();
+}
+
+
+sub SelectedJobs {
+    my ( $self ) = @_;
+
+    my $jobs = [];
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+        if($self->clbjobs->IsChecked($i)){
+            push @$jobs, $self->clbjobs->GetString($i);
+        }
+    }
+    $self->jobs( $jobs );	
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxExportProgressDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxExportProgressDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxExportProgressDlg.pm	(revision 3291)
@@ -0,0 +1,102 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxExportProgressDlg;
+use strict;
+use Carp;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           gauge
+           progress
+           processing
+           txtprocessing
+           cancelled
+      / 
+);
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::ProcessingProgress($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PROGRESS_OK) );
+    $self->gauge( $self->FindWindow($main::ID_PROGRESS_GAUGE) );
+    $self->txtprocessing( $self->FindWindow($main::ID_PROGRESS_TXT) );
+    $self->gauge->SetForegroundColour(wxGREEN);
+      
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PROGRESS_OK, \&OnExportOK );
+    
+	
+}
+
+# Update progress information
+sub LogProgress {
+    my ( $self ) = @_;
+
+printf("$self cancelled %s \n", $self->cancelled);
+    die if $self->cancelled;    
+    $self->txtprocessing->SetLabel(
+        $text || $self->processing
+    );
+    $self->gauge->SetValue(
+        $value || $self->progress
+    );
+
+}
+
+# Close the dialog. cancel export
+sub OnExportOK {
+    my ( $self, $event ) = @_;
+    
+    $self->cancelled(1);
+    $self->Destroy;
+ 
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxFrameAUI.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxFrameAUI.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxFrameAUI.pm	(revision 3291)
@@ -0,0 +1,1501 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxFrameAUI;
+use strict;
+use Carp;
+use Wx;
+use Wx::DND;
+use Wx qw/
+             wxID_OK
+             wxDEFAULT_FRAME_STYLE
+             wxVERTICAL
+             wxGROW
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_GIF
+             wxBITMAP_TYPE_PNG
+             wxTB_FLAT
+             wxSIZE
+             wxWHITE
+             wxBLACK
+             wxID_CANCEL
+             wxFD_OPEN
+             wxFD_MULTIPLE
+             wxLI_HORIZONTAL
+             wxALIGN_CENTER_VERTICAL
+             wxALL
+             wxDefaultPosition
+             wxDefaultSize
+             wxTheApp
+             wxIMAGE_LIST_NORMAL
+             wxAUI_NB_TAB_MOVE
+             wxAUI_NB_TAB_SPLIT
+             wxNO_BORDER
+             wxTE_MULTILINE
+             wxTE_READONLY
+             wxITEM_NORMAL 
+             wxCLIP_CHILDREN
+             wxBORDER_NONE
+             wxNullBitmap 
+             wxTR_MULTIPLE
+             wxTR_EXTENDED
+             wxTR_HIDE_ROOT
+             wxTR_HAS_BUTTONS
+             wxMAXIMIZE
+             wxOK
+             wxICON_EXCLAMATION
+             wxICON_INFORMATION
+             WXK_DELETE
+             wxLANGUAGE_ABKHAZIAN   
+             wxLANGUAGE_AFAR   
+             wxLANGUAGE_AFRIKAANS   
+             wxLANGUAGE_ALBANIAN   
+             wxLANGUAGE_AMHARIC   
+             wxLANGUAGE_ARABIC   
+             wxLANGUAGE_ARABIC_ALGERIA   
+             wxLANGUAGE_ARABIC_BAHRAIN   
+             wxLANGUAGE_ARABIC_EGYPT   
+             wxLANGUAGE_ARABIC_IRAQ   
+             wxLANGUAGE_ARABIC_JORDAN   
+             wxLANGUAGE_ARABIC_KUWAIT   
+             wxLANGUAGE_ARABIC_LEBANON   
+             wxLANGUAGE_ARABIC_LIBYA   
+             wxLANGUAGE_ARABIC_MOROCCO   
+             wxLANGUAGE_ARABIC_OMAN   
+             wxLANGUAGE_ARABIC_QATAR   
+             wxLANGUAGE_ARABIC_SAUDI_ARABIA   
+             wxLANGUAGE_ARABIC_SUDAN   
+             wxLANGUAGE_ARABIC_SYRIA   
+             wxLANGUAGE_ARABIC_TUNISIA   
+             wxLANGUAGE_ARABIC_UAE   
+             wxLANGUAGE_ARABIC_YEMEN   
+             wxLANGUAGE_ARMENIAN   
+             wxLANGUAGE_ASSAMESE   
+             wxLANGUAGE_AYMARA   
+             wxLANGUAGE_AZERI   
+             wxLANGUAGE_AZERI_CYRILLIC   
+             wxLANGUAGE_AZERI_LATIN   
+             wxLANGUAGE_BASHKIR   
+             wxLANGUAGE_BASQUE   
+             wxLANGUAGE_BELARUSIAN   
+             wxLANGUAGE_BENGALI   
+             wxLANGUAGE_BHUTANI   
+             wxLANGUAGE_BIHARI   
+             wxLANGUAGE_BISLAMA   
+             wxLANGUAGE_BRETON   
+             wxLANGUAGE_BULGARIAN   
+             wxLANGUAGE_BURMESE   
+             wxLANGUAGE_CAMBODIAN   
+             wxLANGUAGE_CATALAN   
+             wxLANGUAGE_CHINESE   
+             wxLANGUAGE_CHINESE_SIMPLIFIED   
+             wxLANGUAGE_CHINESE_TRADITIONAL   
+             wxLANGUAGE_CHINESE_HONGKONG   
+             wxLANGUAGE_CHINESE_MACAU   
+             wxLANGUAGE_CHINESE_SINGAPORE   
+             wxLANGUAGE_CHINESE_TAIWAN   
+             wxLANGUAGE_CORSICAN   
+             wxLANGUAGE_CROATIAN   
+             wxLANGUAGE_CZECH   
+             wxLANGUAGE_DANISH   
+             wxLANGUAGE_DUTCH   
+             wxLANGUAGE_DUTCH_BELGIAN   
+             wxLANGUAGE_ENGLISH   
+             wxLANGUAGE_ENGLISH_UK   
+             wxLANGUAGE_ENGLISH_US   
+             wxLANGUAGE_ENGLISH_AUSTRALIA   
+             wxLANGUAGE_ENGLISH_BELIZE   
+             wxLANGUAGE_ENGLISH_BOTSWANA   
+             wxLANGUAGE_ENGLISH_CANADA   
+             wxLANGUAGE_ENGLISH_CARIBBEAN   
+             wxLANGUAGE_ENGLISH_DENMARK   
+             wxLANGUAGE_ENGLISH_EIRE   
+             wxLANGUAGE_ENGLISH_JAMAICA   
+             wxLANGUAGE_ENGLISH_NEW_ZEALAND   
+             wxLANGUAGE_ENGLISH_PHILIPPINES   
+             wxLANGUAGE_ENGLISH_SOUTH_AFRICA   
+             wxLANGUAGE_ENGLISH_TRINIDAD   
+             wxLANGUAGE_ENGLISH_ZIMBABWE   
+             wxLANGUAGE_ESPERANTO   
+             wxLANGUAGE_ESTONIAN   
+             wxLANGUAGE_FAEROESE   
+             wxLANGUAGE_FARSI   
+             wxLANGUAGE_FIJI   
+             wxLANGUAGE_FINNISH   
+             wxLANGUAGE_FRENCH   
+             wxLANGUAGE_FRENCH_BELGIAN   
+             wxLANGUAGE_FRENCH_CANADIAN   
+             wxLANGUAGE_FRENCH_LUXEMBOURG   
+             wxLANGUAGE_FRENCH_MONACO   
+             wxLANGUAGE_FRENCH_SWISS   
+             wxLANGUAGE_FRISIAN   
+             wxLANGUAGE_GALICIAN   
+             wxLANGUAGE_GEORGIAN   
+             wxLANGUAGE_GERMAN   
+             wxLANGUAGE_GERMAN_AUSTRIAN   
+             wxLANGUAGE_GERMAN_BELGIUM   
+             wxLANGUAGE_GERMAN_LIECHTENSTEIN   
+             wxLANGUAGE_GERMAN_LUXEMBOURG   
+             wxLANGUAGE_GERMAN_SWISS   
+             wxLANGUAGE_GREEK   
+             wxLANGUAGE_GREENLANDIC   
+             wxLANGUAGE_GUARANI   
+             wxLANGUAGE_GUJARATI   
+             wxLANGUAGE_HAUSA   
+             wxLANGUAGE_HEBREW   
+             wxLANGUAGE_HINDI   
+             wxLANGUAGE_HUNGARIAN   
+             wxLANGUAGE_ICELANDIC   
+             wxLANGUAGE_INDONESIAN   
+             wxLANGUAGE_INTERLINGUA   
+             wxLANGUAGE_INTERLINGUE   
+             wxLANGUAGE_INUKTITUT   
+             wxLANGUAGE_INUPIAK   
+             wxLANGUAGE_IRISH   
+             wxLANGUAGE_ITALIAN   
+             wxLANGUAGE_ITALIAN_SWISS   
+             wxLANGUAGE_JAPANESE   
+             wxLANGUAGE_JAVANESE   
+             wxLANGUAGE_KANNADA   
+             wxLANGUAGE_KASHMIRI   
+             wxLANGUAGE_KASHMIRI_INDIA   
+             wxLANGUAGE_KAZAKH   
+             wxLANGUAGE_KERNEWEK   
+             wxLANGUAGE_KINYARWANDA   
+             wxLANGUAGE_KIRGHIZ   
+             wxLANGUAGE_KIRUNDI   
+             wxLANGUAGE_KONKANI   
+             wxLANGUAGE_KOREAN   
+             wxLANGUAGE_KURDISH   
+             wxLANGUAGE_LAOTHIAN   
+             wxLANGUAGE_LATIN   
+             wxLANGUAGE_LATVIAN   
+             wxLANGUAGE_LINGALA   
+             wxLANGUAGE_LITHUANIAN   
+             wxLANGUAGE_MACEDONIAN   
+             wxLANGUAGE_MALAGASY   
+             wxLANGUAGE_MALAY   
+             wxLANGUAGE_MALAYALAM   
+             wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM   
+             wxLANGUAGE_MALAY_MALAYSIA   
+             wxLANGUAGE_MALTESE   
+             wxLANGUAGE_MANIPURI   
+             wxLANGUAGE_MAORI   
+             wxLANGUAGE_MARATHI   
+             wxLANGUAGE_MOLDAVIAN   
+             wxLANGUAGE_MONGOLIAN   
+             wxLANGUAGE_NAURU   
+             wxLANGUAGE_NEPALI   
+             wxLANGUAGE_NEPALI_INDIA   
+             wxLANGUAGE_NORWEGIAN_BOKMAL   
+             wxLANGUAGE_NORWEGIAN_NYNORSK   
+             wxLANGUAGE_OCCITAN   
+             wxLANGUAGE_ORIYA   
+             wxLANGUAGE_OROMO   
+             wxLANGUAGE_PASHTO   
+             wxLANGUAGE_POLISH   
+             wxLANGUAGE_PORTUGUESE   
+             wxLANGUAGE_PORTUGUESE_BRAZILIAN   
+             wxLANGUAGE_PUNJABI   
+             wxLANGUAGE_QUECHUA   
+             wxLANGUAGE_RHAETO_ROMANCE   
+             wxLANGUAGE_ROMANIAN   
+             wxLANGUAGE_RUSSIAN   
+             wxLANGUAGE_RUSSIAN_UKRAINE   
+             wxLANGUAGE_SAMI   
+             wxLANGUAGE_SAMOAN   
+             wxLANGUAGE_SANGHO   
+             wxLANGUAGE_SANSKRIT   
+             wxLANGUAGE_SCOTS_GAELIC   
+             wxLANGUAGE_SERBIAN   
+             wxLANGUAGE_SERBIAN_CYRILLIC   
+             wxLANGUAGE_SERBIAN_LATIN   
+             wxLANGUAGE_SERBO_CROATIAN   
+             wxLANGUAGE_SESOTHO   
+             wxLANGUAGE_SETSWANA   
+             wxLANGUAGE_SHONA   
+             wxLANGUAGE_SINDHI   
+             wxLANGUAGE_SINHALESE   
+             wxLANGUAGE_SISWATI   
+             wxLANGUAGE_SLOVAK   
+             wxLANGUAGE_SLOVENIAN   
+             wxLANGUAGE_SOMALI   
+             wxLANGUAGE_SPANISH   
+             wxLANGUAGE_SPANISH_ARGENTINA   
+             wxLANGUAGE_SPANISH_BOLIVIA   
+             wxLANGUAGE_SPANISH_CHILE   
+             wxLANGUAGE_SPANISH_COLOMBIA   
+             wxLANGUAGE_SPANISH_COSTA_RICA   
+             wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC   
+             wxLANGUAGE_SPANISH_ECUADOR   
+             wxLANGUAGE_SPANISH_EL_SALVADOR   
+             wxLANGUAGE_SPANISH_GUATEMALA   
+             wxLANGUAGE_SPANISH_HONDURAS   
+             wxLANGUAGE_SPANISH_MEXICAN   
+             wxLANGUAGE_SPANISH_MODERN   
+             wxLANGUAGE_SPANISH_NICARAGUA   
+             wxLANGUAGE_SPANISH_PANAMA   
+             wxLANGUAGE_SPANISH_PARAGUAY   
+             wxLANGUAGE_SPANISH_PERU   
+             wxLANGUAGE_SPANISH_PUERTO_RICO   
+             wxLANGUAGE_SPANISH_URUGUAY   
+             wxLANGUAGE_SPANISH_US   
+             wxLANGUAGE_SPANISH_VENEZUELA   
+             wxLANGUAGE_SUNDANESE   
+             wxLANGUAGE_SWAHILI   
+             wxLANGUAGE_SWEDISH   
+             wxLANGUAGE_SWEDISH_FINLAND   
+             wxLANGUAGE_TAGALOG   
+             wxLANGUAGE_TAJIK   
+             wxLANGUAGE_TAMIL   
+             wxLANGUAGE_TATAR   
+             wxLANGUAGE_TELUGU   
+             wxLANGUAGE_THAI   
+             wxLANGUAGE_TIBETAN   
+             wxLANGUAGE_TIGRINYA   
+             wxLANGUAGE_TONGA   
+             wxLANGUAGE_TSONGA   
+             wxLANGUAGE_TURKISH   
+             wxLANGUAGE_TURKMEN   
+             wxLANGUAGE_TWI   
+             wxLANGUAGE_UIGHUR   
+             wxLANGUAGE_UKRAINIAN   
+             wxLANGUAGE_URDU   
+             wxLANGUAGE_URDU_INDIA   
+             wxLANGUAGE_URDU_PAKISTAN   
+             wxLANGUAGE_UZBEK   
+             wxLANGUAGE_UZBEK_CYRILLIC   
+             wxLANGUAGE_UZBEK_LATIN   
+             wxLANGUAGE_VALENCIAN   
+             wxLANGUAGE_VIETNAMESE   
+             wxLANGUAGE_VOLAPUK   
+             wxLANGUAGE_WELSH   
+             wxLANGUAGE_WOLOF   
+             wxLANGUAGE_XHOSA   
+             wxLANGUAGE_YIDDISH   
+             wxLANGUAGE_YORUBA   
+             wxLANGUAGE_ZHUANG   
+             wxLANGUAGE_ZULU  
+         /;
+use base qw/Wx::Frame Class::Accessor::Fast/;
+use File::Spec;
+use Wx::Locale qw/:default/;
+
+
+my @properties = 
+    qw/
+          progressdlg
+          upload_progressdlg
+          imageviewer
+          tree
+          tree_root
+          treeimglist
+          tree_item_default
+          topsizer
+          pwg
+          manager
+          logwnd
+          oldlogwnd
+          htmlhome
+          notebook
+          categories
+          imagelist
+          image_prop_general
+          image_prop_exif
+          notebook_image_properties
+          notebook_global_settings
+          global_settings_panel
+      /;
+__PACKAGE__->mk_accessors( @properties );
+
+use Wx::Event 
+    qw/
+          EVT_MENU
+          EVT_TREE_SEL_CHANGED
+          EVT_CLOSE 
+          EVT_LIST_END_LABEL_EDIT
+          EVT_LIST_ITEM_SELECTED
+          EVT_TREE_ITEM_RIGHT_CLICK
+          EVT_LIST_KEY_DOWN       
+      /;
+      
+use Uploader::GUI::wxImageListCtrl;
+use Uploader::GUI::wxImageProcessingProgressDlg;
+use Wx::Html;
+use Uploader::GUI::wxHtmlWindow;
+use Data::Dumper;
+use Wx::AUI;
+use Storable;
+use Uploader::GUI::wxPhotoPropertiesPanel;
+use Uploader::GUI::wxPhotoExifPanel;
+use Uploader::GUI::wxGlobalSettingsPanel;
+use Encode qw/encode decode is_utf8/;
+
+$|=1;
+
+my $ID_TREE_CTX_MENU = 20000 ;
+
+sub new {
+  my( $class, $params ) = @_;
+  my( $self ) = $class->SUPER::new( 
+                                      undef, 
+                                      -1, 
+                                      $params->{title}, 
+                                      [ $params->{x}, $params->{y} ],
+                                      [ $params->{width}, $params->{height} ],
+                                      wxDEFAULT_FRAME_STYLE|wxMAXIMIZE
+                                   );
+    $self->pwg( $params->{pwg} );
+    $self->imagelist( $params->{imagelist} );
+
+    # callback for GUI refresh : add thumbnail images to the imageviewer control
+    $self->imagelist->SetNewFilesViewerRefreshCallback(
+        sub { $self->SetNewFilesViewerRefresh(@_) }
+    );
+
+    # callback for GUI refresh : progress dialog display of thumbnail image being created
+    $self->imagelist->SetNewFilesProgressCallback(
+        sub { $self->SetNewFilesProgress(@_) }
+    );
+
+    $self->imagelist->SetNewFilesDisplayEndInfoCallback(
+        sub { $self->SetNewFilesDisplayEndInfo(@_) }
+    );
+
+
+    # callback for GUI refresh : remove thumbnail images from imageviewer control
+    $self->imagelist->UploadImagesViewerCallback(
+        sub { $self->UploadImagesViewerRefresh(@_) }
+    );
+
+
+
+    # callback for GUI refresh : progress dialog display current uploaded image
+    $self->imagelist->progress_thumbnail_refresh(
+        sub { $self->UploadProgressThumbnailRefresh(@_) }
+    );
+
+    $self->imagelist->progress_msg_refresh(
+        sub { $self->UploadProgressMessageRefresh(@_) }
+    );
+
+
+    $self->imagelist->progressbar_refresh(
+        sub { $self->UploadProgressBarRefresh(@_) }
+    );
+    
+    $self->imagelist->progress_endinfo_refresh(
+        sub { $self->UploadDisplayEndInfo(@_) }
+    );
+
+
+    $self->imagelist->pwg(
+        $self->pwg
+    );
+
+    $self->imagelist->categories(
+        []
+    );
+
+    $self->manager( Wx::AuiManager->new );
+    $self->manager->SetManagedWindow( $self );
+
+    $self->_initFrame;
+    $self->_InitEventHandlers;
+    $self->_initImgTypes;   
+   
+    $self;
+}
+
+sub _initImgTypes {
+    my ( $self ) = @_;
+
+    $self->{IMGTYPE} = {
+             'jpg' => wxBITMAP_TYPE_JPEG,
+             'gif' => wxBITMAP_TYPE_GIF,
+             'png' => wxBITMAP_TYPE_PNG,
+    };
+}
+
+
+sub GetWxBitmapType {
+    my ( $self, $type ) = @_;
+    
+    $self->{IMGTYPE}->{$type};
+}
+
+sub _refreshFrame {
+    my ( $self ) = @_;
+    
+    $self->_destroy_settings_panels;
+    $self->manager->Update;
+    
+    $self->_init_settings_panels;
+    $self->_init_aui_settings_panels;
+
+    $self->manager->Update;
+}
+
+sub _destroy_settings_panels {
+    my ( $self ) = @_;
+
+
+
+    map {
+        $self->manager->DetachPane(
+            $_
+        );
+        $_->Show(0);
+        $_->Destroy;
+    }(
+        $self->notebook_global_settings,
+        $self->notebook_image_properties,
+    );
+}
+
+# 
+sub _initFrame {
+    my ( $self ) = @_;
+    
+ 
+    $self->init_panels;
+
+    $self->imageviewer->Show(0);
+
+    $self->init_aui;
+    $self->init_dnd_targets;
+
+    if( $self->imagelist->wx_thumb_imglist->GetImageCount){
+    	$self->ShowImageViewer;
+        
+        $self->imageviewer->Refresh(
+            $self->imagelist->wx_thumb_imglist
+        );
+    }
+
+}
+
+sub _init_settings_panels {
+    my ( $self ) = @_;	
+
+    $self->global_settings_panel(
+        $self->create_global_settings_panel()
+    );    
+    
+    $self->global_settings_panel->Show(0);
+
+    $self->image_prop_general(
+        Uploader::GUI::wxPhotoPropertiesPanel->new( 
+            { 
+                parentwnd => $self,
+                accessors => {
+                	          $main::ID_PHOTO =>
+                	              sub {
+                                            Wx::Bitmap->new( 
+                                                $self->imagelist->current_image->wx_thumb_file, 
+                                                $self->GetWxBitmapType($self->imagelist->type), 
+                                            );
+                	              }, 
+                	          $main::ID_PHOTO_NAME =>
+                	              sub { $self->imagelist->current_image->site_name(@_) }, 
+
+                	          $main::ID_PHOTO_CREATE_DATE =>
+                	              sub { $self->imagelist->current_image->create_date(@_) }, 
+                                  
+                                  $main::ID_PHOTO_COMMENT =>
+                	              sub { $self->imagelist->current_image->site_comment(@_) }, 
+                                  
+                                  $main::ID_PHOTO_AUTHOR =>
+                	              sub { $self->imagelist->current_image->site_author(@_) }, 
+                             },
+                frame_callbacks => { 
+                  	              $main::ID_PHOTO_NAME =>
+                                          sub {
+                                              $self->imageviewer->Refresh();
+                                          },
+                	           },
+            }
+        )
+    );
+
+    $self->image_prop_general->Show(0);
+
+        
+    $self->image_prop_exif(
+        Uploader::GUI::wxPhotoExifPanel->new( 
+            { 
+                parentwnd => $self,
+                frame_callback => sub { 
+                                      $self->imageviewer->Refresh();
+                	          },
+                accessors => {
+                	          $main::ID_EXIF_CREATE_DATE =>
+                	              sub { $self->imagelist->current_image->create_date }, 
+                	          $main::ID_EXIF_MODEL =>
+                	              sub { $self->imagelist->current_image->exif_tag('Model') }, 
+                	          $main::ID_EXIF_WIDTH =>
+                	              sub { $self->imagelist->current_image->exif_tag('ImageWidth') }, 
+                	          $main::ID_EXIF_HEIGHT =>
+                	              sub { $self->imagelist->current_image->exif_tag('ImageHeight') }, 
+                	          $main::ID_EXIF_ORIENTATION =>
+                	              sub { $self->imagelist->current_image->exif_tag('Orientation') }, 
+                	          $main::ID_EXIF_ISO =>
+                	              sub { $self->imagelist->current_image->exif_tag('ISO') }, 
+                	          $main::ID_EXIF_SHUTTER_SPEED =>
+                	              sub { $self->imagelist->current_image->exif_tag('ExposureTime') }, 
+                	          $main::ID_EXIF_APERTURE =>
+                	              sub { $self->imagelist->current_image->exif_tag('ApertureValue') }, 
+                	          $main::ID_EXIF_FOCAL_LENGTH =>
+                	              sub { $self->imagelist->current_image->exif_tag('FocalLength') }, 
+                	          $main::ID_EXIF_LENS =>
+                	              sub { $self->imagelist->current_image->exif_tag('Lens') }, 
+                             },
+            }
+        )
+    );
+    
+    $self->image_prop_exif->Show(0);
+	
+}
+
+sub init_panels {
+    my ( $self ) = @_;	
+
+    $self->htmlhome(
+        Uploader::GUI::wxHtmlWindow->new(
+            $self, -1
+        )
+    );
+    
+    $self->imageviewer(
+        Uploader::GUI::wxImageListCtrl->new( 
+            { 
+                parentwnd => $self,
+                imagelist => $self->imagelist,
+            }
+        )
+    );
+    
+    $self->_init_settings_panels;	
+}
+
+sub init_dnd_targets {
+    my ( $self ) = @_;	
+
+    $self->imageviewer->SetDropTarget( 
+        DNDImageListDropTarget->new(
+            $self->imageviewer 
+        ) 
+    );
+    $self->htmlhome->SetDropTarget( 
+        DNDImageListDropTarget->new( 
+            $self->imageviewer 
+        ) 
+    );
+
+
+    $self->tree->SetDropTarget( 
+        DNDCategoryTreeDropTarget->new(
+            $self->tree
+        )
+    );
+	
+}
+
+sub init_aui {
+    my ( $self ) = @_;	
+
+    $self->manager->AddPane
+      ( $self->create_notebook_imagelist, Wx::AuiPaneInfo->new->Name( "ImageViewer" )
+        ->CenterPane->Resizable->CloseButton(0) );
+
+    $self->manager->AddPane
+      ( $self->create_tree, Wx::AuiPaneInfo->new->Name( "categories" )->Caption(
+          sprintf("%s - %s", gettext("Piwigo categories"), wxTheApp->site_url )
+      )
+        ->Right->Position( 0 )->Resizable->CloseButton(0) );
+
+    $self->_init_aui_settings_panels;
+
+    my $tb = $self->create_toolbar;
+
+    $self->manager->AddPane
+      ( $tb, Wx::AuiPaneInfo->new->Name( "tb1" )->Caption( gettext("Tools") )
+        ->ToolbarPane->Top->Row( 1 )->LeftDockable( 0 )->RightDockable( 0 ) ) if defined $tb;
+
+    $self->manager->Update;
+
+}
+
+sub _init_aui_settings_panels {
+    my ( $self ) = @_;	
+
+    $self->manager->AddPane
+      ( $self->create_notebook_image_properties, Wx::AuiPaneInfo->new->Name( "photo_properties" )->Caption(gettext("Photo properties"))
+        ->Right->Position( 1 )->Resizable->CloseButton(0) );
+
+    $self->manager->AddPane
+      ( $self->create_notebook_global_settings, Wx::AuiPaneInfo->new->Name( "global_settings" )
+        ->Right->Position( 2 )->Resizable->CloseButton(1) );
+	
+}
+
+sub OnGlobalSettings {
+    my ( $self ) = @_;
+
+    $self->manager->GetPane("global_settings")->Show(1);
+    $self->manager->Update();    
+}
+
+sub OnChooseLanguage {
+    my ( $self ) = @_;	
+
+  my $languages = [
+             ['Dutch', wxLANGUAGE_DUTCH, ],   
+             ['English', wxLANGUAGE_ENGLISH, ],   
+             ['French', wxLANGUAGE_FRENCH, ],   
+             ['German', wxLANGUAGE_GERMAN, ],   
+             ['Italian', wxLANGUAGE_ITALIAN, ],   
+             ['Polish', wxLANGUAGE_POLISH, ],   
+             ['Portuguese', wxLANGUAGE_PORTUGUESE, ],   
+             ['Russian', wxLANGUAGE_RUSSIAN, ],   
+             ['Spanish', wxLANGUAGE_SPANISH, ],   
+  ];
+
+  my $dialog = new Wx::SingleChoiceDialog
+    ( undef, gettext( "Choose a language" ), gettext( "Choose a language" ),
+      [ map { Wx::GetTranslation( ${$_}[0] ) } @$languages ] );
+
+  if( $dialog->ShowModal() == wxID_OK ) {
+    wxTheApp->current_language(
+        $languages->[$dialog->GetSelection][1]
+    );
+    wxTheApp->init_locale();
+    $self->_refreshFrame;
+  }
+
+  $dialog->Destroy;
+
+}
+
+
+sub create_notebook_imagelist {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [300, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->htmlhome, 
+            gettext("Photo selection"),
+            '../res/images.png', 
+            wxBITMAP_TYPE_PNG,
+        ],
+        #[
+        #    $self->logwnd( $self->_create_textctrl( $book, undef, [450, 450] )),
+        #    "Log",
+        #    '../res/nb_log.png', 
+        #    wxBITMAP_TYPE_PNG,
+        #]
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    #$self->logwnd(Wx::LogTextCtrl->new( $self->logwnd ));
+    #$self->oldlogwnd( Wx::Log::SetActiveTarget( $self->logwnd ) );
+    $self->notebook($book);
+    return $book;
+}
+
+sub create_notebook_image_properties {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [450, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->image_prop_general, 
+            "Piwigo",
+        ],
+        [
+            $self->image_prop_exif, 
+            "Exif",
+        ],
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    $self->notebook_image_properties($book);
+
+    return $book;
+}
+
+sub create_notebook_global_settings {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [450, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->global_settings_panel, 
+            gettext("Global settings"),
+        ],
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    $self->notebook_global_settings($book);
+
+    return $book;
+}
+
+sub create_global_settings_panel {
+    my ( $self ) = @_;
+
+    Uploader::GUI::wxGlobalSettingsPanel->new( 
+            { 
+                parentwnd => $self,
+                accessors => {
+                	          $main::ID_GLOBAL_NAME_PREFIX =>
+                	              sub { $self->imagelist->default_name_prefix(@_) }, 
+                	          $main::ID_GLOBAL_AUTHOR =>
+                	              sub { $self->imagelist->author(@_) }, 
+                	          $main::ID_GLOBAL_THUMB_SIZE => 
+                	              sub { $self->imagelist->thumb_size(@_) }, 
+                	          $main::ID_GLOBAL_RESIZED_W =>
+                	              sub { $self->imagelist->resize_w(@_) }, 
+                	          $main::ID_GLOBAL_RESIZED_H =>
+                	              sub { $self->imagelist->resize_h(@_) },
+                	          $main::ID_GLOBAL_HIGH =>
+                	              sub { $self->imagelist->upload_high(@_)}, 
+                             },
+                frame_callbacks => { 
+                	           },
+            }
+        );
+}
+
+sub create_tree {
+    my ( $self ) = @_;
+
+    my $images = [
+        map {
+            Wx::Bitmap->new( $_, wxBITMAP_TYPE_PNG )
+        	
+        }
+        (
+          '../res/tree_pwg.png',
+          '../res/tree_folder.png',
+        )    
+    ];
+
+    $self->treeimglist( Wx::ImageList->new( 16, 16, 1 ) );
+    map {
+    	$self->treeimglist->Add($_);
+    }
+    @$images;
+
+    
+    $self->tree( 
+        Wx::TreeCtrl->new( 
+           $self, 
+           -1, 
+           wxDefaultPosition, 
+           wxDefaultSize, 
+           wxBORDER_NONE|
+           wxCLIP_CHILDREN|
+#           wxTR_MULTIPLE|
+#           wxTR_EXTENDED|
+           wxTR_HAS_BUTTONS
+#           wxTR_HIDE_ROOT   
+        ) 
+    );
+
+    $self->tree->SetImageList( $self->treeimglist );
+    $self->populate_tree_categories;
+    $self->tree ;
+}
+
+
+sub populate_tree_categories {
+    my ( $self ) = @_;
+
+    $self->populate_tree(
+        $self->tree,
+        wxTheApp->pwg->categories,
+    ) if defined wxTheApp->pwg ;
+    
+    $self->tree->ExpandAll;
+
+}
+
+#$tree_items is a list of anonymous arrays
+# [ itemLabel, undef, rootInfo, ImageIndex, SelImageIndex ] for the root
+
+# [ itemLabel, 
+#       [ childItemLabel, 
+#           [...], 
+#           childItemdata, 
+#           childImageIndex, 
+#           childSelImageIndex
+#       ], 
+#    Itemdata, 
+#    ImageIndex, 
+#    SelImageIndex 
+# ]
+
+# returns a valid itemData
+sub itemData { Wx::TreeItemData->new( $_[0] ) }
+
+sub populate_tree {
+    my ( $self, $tree, $tree_items ) = @_;
+    my $root = shift @{$tree_items};
+    $self->tree_root(
+        $tree->AddRoot( 
+            $root->[0], 
+            $root->[3], 
+            $root->[4], 
+            itemData( $root->[2] ) 
+        )
+    );
+
+  $self->populate_tree_helper( $tree, $self->tree_root, $tree_items );
+
+  $tree->Expand( $self->tree_root );
+}
+
+sub populate_tree_helper {
+  my ( $self, $tree, $parent_id, $tree_items ) = @_;
+
+  my $id;
+
+  map {
+      my $name = $_->[0];
+      eval {
+      	$name = is_utf8($name) ?  decode('UTF-8', $name) : $name;
+      };
+      if($@){
+          $name = $_->[0];
+      }
+       $id = $tree->AppendItem( 
+                                   $parent_id, 
+                                   $name,
+                                   defined($_->[3]) ? $_->[3] : 0, 
+                                   defined($_->[4]) ? $_->[4] : 0, 
+                                   itemData( $_->[2]) 
+                              );
+      $self->tree_item_default($id) if ! defined $self->tree_item_default;
+      # current item has children
+      if( ref( $_->[1] ) eq 'ARRAY' ) {
+          $self->populate_tree_helper( $tree, $id, $_->[1] );
+      } 
+  }
+  @{$tree_items};
+
+}
+
+
+
+
+sub _populate_notebook {
+    my ( $self, $book, $pages, $position ) = @_;	
+
+    my $i = 0;
+    map {
+        my $icon = Wx::Icon->new();
+        eval { $icon->LoadFile($_->[2], $_->[3]) ; }
+            if defined $_->[2];
+        my $nb_icon = Wx::Bitmap->new( $icon );
+        defined $position ?
+            $book->InsertPage($position, $_->[0],
+                    $_->[1], 1, $nb_icon )
+                          :
+            $book->AddPage($_->[0],
+                    $_->[1], 0, $nb_icon );
+
+        $i++;
+    } @$pages;
+
+}
+
+
+
+sub _InitEventHandlers {
+    my ( $self ) = @_ ;
+	
+    Wx::Event::EVT_MENU( $self, 101, \&OnAddImages );
+    Wx::Event::EVT_MENU( $self, 102, \&OnRemoveImages );
+    Wx::Event::EVT_MENU( $self, 103, \&OnUploadImages );
+    Wx::Event::EVT_MENU( $self, 104, \&OnGlobalSettings );
+    Wx::Event::EVT_MENU( $self, 105, \&OnChooseLanguage );
+    EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged );
+    EVT_TREE_ITEM_RIGHT_CLICK( $self->tree, $self->tree, \&OnTreeItemRightClick );
+    EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit );
+    EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ;
+    EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ;
+    EVT_CLOSE( $self, \&OnClose );
+
+
+    Wx::Event::EVT_MENU( $self, 1+$ID_TREE_CTX_MENU, \&OnAddCategories );
+    Wx::Event::EVT_MENU( $self, 2+$ID_TREE_CTX_MENU, \&OnRefreshCategories );
+}
+
+{
+  my $prevdir;
+  my $prevfile;
+
+  sub OnAddImages {
+    my( $self, $event ) = @_;
+    my $dialog = Wx::FileDialog->new
+      ( $self, "Select photos to send", $prevfile, $prevdir,
+        "JPEG files (*.jpg)|*.jpg|All(*.*)|*.*",
+        wxFD_OPEN|wxFD_MULTIPLE );
+
+    my $file_paths = [];
+    if( $dialog->ShowModal != wxID_CANCEL ) {
+        @$file_paths = $dialog->GetPaths;
+        $self->SetNewFiles($file_paths) ;
+    }
+    $dialog->Destroy;
+    $event->Skip;
+  }
+}
+
+sub OnRemoveImages {
+    my( $self, $event ) = @_;
+
+    
+    $self->imagelist->RemoveImageSelection;
+    $self->imageviewer->Refresh;	
+}
+
+sub SetNewFiles {
+    my ( $self, $file_paths ) = @_;
+
+    $self->ShowImageViewer();
+    $self->progressdlg( 
+        Uploader::GUI::wxImageProcessingProgressDlg->new(
+            { 
+                title => "Image processing progress information",
+                bt_label => "Cancel image processing", 
+             }
+        )        
+    );
+    $self->progressdlg->Show(1);
+    Wx::Yield();
+
+    $self->imagelist->SetNewFiles(
+        $file_paths
+    );
+
+    
+}
+
+sub OnTreeSelChanged {
+    my( $self, $event ) = @_;
+  
+    my @items = $self->tree->GetSelections;
+
+    $self->imagelist->categories(
+        [
+            map {
+                my $category = $self->tree->GetPlData( $_ );
+                $category->{id} if $category != -1;
+            }
+            @items
+        ]
+    );
+}
+
+sub OnTreeItemRightClick {
+    my( $self, $event ) = @_;
+
+    my $point = $event->GetPoint ;
+    my $ctx_mnu = Wx::Menu->new;
+    
+    map {
+    	$ctx_mnu->Append(
+    	    @$_
+    	);
+    }
+    (
+        [1+$ID_TREE_CTX_MENU, "Add new category","Add a new category to the current selected category."],
+        [2+$ID_TREE_CTX_MENU, "Refresh","Refresh category list."],
+    );
+    $self->PopupMenu($ctx_mnu, $point);
+	
+}
+
+sub OnAddCategories {
+    my ( $self, $event ) = @_;
+
+    my $item = $self->tree->GetSelection;
+
+    my $category = $self->tree->GetPlData($item);
+    my $category_id;
+    
+    $category_id = $category->{id} if 'HASH' eq ref($category) ;
+
+    my $dialog = Wx::TextEntryDialog->new( 
+        $self, 
+        gettext("Category name :"), 
+        gettext("Add new category"),
+        gettext("New category"), 
+    );
+
+    if( $dialog->ShowModal != wxID_CANCEL ) {
+    	my $name = $dialog->GetValue;
+        my ( $status, $status_msg ) = $self->pwg->AddCategories( $name, $category_id);
+        $self->_refresh_tree_categories_helper;
+    }
+    $dialog->Destroy;
+}
+
+sub OnRefreshCategories {
+    my ( $self, $event ) = @_;
+
+    $self->_refresh_tree_categories_helper;
+}
+
+sub _refresh_tree_categories_helper {
+    my ( $self ) = @_;	
+
+    my $busycursor = Wx::BusyCursor->new();
+    $self->tree->CollapseAll;
+    $self->tree->DeleteAllItems;
+    $self->imagelist->categories([]);
+    $self->pwg->RefreshCategories();
+    $self->populate_tree_categories;
+}
+
+sub OnImageViewerEndLabelEdit {
+    my( $self, $event ) = @_;
+  
+    my $image = $self->imagelist->images->[$event->GetIndex];
+    $image->site_name(
+        $event->GetLabel
+    );
+    	
+    $self->image_prop_general->SetControlValues();
+}
+
+
+sub OnImageViewerItemSelected {
+    my( $self, $event ) = @_;
+  
+    my $indx = $event->GetIndex;
+
+    # retrieve photo info for the last selected photo
+    $self->imagelist->SetCurrentImage($indx);
+    
+    $self->imagelist->image_selection(
+        $self->imageviewer->GetSelectedItems
+    );
+
+    $self->image_prop_general->SetControlValues();
+    $self->image_prop_exif->SetControlValues();
+}
+
+sub OnImageViewerKeyDown {
+    my( $self, $event ) = @_;
+
+    if(WXK_DELETE == $event->GetKeyCode){
+        $self->OnRemoveImages();
+    }	
+}
+
+sub OnUploadImages {
+    my( $self, $event ) = @_;
+
+#    eval {
+        $self->ProcessImageSelection();    
+#    };
+}
+
+# remove image from imagelist when uploaded
+sub UploadImagesViewerRefresh {
+    my ( $self ) = @_;	
+
+    my $imagelist= $self->imagelist ;
+
+    Wx::Yield();
+}
+
+sub UploadProgressMessageRefresh {
+    my ( $self, $msg ) = @_;	
+
+    $self->upload_progressdlg->processing(
+        $msg   
+    );	
+
+    Wx::Yield();
+}
+
+sub UploadProgressThumbnailRefresh {
+    my ( $self ) = @_;	
+
+    my $imagelist = $self->imagelist ;
+
+ 
+    $self->upload_progressdlg->image->SetBitmap(wxNullBitmap);
+    $self->upload_progressdlg->image->SetBitmap(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->wx_thumb_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    );
+
+    Wx::Yield();
+}
+
+sub UploadProgressBarRefresh {
+    my ( $self, $ratio ) = @_;	
+
+    $ratio = $self->imagelist->count > 1 ? 1 : $ratio; 
+    eval {
+        $self->upload_progressdlg->progress(
+            $ratio*$self->imagelist->count * ( 100/scalar @{$self->imagelist->image_selection} )
+        );
+        $self->upload_progressdlg->LogProgress();
+    };
+    croak gettext("Upload cancelled") if $@;
+
+    Wx::Yield();
+}
+
+sub SetNewFilesDisplayEndInfo {
+    my ( $self, $msg ) = @_;	
+	
+    $self->progressdlg->DisplayEndInfo($msg);
+}
+
+sub UploadDisplayEndInfo {
+    my ( $self, $msg ) = @_;	
+    
+    my $imagelist = $self->imagelist ;
+    
+    $self->upload_progressdlg->DisplayEndInfo($msg);
+}
+
+sub ShowImageViewer {
+    my ( $self ) = @_;	
+
+    if(!$self->imageviewer->IsShown){
+        my $imglistpage = [
+            [
+                $self->imageviewer, 
+                gettext("Photo selection"),
+                '../res/images.png', 
+                wxBITMAP_TYPE_PNG,
+            ],
+        ];
+        $self->notebook->DeletePage(0);
+    
+        $self->imageviewer->Show(1);
+        $self->_populate_notebook($self->notebook, $imglistpage, 0);
+        # load imagelist with loading.jpg
+    }
+	
+}
+
+
+
+
+sub SetNewFilesViewerRefresh {
+
+    my ( $self ) = @_;	
+
+    my $wximagelist = $self->imagelist->wx_thumb_imglist;
+
+    my $indx = $wximagelist->Add(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->wx_thumb_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    ) if defined $self->imagelist->current_image->wx_thumb_file;
+    
+    $self->imageviewer->Refresh(
+        $wximagelist
+    );
+
+    Wx::Yield();
+}
+
+
+
+# prepare and upload image_selection
+sub ProcessImageSelection {
+    my ( $self ) = @_;
+
+    return if !scalar @{$self->imagelist->images};
+
+    if( scalar @{$self->imagelist->categories} ){
+        return if( !defined $self->imagelist->image_selection );
+        return if( !scalar @{$self->imagelist->image_selection} );
+        
+        $self->upload_progressdlg(
+            Uploader::GUI::wxImageProcessingProgressDlg->new(
+                { 
+                    title => gettext("Image upload progress information"),
+                    bt_label => gettext("Cancel upload"), 
+                 }
+            )        
+        );
+        # modeless dialog
+        $self->upload_progressdlg->Show(1);
+        Wx::Yield();
+        eval {
+            $self->imagelist->UploadSelection;
+        };
+        if($@){
+            Wx::MessageBox( 
+                sprintf(
+                    gettext("Upload cancelled"),
+                ),
+                gettext("Piwigo upload information"),
+                wxOK | wxICON_INFORMATION, 
+            );
+        }
+    }
+    else {
+        Wx::MessageBox( 
+            sprintf(
+                gettext("Please select a valid target category"),
+            ),
+            gettext("Piwigo upload error"),
+            wxOK | wxICON_EXCLAMATION, 
+        );
+    }
+}
+
+
+sub SetNewFilesProgress {
+    my ( $self ) = @_;
+
+    my $imagelist = $self->imagelist;
+
+    $self->progressdlg->processing(
+        sprintf(
+            $imagelist->progress_msg, 
+            $imagelist->current_image->file,
+        )
+    );
+
+    eval {
+        $self->progressdlg->image->SetSize([ $imagelist->wx_thumb_size, $imagelist->wx_thumb_size]);
+        $self->progressdlg->image->SetBitmap(wxNullBitmap);
+        $self->progressdlg->image->SetBitmap(
+            Wx::Bitmap->new( 
+                $imagelist->current_image->wx_thumb_file,
+                $self->GetWxBitmapType( $imagelist->type )
+            )
+        );
+        $self->progressdlg->progress(
+            $imagelist->count * ( 100/scalar @{$imagelist->new_files} )
+        );
+        $self->progressdlg->LogProgress();
+    };
+    Wx::Yield();
+}
+
+sub OnClose {
+  my $self = shift;
+
+    # Restaure previous log wnd
+    Wx::Log::SetActiveTarget( $self->oldlogwnd );
+
+    # allways store
+    
+    wxTheApp->StoreConnectionProperties;
+    
+    $self->imagelist->Store;
+    $self->Destroy;
+}
+
+
+sub create_toolbar {
+    my( $self ) = @_;
+
+    my $tb = Wx::ToolBar->new( $self, -1, wxDefaultPosition, wxDefaultSize, wxTB_FLAT );
+    $tb->SetToolBitmapSize( wxSIZE( 32, 32 ) );
+    map {
+        my $icon1 = Wx::Icon->new();
+        eval {
+            $icon1->LoadFile($_->[2], $_->[3]);
+        };
+        my $tb_icon1 = Wx::Bitmap->new( $icon1 );
+
+        my $icon2 = Wx::Icon->new();
+        eval {
+            $icon2->LoadFile($_->[5], $_->[3]);
+        };
+        my $tb_icon2 = Wx::Bitmap->new( $icon2 );
+
+
+        $tb->AddTool( $_->[0], $_->[1], $tb_icon1, $tb_icon2, wxITEM_NORMAL, $_->[1] );
+        $tb->EnableTool( $_->[0], $_->[4]);
+    }
+    (
+        [
+            101, gettext("Add photo to selection"), '../res/tb_add.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_add.png', gettext("Add photo to selection for resizing and uploading")
+        ],
+        [
+            102, gettext("Remove photo from selection"), '../res/tb_remove.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_remove.png',gettext("Remove photo from selection. Files are not deleted ")
+        ],
+        [
+            103, gettext("Upload to Piwigo"), '../res/tb_upload.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_upload.png',gettext("Upload photos to Piwigo.")
+        ],
+        [
+            104, gettext("Global settings"), '../res/tb_settings.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_settings.png',gettext("Change global settings.")
+        ],
+        [
+            105, gettext("Language choice"), '../res/tb_i18n.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_i18n.png',gettext("Language choice")
+        ],
+    
+    );
+
+    if($@){
+    	undef $tb;
+    }
+    else{
+        $tb->Realize;
+    }
+
+    return $tb;
+}
+
+
+sub _create_textctrl {
+    my( $self, $parent, $text, $size ) = @_;
+
+    return Wx::TextCtrl->new( $parent, -1, $text, [0, 0], $size,
+                              wxNO_BORDER | wxTE_MULTILINE | wxTE_READONLY  );
+}
+
+sub create_textctrl {
+    my( $self, $text, $size ) = @_;
+
+    return $self->_create_textctrl( $self, $text, $size );
+}
+
+sub DESTROY {
+    my( $self ) = @_;
+
+    $self->manager->UnInit;
+}
+
+
+
+1;
+
+
+
+
+
+package DNDImageListDropTarget;
+
+use base qw(Wx::FileDropTarget Class::Accessor::Fast);
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          imageviewer
+          frame
+      /
+);
+
+sub new {
+  my $class = shift;
+  my $imageviewer = shift;
+  my $self = $class->SUPER::new( @_ );
+
+  $self->imageviewer($imageviewer);
+  $self->frame($imageviewer->GetParent);
+  return $self;
+}
+
+sub OnDropFiles {
+  my( $self, $x, $y, $files ) = @_;
+
+  $self->frame->SetNewFiles($files) ;
+}
+
+1;
+
+
+package DNDCategoryTreeDropTarget;
+
+use base qw(Wx::TextDropTarget Class::Accessor::Fast);
+use Data::Dumper;
+use Wx qw/
+              wxDragNone
+              wxDragCopy
+              wxDragMove
+         /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          tree
+          frame
+      /
+);
+
+sub new {
+  my ( $class, $tree ) = @_;
+  my $self = $class->SUPER::new();
+
+  $self->tree($tree);
+  $self->frame($tree->GetParent);
+  return $self;
+}
+
+
+
+sub OnDropText {
+  my( $self, $x, $y, $textdata ) = @_;
+
+  # must be $VAR1 because $textdata is the result of Data::Dumper
+  my $VAR1;
+  eval $textdata;
+  eval {
+      if(scalar @$VAR1){
+      	   my @items;
+      	   if(scalar @items < 2) {
+               my ($dropItem, $flag) = $self->tree->HitTest([$x, $y]);
+      	   	push @items, $dropItem;
+      	   }
+      	   else {
+      	   	@items = $self->tree->GetSelections;
+      	   }
+      	   
+      	   # remove root item which is not a valid category
+      	   @items = grep { $self->tree->GetPlData( $_ ) != -1 } @items;
+      	   
+           $self->frame->imagelist->categories(
+               [
+                   map {
+                       $self->tree->GetPlData( $_ )->{id};
+                   }
+                   @items
+               ]
+           );
+           
+      	   $self->frame->imagelist->image_selection($VAR1);
+      	   $self->frame->ProcessImageSelection ;
+      }	
+  };
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxGlobalSettingsPanel.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxGlobalSettingsPanel.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxGlobalSettingsPanel.pm	(revision 3291)
@@ -0,0 +1,131 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxGlobalSettingsPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+
+use base qw/Wx::Panel Uploader::Object2/;
+use Wx::Perl::TextValidator;
+
+use Wx::Event qw/
+                    EVT_TEXT
+                    EVT_RADIOBOX
+                /;
+
+
+__PACKAGE__->mk_accessors(     
+    qw/
+        accessors
+        frame_callback
+      /
+);
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+
+    
+    $self->accessors( $params->{accessors} );
+    $self->frame_callbacks(
+        $params->{frame_callbacks}
+    );
+    
+    $self->Initialize;
+      
+    $self;    
+}
+
+sub Initialize {
+    my ( $self ) = @_;	
+
+    # load controls
+    &main::GlobalSettings($self, 1);
+
+    $self->_set_validators;    
+    $self->SetControlValues;
+    $self->_initEventHandlers();
+}
+
+sub _set_validators {
+    my ( $self ) = @_;	
+
+    map {
+        my $numval = Wx::Perl::TextValidator->new( '\d' );
+        $self->FindWindow($_)->SetValidator(
+            $numval
+        );    	
+    }
+    (
+        $main::ID_GLOBAL_THUMB_SIZE,
+        $main::ID_GLOBAL_RESIZED_W,
+        $main::ID_GLOBAL_RESIZED_H,
+    );
+}
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+   
+    map {
+        my $ctrl = $self->FindWindow($_);
+        if('Wx::TextCtrl' eq ref $ctrl){
+            EVT_TEXT($self, $ctrl, sub { OnControlChanged(@_) });
+        }
+        elsif('Wx::RadioBox' eq ref $ctrl){
+            EVT_RADIOBOX($self, $ctrl, sub { OnControlChanged(@_) });
+        }
+    }
+    keys %{$self->accessors};	
+
+}
+
+sub OnControlChanged {
+    my ( $self, $event ) = @_;
+    
+    my $control_id = $event->GetId ;
+
+    $self->GetControlValue(
+        $control_id
+    );
+    
+    
+    my $frame_callback = $self->frame_callbacks->{$control_id};
+
+    eval{
+        $frame_callback->() if defined $frame_callback;
+    };
+}
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxHtmlWindow.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxHtmlWindow.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxHtmlWindow.pm	(revision 3291)
@@ -0,0 +1,46 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxHtmlWindow;
+
+use strict;
+use Wx::Html;
+use base qw(Wx::HtmlWindow);
+
+sub new {
+  my $class = shift;
+  my $this = $class->SUPER::new( @_ );
+
+  if( -e '../res/intro.html' ){
+      $this->LoadPage( 
+          '../res/intro.html' 
+      );
+  }
+
+  return $this;
+}
+
+sub OnLinkClicked {
+  my( $this, $link ) = @_;
+
+  Wx::LogMessage( 'Link clicked: href="%s"', $link->GetHref() );
+  $this->SUPER::OnLinkClicked( $link );
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageGrid.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageGrid.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageGrid.pm	(revision 3291)
@@ -0,0 +1,85 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageGrid;
+
+use strict;
+use base qw(Wx::Grid);
+
+sub new {
+  my $class = shift;
+  my $this = $class->SUPER::new( $_[0], -1 );
+
+  $this->CreateGrid( 3, 7 );
+  # set every cell read-only
+  for my $x ( 1 .. 7 ) {
+    for my $y ( 1 .. 3 ) {
+      $this->SetReadOnly( $y, $x, 1 ); # rows, cols
+    }
+  }
+$this->SetDefaultColSize(120);
+$this->SetDefaultRowSize(120);
+
+
+  $this->SetCellValue( 1, 5, "SoMe TeXt!" );
+  $this->SetCellRenderer( 1, 5, Wx::DemoModules::wxGridCER::CustomRenderer->new );
+  $this->SetReadOnly( 1, 5, 0 );
+
+  return $this;
+}
+
+sub add_to_tags { 'controls/grid' }
+sub title { 'Custom editors and renderers' }
+
+package Wx::DemoModules::wxGridCER::CustomRenderer;
+
+use strict;
+use base 'Wx::PlGridCellRenderer';
+use Wx qw/
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_GIF
+             wxBITMAP_TYPE_PNG
+             wxBLACK_PEN 
+             wxWHITE_BRUSH 
+             wxSYS_DEFAULT_GUI_FONT
+         /;
+sub Draw {
+  my( $self, $grid, $attr, $dc, $rect, $row, $col, $sel ) = ( shift, @_ );
+
+  $self->SUPER::Draw( @_ );
+
+  $dc->SetPen( wxBLACK_PEN );
+  $dc->SetBrush( wxWHITE_BRUSH );
+  $dc->SetFont(Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
+#  $dc->DrawEllipse( $rect->x, $rect->y, $rect->width, $rect->height );
+#  $dc->DrawText( $grid->GetCellValue( $row, $col ), $rect->x, $rect->y );
+    my $img = Wx::Bitmap->new( "J:/uploader/test10066.jpg", wxBITMAP_TYPE_JPEG );
+  $dc->DrawBitmap( $img, 10+$rect->x, 10+$rect->y, 0 );
+
+
+}
+
+sub Clone {
+  my $self = shift;
+
+  return $self->new;
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageListCtrl.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageListCtrl.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageListCtrl.pm	(revision 3291)
@@ -0,0 +1,137 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageListCtrl;
+use strict;
+use Wx;
+use Wx::DND;
+use Wx qw/
+             wxDefaultPosition
+             wxDefaultSize
+             wxLC_LIST
+             wxNO_BORDER
+             wxLC_EDIT_LABELS
+             wxLC_ICON
+             wxIMAGE_LIST_NORMAL
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_PNG
+             wxBLACK
+             wxLC_VIRTUAL
+             wxLC_REPORT
+             wxBORDER_THEME
+             wxLIST_HITTEST_ONITEM
+             wxLIST_NEXT_ALL
+             wxLIST_STATE_SELECTED 
+         /;
+use Wx::Event qw/
+                    EVT_LIST_BEGIN_DRAG
+                    EVT_LIST_ITEM_SELECTED
+                /;
+         
+use base qw/Wx::ListCtrl Class::Accessor::Fast/;
+__PACKAGE__->mk_accessors( 
+    qw/
+          prevItemCount
+          imagenames
+          imagelist
+      / 
+);
+use Data::Dumper;
+sub new {
+  my( $class, $params ) = @_;
+  my( $self ) = $class->SUPER::new(
+                                       $params->{parentwnd},
+                                       -1,
+                                       wxDefaultPosition,
+                                       wxDefaultSize,
+                                       wxNO_BORDER|
+                                       wxLC_ICON|
+                                       wxLC_EDIT_LABELS
+                                  );
+
+  $self->imagelist(
+      $params->{imagelist}
+  );
+
+                                  
+  $self->prevItemCount(-1);
+
+  EVT_LIST_BEGIN_DRAG( $self, $self, \&OnBeginDrag);
+
+
+  $self;
+}
+
+sub OnBeginDrag {
+  my( $self, $event ) = @_;
+
+
+  my $data = Wx::TextDataObject->new( 
+      Dumper $self->GetSelectedItems 
+  );
+  my $source = Wx::DropSource->new( $self );
+  $source->SetData( $data );
+
+  $source->DoDragDrop( 1 );
+}
+
+
+sub GetSelectedItems {
+    my ( $self ) = @_;	
+
+  # find selected items
+  my $item = -1;
+  my $items = [];
+  while(1) {
+      $item = $self->GetNextItem(
+          $item,      
+          wxLIST_NEXT_ALL,
+          wxLIST_STATE_SELECTED
+      );
+      last if(-1 == $item);
+      
+      # item is selected	
+      push @$items, $item
+  }
+  
+  $items;
+}
+
+
+
+sub Refresh {
+    my ( $self, $wximagelist ) = @_;	
+
+   $self->SetImageList( $wximagelist, wxIMAGE_LIST_NORMAL ) if defined $wximagelist ;
+   $self->DeleteAllItems;
+   eval {
+       for( my $i = 0 ; $i < $self->GetImageList(wxIMAGE_LIST_NORMAL)->GetImageCount ; $i++){
+            my $indx = $self->InsertImageStringItem(
+                $i,
+                $self->imagelist->images->[$i]->site_name,
+                $i,
+            );
+       }   
+   };
+}
+
+
+
+1;
+
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageProcessingProgressDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageProcessingProgressDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageProcessingProgressDlg.pm	(revision 3291)
@@ -0,0 +1,125 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageProcessingProgressDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           gauge
+           progress
+           processing
+           txtprocessing
+           image
+           cancelled
+      / 
+);
+use Carp;
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    eval {
+      &main::ProcessingProgress($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PROGRESS_OK) );
+    $self->gauge( $self->FindWindow($main::ID_PROGRESS_GAUGE) );
+    $self->txtprocessing( $self->FindWindow($main::ID_PROGRESS_TXT) );
+    $self->image( $self->FindWindow($main::ID_STATICBITMAP) );
+    $self->gauge->SetForegroundColour(wxGREEN);
+    };
+
+    $self->btok->SetLabel(
+        $params->{bt_label}||'Cancel'
+    );
+
+    if($@){
+        Wx::LogMessage("Error during dialogbox initialization");
+    }
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PROGRESS_OK, \&OnOK );
+    
+	
+}
+
+# Update progress information
+sub LogProgress {
+    my ( $self ) = @_;
+    
+    croak "Cancelled by user\n" if $self->cancelled;    
+   
+    $self->txtprocessing->SetLabel(
+        $self->processing
+    );
+    $self->gauge->SetValue(
+        $self->progress
+    );
+}
+
+sub DisplayEndInfo {
+    my ( $self, $msg ) = @_;
+
+    $self->txtprocessing->SetLabel(
+        $msg
+    );
+    $self->image->Show(0);
+    $self->gauge->Show(0);
+
+    $self->btok->SetLabel(
+        'Close'
+    );
+	
+}
+
+sub OnOK {
+    my ( $self, $event ) = @_;
+    
+    $self->cancelled(1);
+    $self->Destroy;
+ 
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageView.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageView.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxImageView.pm	(revision 3291)
@@ -0,0 +1,49 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageView;
+use Wx qw/wxDefaultPosition wxDefaultSize wxLC_ICON wxIMAGE_LIST_NORMAL wxLC_LIST
+                                       wxSUNKEN_BORDER wxLC_EDIT_LABELS/;
+use base qw/Wx::ListCtrl/;
+use strict;
+
+sub new {
+    my ( $class, $parentwnd, $images ) = @_;
+
+
+    my $self = $class->SUPER::new( $parentwnd, -1, wxDefaultPosition, wxDefaultSize, wxLC_LIST|
+                                       wxSUNKEN_BORDER|wxLC_EDIT_LABELS );
+    $self->SetSingleStyle( wxLC_ICON );
+    $self->Initialize($images);
+    
+    return $self;
+}
+
+sub Initialize {
+    my ( $self, $images ) = @_;	
+
+    $self->AssignImageList( $images, wxIMAGE_LIST_NORMAL );
+
+    for( my $i = 0 ; $i < $images->GetImageCount ; $i++ ) {
+        my $idx = $self->InsertStringImageItem( $i, "Item $i", $i % 5 );
+        $self->SetItemData( $idx, $i );
+   }
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxLoginDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxLoginDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxLoginDlg.pm	(revision 3291)
@@ -0,0 +1,126 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxLoginDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           url
+           username
+           password
+      / 
+);
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::Login($self, 1);
+    
+    $self->url(
+        $params->{site_url}
+    );
+
+    $self->username(
+        $params->{site_username}
+    );
+
+    $self->password(
+        $params->{site_password}
+    );
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PWG_OK) );
+
+    $self->FindWindow($main::ID_PWG_URL)->SetValue(
+        $self->url->()
+    );
+    
+    
+    $self->FindWindow($main::ID_PWG_USERNAME)->SetValue(
+        $self->username->() 
+    );
+    
+    $self->FindWindow($main::ID_PWG_PASSWORD)->SetValue( 
+        $self->password->() 
+    );
+      
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PWG_OK, \&OnLoginOK );
+    EVT_BUTTON( $self, $main::ID_PWG_CANCEL, \&OnLoginCancel );
+    
+	
+}
+
+
+
+sub OnLoginOK {
+    my ( $self, $event ) = @_;
+    
+    $self->url->(
+        $self->FindWindow($main::ID_PWG_URL)->GetValue    
+    );
+
+    $self->username->(
+        $self->FindWindow($main::ID_PWG_USERNAME)->GetValue
+    );
+    
+    $self->password->(
+        $self->FindWindow($main::ID_PWG_PASSWORD)->GetValue
+    );
+
+    $self->EndModal(1);
+}
+
+sub OnLoginCancel {
+    my ( $self, $event ) = @_;
+    
+    
+    $self->EndModal(0);
+ 
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxPhotoExifPanel.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxPhotoExifPanel.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxPhotoExifPanel.pm	(revision 3291)
@@ -0,0 +1,72 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxPhotoExifPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+#use base qw/Wx::Panel Class::Accessor::Fast/;
+
+use base qw/Wx::Panel Uploader::Object2/;
+
+use Wx::Event qw/
+                    EVT_BUTTON
+                /;
+
+
+    __PACKAGE__->mk_accessors(     
+        qw/accessors/
+    );
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+
+    
+    $self->accessors( $params->{accessors} );
+    
+    # load controls
+    &main::PhotoExif($self, 1);
+    
+
+    
+      
+    $self;    
+}
+
+
+
+
+
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxPhotoPropertiesPanel.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxPhotoPropertiesPanel.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/GUI/wxPhotoPropertiesPanel.pm	(revision 3291)
@@ -0,0 +1,98 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxPhotoPropertiesPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+
+use base qw/Wx::Panel Uploader::Object2/;
+
+use Wx::Event qw/
+                    EVT_TEXT
+                /;
+
+
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+
+    
+    $self->accessors( $params->{accessors} );
+    $self->frame_callbacks(
+        $params->{frame_callbacks}
+    );
+    
+    # load controls
+    &main::PhotoProperties($self, 1);
+ 
+
+    $self->_initEventHandlers();
+    
+      
+    $self;    
+}
+
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+       
+    map {
+        my $ctrl = $self->FindWindow($_);
+        EVT_TEXT($self, $ctrl, sub { OnTextChanged(@_) });
+    }
+    keys %{$self->accessors};	
+}
+
+
+
+sub OnTextChanged {
+    my ( $self, $event ) = @_;
+    
+    my $control_id = $event->GetId ;
+
+    $self->accessors->{$control_id}->(
+        $event->GetString
+    );
+        
+    my $frame_callback = $self->frame_callbacks->{$control_id};
+
+    eval{
+        $frame_callback->();
+    };
+}
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/Image.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/Image.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/Image.pm	(revision 3291)
@@ -0,0 +1,64 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Image;
+use strict;
+use base qw/Uploader::Object/;
+
+__PACKAGE__->mk_accessors(
+    qw/
+        file
+        wx_thumb_file
+        preview_file
+        site_high_file
+        site_name
+        site_resized_file
+        site_thumb_file
+        site_author
+        site_comment
+        exif_metadata
+        add_rank
+        site_categories
+        site_tags
+    /
+);
+
+sub Init {
+    my ( $self ) = @_;
+}
+
+sub exif_tag {
+    my ( $self, $tag ) = @_;
+	
+    my $exif = $self->exif_metadata ;
+    
+    $exif->{$tag};	
+}
+
+sub create_date {
+    my ( $self ) = @_;
+    
+    my $exif = $self->exif_metadata ;
+    
+    $exif->{CreateDate};	
+}
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/ImageList.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/ImageList.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/ImageList.pm	(revision 3291)
@@ -0,0 +1,991 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::ImageList;
+use strict;
+use Carp;
+use base qw/Uploader::Object/;
+use Image::ExifTool qw(:Public);
+use Image::Magick;
+use File::Spec;
+use Uploader::Image;
+use Data::Dumper;
+use Storable;
+# this class implements a collection of image files with associated data
+$|=1;
+__PACKAGE__->mk_accessors( 
+    qw/
+       	        thumb_size
+                preview_ratio
+                categories
+      	        type
+      	        filter
+      	        blur
+      	        quality
+      	        prefix
+      	        author
+      	        count
+                resize_w
+                resize_h
+                new_files
+                storable_file
+       	        wx_thumb_size
+                current_image
+                images
+                image_selection
+                exif_metadata
+                wx_thumb_imglist
+                wx_thumb_dir
+                preview_dir
+                site_resized_dir
+                site_thumb_dir
+                userdata_dir
+                progress_msg
+                last_error_msg
+            	default_name_prefix
+                SetNewFilesViewerRefreshCallback
+                SetNewFilesProgressCallback
+                SetNewFilesDisplayEndInfoCallback
+                UploadImagesViewerCallback
+                progress_thumbnail_refresh
+                progress_msg_refresh
+                progressbar_refresh
+                progress_endinfo_refresh
+                ResizeCallback
+                upload_rejects
+                pwg
+                upload_high
+     /
+);
+
+
+sub Init {
+    my ( $self ) = @_;	
+}
+
+
+
+# save exif preview image if available
+# otherwise create a preview image
+sub _write_preview_image {
+    my ( $self, $imagedata ) = @_;
+
+
+    # If PreviewImage is available, we use it
+    if(defined $imagedata ) {
+    	eval {
+            open PREVIEW_FILE, ">", $self->current_image->preview_file ;
+            binmode PREVIEW_FILE;
+            print PREVIEW_FILE $$imagedata;
+            close PREVIEW_FILE;
+        };
+        $self->last_error_msg($@) if $@;
+    }
+    
+}
+
+# Rotate exif preview if needed
+sub _rotate_image {
+    my ( $self, $file ) = @_;	
+
+}
+
+sub _set_exif_tag {
+    my ( $self, $file, $tag, $newValue ) = @_;	
+
+  my $options = {};
+  # Create a new Image::ExifTool object
+  my $exifTool = new Image::ExifTool;
+
+  # Extract meta information from an image
+  $exifTool->ExtractInfo($file, $options);
+
+  # Set a new value for a tag
+  $exifTool->SetNewValue($tag, $newValue);
+
+  # Write new meta information to a file
+  $exifTool->WriteInfo($file);
+
+}
+
+sub _set_current_image_filepaths {
+    my ( $self ) = @_;
+
+    my ( $vol, $dir, $file ) = File::Spec->splitpath(
+        $self->current_image->file
+    );
+
+    my ( $filename, $ext ) = split /\./, $file ;
+
+    $self->current_image->wx_thumb_file( 
+        File::Spec->catfile(
+            $self->wx_thumb_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+    $self->current_image->preview_file( 
+        File::Spec->catfile(
+            $self->preview_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+
+    $self->current_image->site_thumb_file( 
+        File::Spec->catfile(
+            $self->site_thumb_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+	
+}
+
+sub SetCurrentImage {
+    my ( $self, $indx ) = @_;	
+
+    $self->current_image(
+        $self->images->[$indx]
+    );
+}
+
+
+sub SetNewFiles {
+    my ( $self, $files ) = @_;
+
+    $self->new_files( $files );
+
+    # if some files have been previously selected 
+    my $i = scalar @{$self->images};
+    my $count = 0;
+    $self->count($count);
+    my $errors = 0;
+    map {
+        # read exif metadata
+        my $info;
+
+
+        eval {
+            $info = ImageInfo( $_ );
+        };
+
+        $info = {} if($@);
+
+       	$self->_add_image($_, $info, $i);	
+        $self->SetCurrentImage($i);
+    	$self->_set_current_image_filepaths();
+
+        
+        # an exif preview is available. we use it
+        if(defined $info->{PreviewImage}){
+            printf("use preview\n");
+            $self->_write_preview_image( $info->{PreviewImage} );
+        }
+        # have to create a preview file
+        else {
+            printf("have to create a preview\n");
+            eval {
+                if(!$self->CreateGUIPreview()){
+            printf("use preview callback\n");
+                    # use method provided by the caller
+                    # source, target, type, ratio
+                    $self->ResizeCallback->(
+                        $self->current_image->file,
+                        $self->current_image->preview_file,
+                        $self->type,
+                        $self->preview_ratio,
+                        undef,
+                        undef,
+                        $self->quality,
+                    );
+                }
+            };# create a preview file
+        }    
+
+        $self->RotateImage(
+            $self->current_image->preview_file,
+        );
+
+        $self->_set_exif_tag(
+            $self->current_image->preview_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+
+        # Now, we should have a valid preview image.
+        # try to thumbnail it
+        eval {
+            printf("create gui thumbnail\n");
+            # use the preview image to create a gui display thumbnail
+            $self->CreateGUIThumbnail();
+        };
+        # ok
+        if(!$@){
+            $self->progress_msg("Thumbnail and preview created for %s");
+            $i++;
+            $count++;
+            $self->count($count);
+        }
+        else {
+            $self->progress_msg("An error has occured when processing %s\n$@");
+            # remove from list
+            splice @{$self->images}, $i, 1;
+            $errors++;
+        }
+        
+        $self->SetNewFilesProgressCallback->();
+        $self->SetNewFilesViewerRefreshCallback->();
+
+    }
+    @{$files};
+    $self->SetNewFilesDisplayEndInfoCallback->(
+        sprintf(
+            "%s images added to the selection\n\n%s errors",
+            $self->count,
+            $errors
+            
+        )
+    );
+    
+    $self->Store;
+    
+}
+
+# key is file path
+sub _add_image {
+    my ( $self, $file, $info, $i ) = @_;	
+
+    my $image = Uploader::Image->new(
+        {
+            file              => $_,
+            site_name         => sprintf(
+        	                     "%s %s", 
+        	                     $self->default_name_prefix, 
+        	                     $i,
+        	                 ),
+            site_author       => $self->author,
+            exif_metadata     => $self->_select_exif_data($info),
+            add_rank          => $i,
+            site_categories   => [],
+            site_tags         => [],
+            site_high_file    => $_,
+        }
+    );
+
+    # append to image list
+    $self->images->[$i] = $image ;
+
+}
+
+
+sub RemoveImageSelection {
+    my ( $self ) = @_;
+    
+    return if (! scalar @{$self->images} );
+    return if (! defined $self->image_selection );
+    
+    # higher first, to keep same indexes during remove
+    my @images = reverse @{$self->image_selection};     
+    map {
+        my $image = $self->images->[$_]->file;
+        splice @{$self->images}, $_, 1 ;
+        $self->wx_thumb_imglist->Remove($_);
+        shift @images;
+    }
+    @images;
+    
+    # clear image selection
+    $self->image_selection([]);
+}
+
+# used for display in GUI. has to fit a square box ( wxImageList )
+sub CreateGUIThumbnail {
+    my ( $self ) = @_;
+
+    return 1 if( -e $self->current_image->wx_thumb_file );
+    my $rval = 0;
+print "CreateGUIThumbnail ", $self->current_image->wx_thumb_file, "\n";
+    my $image = new Image::Magick;
+
+    my $size = $self->wx_thumb_size;
+
+    my $status = $image->Set(size=>sprintf("%sx%s", 3*$size, 3*$size));
+    warn "$status" if $status ;
+
+    $status = $image->ReadImage(
+        $self->current_image->preview_file
+    );
+    warn "$status" if $status;
+    return $rval if $status;
+
+    $status = $image->Thumbnail(
+        geometry=>sprintf("%s%s>", $size*$size, '@')
+    );
+    warn "$status" if $status;
+    return $rval if $status;
+
+    $status = $image->Set(background=>"white");
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    $image->Extent(
+        geometry=>sprintf("%sx%s", $size, $size),
+        gravity=>'center',
+    );
+
+    $image->Set(quality=>100);
+
+    $status = $image->Strip();
+    warn "$status" if $status ;
+    
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->wx_thumb_file,
+        )
+    );
+
+    undef $image;
+    
+    $rval = 1;
+    
+    return $rval;
+}
+
+
+sub CreateGUIPreview {
+    my ( $self ) = @_;
+
+    return 1 if( -e $self->current_image->preview_file );
+    
+    my $rval = 1;
+
+    my $image = Image::Magick->new();
+
+    my $ratio = $self->preview_ratio;
+
+
+    my $status = $image->Read(
+        sprintf(
+            "'%s'",
+            $self->current_image->file,
+        )
+    );
+    warn "$status ", $self->current_image->file, "\n" if $status ;
+    return 0 if $status;
+
+    $status = $image->Thumbnail(
+        geometry=>sprintf(
+                              "%s%%x%s%%>", 
+                              $ratio, 
+                              $ratio
+                         )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+
+    $status = $image->Set(background=>"white");
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+
+    $image->Set(quality=>$self->quality);
+
+
+    $status = $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->preview_file,
+        )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+    
+    undef $image;
+
+    return $rval;
+}
+
+
+sub CreateResized {
+    my ( $self ) = @_;
+    
+    my $rval = 1 ;
+    return $rval if( -e $self->current_image->site_resized_file );
+
+printf(
+    "Create resized %s\n",
+    $self->current_image->file,
+);     
+
+    my $image = new Image::Magick;
+
+    my $status = $image->ReadImage(
+        $self->current_image->file
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+    my $w = $image->Get('width');
+    my $h = $image->Get('height');
+        
+    # should calculate the aspect ratio
+    my $resize_w = $self->resize_w;
+    my $resize_h = $self->resize_h;
+        
+    if( $w < $h ){
+        my $resize_w_ = $resize_w;
+        $resize_w = $resize_h;
+        $resize_h = $resize_w_;
+    }
+    
+    $status = $image->Resize(
+        geometry => sprintf("%sx%s>", $resize_w, $resize_h), 
+        filter => sprintf("%s", $self->filter), 
+        blur => $self->blur
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    # exif from original image
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+        printf(
+            "Rotate %s\n",
+            $1
+        );
+    
+        $image->Rotate( degrees=>$1 );	
+    }
+
+    $status = $image->Set(quality=>$self->quality);
+    warn "$status" if $status ;
+
+    $status = $image->Set(interlace=>'Line');
+    warn "$status" if $status ;
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->site_resized_file,
+        )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+    
+    undef $image;
+
+   
+    $rval = 0 if $status;
+
+    return $rval;
+}
+
+sub CreateThumbnail {
+    my ( $self ) = @_;
+    
+    return 1 if( -e $self->current_image->site_thumb_file );
+    
+    my $rval = 1;
+
+    my $image = new Image::Magick;
+
+    my $status = $image->ReadImage(
+        $self->current_image->site_resized_file
+    );
+    warn "$status" if $status ;
+
+    
+    $status = $image->Resize(
+        geometry => sprintf(
+                                "%sx%s>", 
+                                $self->thumb_size, 
+                                $self->thumb_size
+                           ),
+    );
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    $status = $image->Set(quality=>$self->quality);
+    warn "$status" if $status ;
+
+    $status = $image->Strip();
+    warn "$status" if $status ;
+
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->site_thumb_file,
+        )
+    );
+    
+    undef $image;
+
+
+    $rval = 0 if $status;
+
+    return $rval;
+}
+
+
+
+sub _select_exif_data {
+    my ( $self, $exif ) = @_;
+
+    return {
+        map {
+    	    $_ => $exif->{$_},
+        }
+        qw/
+            CreateDate
+            ImageWidth
+            ImageHeight
+            Orientation
+            DateTimeOriginal
+            ISO
+            ExposureTime
+            ApertureValue
+            FocalLength
+            Lens
+            Exposure
+            Make
+            Model
+        /
+    };    
+}
+
+sub Store {
+    my ( $self ) = @_;
+    
+    my $data = $self->get_storable(
+        [ 
+            qw/
+                images
+       	        thumb_size
+                preview_ratio
+      	        type
+      	        filter
+      	        blur
+      	        quality
+      	        prefix
+      	        author
+      	        count
+                resize_w
+                resize_h
+                new_files
+                storable_file
+       	        wx_thumb_size
+                current_image
+                images
+                exif_metadata
+                wx_thumb_dir
+                preview_dir
+                site_resized_dir
+                site_thumb_dir
+                userdata_dir
+                progress_msg
+            	default_name_prefix
+            	upload_high
+            /
+        ] 
+    
+    );
+    eval {
+        store $data, $self->storable_file;
+    };
+    if($@){
+        print $@, "\n";	
+    }
+}
+
+
+
+sub UploadSelection {
+    my ( $self ) = @_;	
+
+    my $viewer_callback = $self->UploadImagesViewerCallback ;
+
+
+    $self->upload_rejects(
+        []
+    );
+
+    my $count = 1;
+    my $msg;
+    $self->count(
+        $count
+    );
+    my $uploaded = 0;
+    my $rejected = 0;
+    my $time_begin = time;
+    my $last_error;
+    map {
+        # current image object    	
+    	$self->current_image(
+    	    $self->images->[$_]
+    	);
+
+        my ( $vol, $dir, $file ) = File::Spec->splitpath(
+            $self->current_image->file
+        );
+        
+        my $site_name = $self->current_image->site_name;
+    
+        my ( $filename, $ext ) = split /\./, $file ;
+
+        # lately defined to make sure we have the last global properties ( resize_w, resize_h )
+        $self->current_image->site_resized_file( 
+            File::Spec->catfile(
+                $self->site_resized_dir,
+                sprintf(
+                    "%s_%sx%s.%s",
+                    $filename,
+                    $self->resize_w,
+                    $self->resize_h,
+                    $self->type,
+                )
+            )
+        );
+        
+        $msg = sprintf(
+            "Preparing resized image for %s - %s",
+            $site_name,
+            $file,
+        ); 
+
+    	eval {
+            # set current image thumbnail
+            $self->progress_thumbnail_refresh->();
+
+            $self->progress_msg_refresh->($msg);
+    
+      	    # update upload progress dialog
+            $self->progressbar_refresh->(0.25);
+        };
+        # user cancelled : dialog box is destroyed
+        croak "Upload cancelled." if $@ ;
+
+    	eval {
+            if(!$self->CreateResized()){
+                printf("CreateResized failed %s. Use ResizeCallback\n", $@);
+                # use method provided by the caller
+                # source, target, type, ratio, width, $height
+                $self->ResizeCallback->(
+                    $self->current_image->file,
+                    $self->current_image->site_resized_file,
+                    $self->type,
+                    undef,
+                    $self->resize_w,
+                    $self->resize_h,
+                    $self->quality,
+                );
+                
+                $self->RotateImage(
+                    $self->current_image->site_resized_file,
+                );
+            }
+        };
+
+        $self->_set_exif_tag(
+            $self->current_image->site_resized_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+
+        # if upload high, rotate a copy of original file
+        if($self->upload_high){
+            $self->CreateHigh();
+        }
+
+
+
+
+        $msg = sprintf(
+            "Preparing thumbnail for %s - %s",
+            $site_name,
+            $file,
+        );
+
+    	eval {
+            $self->progress_msg_refresh->($msg);
+        };
+        croak "Upload cancelled." if $@ ;
+
+    	eval {
+            $self->CreateThumbnail();
+        };
+
+        if($@){
+            $msg = sprintf(
+                "An error has occured %s - %s\n$@",
+                $site_name,
+                $file
+            );
+        }
+        else{
+            $msg = sprintf(
+                "Uploading %s - %s",
+                $site_name,
+                $file
+            );
+        }
+    	eval {
+            $self->progress_msg_refresh->($msg);
+       	    $self->progressbar_refresh->(0.50);
+        };
+        croak "Upload cancelled." if $@ ;
+
+        # photo metadata
+        $self->_prepare_upload_properties();    	
+        my ( $status, $status_msg ) = $self->pwg->UploadImage();
+
+        if ( $status ){
+            $msg = sprintf(
+                "%s : %s upload succcessful.",
+                $site_name,
+                $file
+            );
+            $uploaded++;
+        } else {
+            $msg = sprintf(
+                "An error has occured.\n%s : %s upload is cancelled.\n$status_msg",
+                $site_name,
+                $file
+            );
+            $rejected++;
+            $last_error = $status_msg;
+        }	
+        
+        $count++;
+        $self->count(
+            $count
+        );
+    	# update upload progress dialog
+    	eval {
+            $self->progress_msg_refresh->($msg);
+       	    $self->progressbar_refresh->(1);
+        };
+        croak "Upload cancelled." if $@ ;
+        
+    }
+    @{$self->image_selection} if defined 
+        $self->image_selection;
+
+    my $time_end = time;
+    my $duration = $time_end - $time_begin;
+    $msg = sprintf(
+        "%s images processed\n\n%s images uploaded\n\n%s images in errors and not uploaded - $last_error\n\nDuration : %s seconds",
+        $self->count - 1,
+        $uploaded,
+        $rejected,
+        $duration,
+    );
+    $self->progress_endinfo_refresh->($msg);
+}
+
+# if we need to rotate
+sub CreateHigh {
+    my ( $self ) = @_;
+
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+
+        my ( $vol, $dir, $file ) = File::Spec->splitpath(
+            $self->current_image->file
+        );
+    
+        my ( $filename, $ext ) = split /\./, $file ;
+    
+        # high_file is a copy of original
+        $self->current_image->site_high_file( 
+            File::Spec->catfile(
+                $self->site_resized_dir,
+                sprintf(
+                    "%s_high.%s",
+                    $filename,
+                    $self->type,
+                )
+            )
+        );
+
+        my $image = Image::Magick->new();
+        # we read original
+        my $status = $image->Read(
+            $self->current_image->file
+        );
+        warn "$status ", $self->current_image->file, "\n" if $status ;
+        return 0 if $status;
+
+        $image->Rotate( degrees=>$1 );	
+        
+        $image->Write(
+            filename=>$self->current_image->site_high_file
+        );
+        warn "$status ", $self->current_image->site_high_file, "\n" if $status ;
+        return 0 if $status;
+        
+        undef $image;
+
+        $self->_set_exif_tag(
+            $self->current_image->site_high_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+
+        # Now all images that need to be rotated are done. Update exif
+        $self->current_image->exif_metadata->{Orientation} = 'Horizontal (normal)';
+    }
+    else{
+        # high file is the original file
+        $self->current_image->site_high_file(
+            $self->current_image->file
+        );
+    }
+
+    return 1;
+}
+
+sub _prepare_upload_properties {
+    my ( $self ) = @_;
+    
+    $self->pwg->upload_high(
+        $self->upload_high
+    );
+
+    $self->pwg->site_high_file(
+        $self->current_image->site_high_file
+    );
+
+    $self->pwg->site_resized_file(
+        $self->current_image->site_resized_file
+    );
+
+    $self->pwg->site_thumb_file(
+        $self->current_image->site_thumb_file
+    );
+
+    $self->pwg->site_author(
+        $self->current_image->site_author
+    );
+
+    $self->pwg->site_comment(
+        $self->current_image->site_comment
+    );
+
+    $self->pwg->site_image_name(
+        $self->current_image->site_name
+    );
+
+    $self->pwg->site_img_date_creation(
+        $self->current_image->create_date
+    );
+
+    $self->current_image->site_categories(
+        $self->categories
+    );
+
+    $self->pwg->categories(
+        sprintf(
+            "%s",
+            join(';', @{$self->categories})
+        )
+    );
+
+    $self->pwg->tags(
+        #join(',', @{$self->current_image->site_tags})
+    );
+	
+}
+
+# read Orientation exif tag from original image
+# apply rotation to image ( preview or resize )
+sub RotateImage {
+    my ( $self, $file ) = @_;
+    
+    # exif from original image
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+        printf(
+            "Rotate %s\n",
+            $1
+        );
+
+        my $image = Image::Magick->new();
+        
+        # read resized file
+        my $status = $image->Read(
+            $file
+        );
+        warn "$status ", $file, "\n" if $status ;
+        return 0 if $status;
+    
+        $image->Rotate( degrees=>$1 );	
+        
+        # write resizd file
+        $image->Write(
+            filename=>$file
+        );
+        warn "$status ", $file, "\n" if $status ;
+        return 0 if $status;
+        
+        undef $image;
+    
+    }	
+    return 1;
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/Object.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/Object.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/Object.pm	(revision 3291)
@@ -0,0 +1,142 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Object;
+use strict;
+use Data::Dumper;
+use Storable;
+use File::Slurp ; 
+use Data::Dumper;
+use base qw/
+               Class::Accessor::Fast
+           /; 
+
+# $param is a hash with :
+# key : member name
+sub new {
+    my ( $class, $params ) = @_;
+    
+    $params ||= {};
+    
+    my $self = bless $params, $class ;
+
+    # create member accessors
+    #__PACKAGE__->mk_accessors(     
+    #    keys %$params
+    #);
+    
+    
+    if(defined $self->{plugin_file}){
+    	die "Plugin file is missing." unless -e $self->{plugin_file};
+        $self->InitPlugins();
+    }
+
+    # member accessors initialization
+    eval {
+        map {
+        	$self->$_(
+        	    $params->{$_}
+        	);
+        }
+        keys %$params;
+    };
+    if($@){
+        warn $@;	
+    }
+
+    # must be defined in child class
+    $self->Init();
+
+    
+    return $self;
+}
+
+
+sub InitPlugins {
+    my ( $self ) = @_;
+    
+    my $data;
+    eval { $data = read_file( $self->{plugin_file} ); } ;
+
+    my $plugins = [] ;
+    if( defined $data){
+        my $expr = '$plugins = ' ;
+        $expr .=  "$data  " ;
+        eval $expr ;
+    }
+    # load plugins
+    
+    my $hplugins = $plugins->[0] if scalar @$plugins;
+    while( my ( $key, $value ) = each %$hplugins ) {
+    	$self->ReadParams( $value, $key);
+    }
+    
+}
+
+sub ReadParams {
+	my( $self, $file, $key ) = @_ ;
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params  " ;
+		eval $expr ;
+	}
+	return unless 'ARRAY' eq ref $paramValues ;
+        if($@){
+            die "Cannot load data $@";	
+        }
+	if(scalar(@$paramValues )){
+	    my $params = $paramValues->[0] ;
+	    $self->SetKeyValues($params, $key);
+	}
+}
+
+sub SetKeyValues {
+    my ( $self, $params, $key )= @_;
+    if (defined $key) {	
+        foreach( keys %$params ) {
+            $self->{$key}->{$_} = $params->{$_} ;
+        }
+    }
+    else {
+        foreach( keys %$params ) {
+            $self->{$_} = $params->{$_} ;
+        }
+    }
+}
+
+
+sub get_storable {
+    my ( $self, $keys ) = @_;	
+
+    my $data = {
+        map {
+    	    $_ => $self->{$_},
+          }
+          @$keys
+    };
+    
+    $data;
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/Object2.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/Object2.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/Object2.pm	(revision 3291)
@@ -0,0 +1,128 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Object2;
+use strict;
+
+use Data::Dumper;
+use base qw/
+               Class::Accessor::Fast
+           /; 
+
+__PACKAGE__->mk_accessors(     
+    qw/
+        accessors
+        frame_callbacks
+      /
+);
+
+
+
+
+
+
+# Set control values with accessor
+sub SetControlValues {
+    my ( $self ) = @_;
+    
+    my $accessors = $self->accessors;
+    
+    # accessor_name => [ sub {}, control_id ]
+    map {
+    	my $control_id = $_;
+        $self->SetControlValue($control_id);
+   }
+    keys %$accessors;
+}
+
+
+
+sub GetControlValue {
+    my( $self, $control_id ) = @_;
+
+    my $ctrl = $self->FindWindow($control_id) ;
+    my $accessor = $self->accessors->{$control_id};
+
+    # to execute the right method
+    my $method = {
+        'Wx::TextCtrl' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetValue()
+        	              );
+                          },	
+        'Wx::StaticText' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetLabel()
+        	              );
+                          },	
+        'Wx::StaticBitmap' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetBitmap()
+        	              );
+                          },	
+        'Wx::RadioBox' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetSelection()
+        	              );
+                          },	
+    };
+
+
+    eval {
+        $method->{ref $ctrl }->();
+    };
+}
+
+
+
+sub SetControlValue {
+    my( $self, $control_id ) = @_;
+
+    my $ctrl = $self->FindWindow($control_id) ;
+    my $accessor = $self->accessors->{$control_id};
+
+
+    # to execute the right method
+    my $method = {
+        'Wx::TextCtrl' => sub { 
+        	              $ctrl->ChangeValue(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::StaticText' => sub { 
+        	              $ctrl->SetLabel(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::StaticBitmap' => sub { 
+        	              $ctrl->SetBitmap(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::RadioBox' => sub { 
+        	              $ctrl->SetSelection(
+        	                  $accessor->()
+        	              );
+                          },	
+    };
+    eval {
+        $method->{ref $ctrl }->();
+    };
+}
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG.pm	(revision 3291)
@@ -0,0 +1,64 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG;
+use strict;
+use Data::Dumper;
+use Uploader::PWG::WebServices;
+use Uploader::PWG::Categories;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           Uploader::PWG::WebServices
+           Uploader::PWG::Categories
+           /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           site_url
+           site_username
+           site_password
+      / 
+);
+
+$|=1;
+
+
+sub Init {
+    my ( $self ) = @_;
+
+    # for web services    
+    $self->SUPER::Init();
+    
+    $self->RefreshCategories;	
+
+}
+
+sub RefreshCategories {
+    my ( $self ) = @_;
+
+    $self->categories(
+        $self->prepare_items(
+            $self->GetCategories
+        )
+    );
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG/Categories.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG/Categories.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG/Categories.pm	(revision 3291)
@@ -0,0 +1,123 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG::Categories;
+use strict;
+use Data::Dumper;
+use Wx::Locale qw/:default/;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           /;
+
+# create a list of tree items
+sub prepare_items {
+    my ( $self, $categories ) = @_;
+
+
+    my $records = {};    
+
+    # lookup by id
+    # every node is a parent
+    map {
+        $records->{$_->{id}} = _record( $_ );
+    }
+    @$categories;
+
+    # find the parent
+    map {
+    	my $child = $records->{$_};
+    	my $parentid = _parentid($child);
+        if(defined $parentid){
+            _addchild( 
+                $records->{$parentid}, 
+                $child
+            );
+            delete $records->{$_};	
+        }
+    }
+    sort { $b <=> $a }
+    keys %$records;
+
+    return [
+        [
+            gettext("Categories"),
+            undef,
+            -1,
+            0,
+            -1,
+            
+        ],
+        sort { $a->[6] <=> $b->[6] } values %$records,
+    ];
+}
+
+sub _parentid {
+    my ( $record ) = @_;
+    
+    $record->[5];
+}
+
+
+sub _addchild {
+    my ( $record, $child ) = @_;
+    
+    $record->[1] ||= [];
+    
+    my $children = $record->[1];
+    
+    push @$children, $child;
+    
+    # sort by rank 	
+    @$children = sort { $a->[6] <=> $b->[6] } @$children;
+}
+
+sub _parent_rank {
+   my ( $category ) = @_;
+
+   my @rank = split /\./, $category->{global_rank} ;
+   my @ucats = split /,/, $category->{uppercats} ;
+
+   my $parent;
+   if( 1 < scalar @ucats ){
+   	$parent = $ucats[scalar @rank - 2 ];
+   }
+   my $rank = $rank[scalar @rank - 1 ];
+   
+   return ($parent, $rank);
+}
+
+
+
+sub _record {
+    my ( $category ) = @_;
+
+    my ( $parent, $rank ) = _parent_rank($category);
+    return [
+        $category->{name},
+        undef,
+        $category,
+        1,
+        -1,
+        $parent,
+        $rank,
+    ];   
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG/WebServices.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG/WebServices.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/Uploader/PWG/WebServices.pm	(revision 3291)
@@ -0,0 +1,248 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG::WebServices;
+ 
+use strict;
+use warnings;
+use MIME::Base64; 
+use JSON;
+use LWP::UserAgent;
+use Data::Dumper;
+use Digest::MD5::File qw/file_md5_hex md5_hex/;
+use File::Slurp;
+use Encode qw/encode decode/;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           uagent
+           urlbase
+           username
+           password
+           qry_list_categories
+           qry_add_categories
+           items
+           tags
+           categories
+           site_high_file
+           site_resized_file
+           site_thumb_file
+           site_image_name
+           rank
+           site_author
+           site_comment
+           site_img_date_creation
+           uagent_response
+           login_result
+           action_result
+           upload_high
+      / 
+);
+
+$|=1;
+
+sub Init {
+    my ( $self ) = @_ ;
+ 
+    $self->uagent(
+        LWP::UserAgent->new
+    );
+    
+    $self->uagent->cookie_jar({});	
+
+    $self->urlbase(
+        $self->{site_url}
+    );
+    
+    $self->username(
+        $self->{site_username}
+    );
+    
+    $self->password(
+        $self->{site_password}
+    );
+    
+    $self->qry_list_categories( sprintf
+        "%s/ws.php?format=json&method=%s&recursive=%s",
+        $self->urlbase,
+        'pwg.categories.getAdminList',
+        'true',
+    );
+
+    my $form = {
+        method => 'pwg.session.login',
+        username => $self->username,
+        password => $self->password,
+    };
+ 
+    $self->uagent_response(
+        $self->uagent->post(
+            $self->urlbase.'/ws.php?format=json',
+            $form
+        )
+    );
+    
+    my $hresult = {} ;
+
+    if($self->uagent_response->is_success){
+        eval {
+            $hresult = from_json(
+                $self->uagent_response->content
+            );
+        };
+    }
+    else{
+        $hresult = {
+            'message' => $self->uagent_response->message,
+            'stat'    => 'fail',
+        };
+    }
+        
+    $self->login_result(
+        $hresult
+    );
+
+}
+
+sub GetCategories {
+    my ( $self ) = @_;
+
+    my $result;
+    eval {
+        $result = $self->uagent->get(
+            $self->qry_list_categories
+        );
+    };
+
+    if($@){
+        printf("An error occured in query execution %s\n%s",
+            $self->qry_list_categories,
+            $@,
+        );	
+    }
+    my $hresult;
+    
+    eval {
+    	$hresult = from_json(
+            $result->content
+        );
+    };
+    
+    $hresult ||= {};
+    my $categories = $hresult->{result}{categories};
+
+
+    $categories;	
+}
+
+sub UploadImage {
+    my ( $self ) = @_;
+    
+
+
+    my $file_content = encode_base64(
+        read_file(
+            $self->site_resized_file,
+            binmode => ':raw',
+        )
+    );
+
+    my $file_sum = file_md5_hex(
+        $self->site_resized_file
+    );
+ 
+    my $thumbnail_content = encode_base64(
+        read_file(
+            $self->site_thumb_file,
+            binmode => ':raw',
+        )
+    );
+
+    my $thumbnail_sum = file_md5_hex(
+        $self->site_thumb_file,
+    );
+
+    my $original_sum = file_md5_hex(
+        $self->site_high_file
+    );
+
+    
+    my $form = {
+        method            => 'pwg.images.add',
+        original_sum      => $original_sum,
+        file_sum          => $file_sum,
+        file_content      => $file_content,
+        thumbnail_sum     => $thumbnail_sum,
+        thumbnail_content => $thumbnail_content,
+        categories        => $self->categories,
+        name              => $self->site_image_name,
+        rank              => $self->rank,
+        author            => $self->site_author,
+        comment           => $self->site_comment,
+        date_creation     => $self->site_img_date_creation,
+        
+    };
+
+    if($self->upload_high){
+    	$form->{high_content} = encode_base64(
+    	                             read_file(
+    	                                 $self->site_high_file,
+                                         binmode => ':raw',
+    	                             )
+    	                         );
+
+    	$form->{high_sum}     = $original_sum;
+    }
+
+
+    my $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+
+
+    return ( $result->is_success, $result->status_line );
+}
+ 
+
+sub AddCategories{
+    my ( $self, $name, $parentid ) = @_;
+
+    my $form = {
+        method            => 'pwg.categories.add',
+        name              => $name,
+        parent            => $parentid,
+        
+    };
+
+    my $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    return ( $result->is_success, $result->status_line );
+	
+} 
+1;
+    
Index: /extensions/pLoader/tags/2.0.0a/src/pLoader.exe.manifest
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/pLoader.exe.manifest	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/pLoader.exe.manifest	(revision 3291)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+     <assemblyIdentity
+         processorArchitecture="x86"
+         version="5.1.0.0"
+         type="win32"
+         name="Controls"
+     />
+     <description>pLoader</description>
+     <dependency>
+         <dependentAssembly>
+             <assemblyIdentity
+                 type="win32"
+                 name="Microsoft.Windows.Common-Controls"        
+                 version="6.0.0.0"
+                 publicKeyToken="6595b64144ccf1df"
+                 language="*"
+                 processorArchitecture="x86"
+         />
+     </dependentAssembly>
+     </dependency>
+ </assembly>
Index: /extensions/pLoader/tags/2.0.0a/src/pLoader.ini
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/pLoader.ini	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/pLoader.ini	(revision 3291)
@@ -0,0 +1,7 @@
+[
+    {
+        site_url      => 'http://localhost',
+        site_username => 'username',
+        site_password => 'password',
+    }
+]
Index: /extensions/pLoader/tags/2.0.0a/src/ploader.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0a/src/ploader.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0a/src/ploader.pl	(revision 3291)
@@ -0,0 +1,40 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.  i                            |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+
+use strict;
+use Wx ;
+use Class::Accessor::Fast;
+use Uploader::GUI::wxApp;
+use JSON;
+
+BEGIN { use Wx::Perl::Packager; }
+
+require '../res/progress_wdr.pl'; 
+require '../res/login_wdr.pl'; 
+require '../res/photo_properties_wdr.pl'; 
+require '../res/photo_exif_wdr.pl'; 
+require '../res/global_settings_wdr.pl'; 
+
+my $app = Uploader::GUI::wxApp->new(@_);
+$app->MainLoop();
+
+1;
+
+
Index: /extensions/pLoader/tags/2.0.0b/build/build_pLoader.bat
===================================================================
--- /extensions/pLoader/tags/2.0.0b/build/build_pLoader.bat	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/build/build_pLoader.bat	(revision 3291)
@@ -0,0 +1,1 @@
+wxpar.bat @par_options.txt --gui --icon=..\res\favicon.ico -output=pLoader.exe ..\src\pLoader.pl
Index: /extensions/pLoader/tags/2.0.0b/build/par_options.txt
===================================================================
--- /extensions/pLoader/tags/2.0.0b/build/par_options.txt	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/build/par_options.txt	(revision 3291)
@@ -0,0 +1,184 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+# wxpar Getopt::Argfile for PAR::Packer pp
+
+-M attributes.pm
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/mingwm10.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_adv_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_qa_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_html_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxbase28u_net_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_gl_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_aui_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_core_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxbase28u_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/delegates.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_vicar_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_x_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ept_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sun_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_png_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wpg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pdb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_txt_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cip_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xpm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xtrn_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pwp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/type.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_Magick++_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/X11.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cin_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_raw_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pix_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/Xext.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_plasma_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fax_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/configure.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/magic.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sfw_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_map_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_magick_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pdf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_clip_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_url_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rgb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_scr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_locale_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_art_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tiff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_thumbnail_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/analyze.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gray_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_xlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jp2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_braille_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps3_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jbig_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tim_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rla_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pnm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xwd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rle_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cmyk_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_svg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_histogram_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/thresholds.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_magick_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_djvu_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_label_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gif_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/Magick.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpc_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wbmp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tga_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mvg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jbig_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dpx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_viff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/log.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_logo_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dcm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_wand_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dng_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/coder.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/english.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_miff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_msl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_html_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xbm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_exr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_avs_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pict_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jp2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ycbcr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_emf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_topol_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/autosplit.ix
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_zlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xc_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/locale.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cut_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_uyvy_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mat_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_libxml_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_meta_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_matte_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_uil_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_caption_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mtv_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fpx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_yuv_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mono_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_lcms_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sgi_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_otb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_palm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_vid_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sct_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_bmp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_clipboard_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_tiff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/colors.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tile_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cineon_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xcf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dot_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gradient_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fits_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_avi_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_psd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_bzlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_ttf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wmf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_stegano_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_preview_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_info_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_null_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pattern_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_icon_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ttf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ipl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_png_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dds_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/type-ghostscript.xml
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Windows.pm;lib/File/HomeDir/Windows.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Darwin.pm;lib/File/HomeDir/Darwin.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Driver.pm;lib/File/HomeDir/Driver.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/MacOS9.pm;lib/File/HomeDir/MacOS9.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Unix.pm;lib/File/HomeDir/Unix.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP.pm;lib/JSON/PP.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP56.pm;lib/JSON/PP56.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP58.pm;lib/JSON/PP58.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP5005.pm;lib/JSON/PP5005.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP/Boolean.pm;lib/JSON/PP/Boolean.pm"
+-l pLoader.exe.manifest
Index: /extensions/pLoader/tags/2.0.0b/res/global_settings_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0b/res/global_settings_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/res/global_settings_wdr.pl	(revision 3291)
@@ -0,0 +1,93 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: global_settings.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxRA_SPECIFY_ROWS );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_GLOBAL_AUTHOR); $ID_GLOBAL_AUTHOR = 10001;
+use vars qw($ID_GLOBAL_NAME_PREFIX); $ID_GLOBAL_NAME_PREFIX = 10002;
+use vars qw($ID_GLOBAL_THUMB_SIZE); $ID_GLOBAL_THUMB_SIZE = 10003;
+use vars qw($ID_GLOBAL_RESIZED_W); $ID_GLOBAL_RESIZED_W = 10004;
+use vars qw($ID_GLOBAL_RESIZED_H); $ID_GLOBAL_RESIZED_H = 10005;
+use vars qw($ID_GLOBAL_ROTATE); $ID_GLOBAL_ROTATE = 10006;
+use vars qw($ID_GLOBAL_HIGH); $ID_GLOBAL_HIGH = 10007;
+
+sub GlobalSettings {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Default author :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item3 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_AUTHOR, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Photo name  prefix :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_NAME_PREFIX, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item5, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Site thumbnail size :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item6, 0, wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_THUMB_SIZE, "", wxDefaultPosition, [80,-1], 0 );
+    $item1->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Site image width :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_RESIZED_W, "", wxDefaultPosition, [80,-1], 0 );
+    $item1->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item10 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Site image height :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item11 ) = Wx::TextCtrl->new( $_[0], $main::ID_GLOBAL_RESIZED_H, "", wxDefaultPosition, [80,-1], 0 );
+    $item1->AddWindow( $item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item12 ) = Wx::RadioBox->new( $_[0], $main::ID_GLOBAL_ROTATE, "Auto rotate image", wxDefaultPosition, wxDefaultSize, 
+        ["Yes","No"] , 1, wxRA_SPECIFY_ROWS );
+    $item1->AddWindow( $item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item13 ) = Wx::RadioBox->new( $_[0], $main::ID_GLOBAL_HIGH, "Upload high (original size) ", wxDefaultPosition, wxDefaultSize, 
+        ["No","Yes"] , 1, wxRA_SPECIFY_ROWS );
+    $item1->AddWindow( $item13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0b/res/intro.html
===================================================================
--- /extensions/pLoader/tags/2.0.0b/res/intro.html	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/res/intro.html	(revision 3291)
@@ -0,0 +1,6 @@
+<body style="background-color:#111111">
+  <div style="margin:5em auto; color:#777777; font-size:2em; text-align:center;">
+    <img src="piwigo_logo.png" style="margin-bottom:1em"/><br />
+    Drop your photos
+  </div>
+</body>
Index: /extensions/pLoader/tags/2.0.0b/res/login_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0b/res/login_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/res/login_wdr.pl	(revision 3291)
@@ -0,0 +1,91 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: login.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxTE_PASSWORD );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_PWG_URL); $ID_PWG_URL = 10001;
+use vars qw($ID_PWG_USERNAME); $ID_PWG_USERNAME = 10002;
+use vars qw($ID_PWG_PASSWORD); $ID_PWG_PASSWORD = 10003;
+use vars qw($ID_PWG_OK); $ID_PWG_OK = 10004;
+use vars qw($ID_PWG_CANCEL); $ID_PWG_CANCEL = 10005;
+
+sub Login {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    $item0->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item2 ) = Wx::StaticBox->new( $_[0], -1, "" );
+    my( $item1 ) = Wx::StaticBoxSizer->new( $item2, wxVERTICAL );
+    
+    my( $item3 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Piwigo url", wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $_[0], $main::ID_PWG_URL, "", wxDefaultPosition, [400,-1], 0 );
+    $item3->AddWindow( $item5, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Admin. username :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $_[0], $main::ID_PWG_USERNAME, "", wxDefaultPosition, [200,-1], 0 );
+    $item3->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Admin. password :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $_[0], $main::ID_PWG_PASSWORD, "", wxDefaultPosition, [200,-1], wxTE_PASSWORD );
+    $item3->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->Add( $item3, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->AddSpace( 20, 30, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item10 ) = Wx::BoxSizer->new( wxHORIZONTAL );
+    
+    my( $item11 ) = Wx::Button->new( $_[0], $main::ID_PWG_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 );
+    $item11->SetDefault();
+    $item10->AddWindow( $item11, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item12 ) = Wx::Button->new( $_[0], $main::ID_PWG_CANCEL, "Cancel", wxDefaultPosition, wxDefaultSize, 0 );
+    $item10->AddWindow( $item12, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item10, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0b/res/photo_exif_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0b/res/photo_exif_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/res/photo_exif_wdr.pl	(revision 3291)
@@ -0,0 +1,118 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: photo_exif.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_EXIF_CREATE_DATE); $ID_EXIF_CREATE_DATE = 10001;
+use vars qw($ID_EXIF_WIDTH); $ID_EXIF_WIDTH = 10002;
+use vars qw($ID_EXIF_HEIGHT); $ID_EXIF_HEIGHT = 10003;
+use vars qw($ID_EXIF_ORIENTATION); $ID_EXIF_ORIENTATION = 10004;
+use vars qw($ID_EXIF_ISO); $ID_EXIF_ISO = 10005;
+use vars qw($ID_EXIF_SHUTTER_SPEED); $ID_EXIF_SHUTTER_SPEED = 10006;
+use vars qw($ID_EXIF_APERTURE); $ID_EXIF_APERTURE = 10007;
+use vars qw($ID_EXIF_FOCAL_LENGTH); $ID_EXIF_FOCAL_LENGTH = 10008;
+use vars qw($ID_EXIF_MODEL); $ID_EXIF_MODEL = 10009;
+use vars qw($ID_EXIF_LENS); $ID_EXIF_LENS = 10010;
+
+sub PhotoExif {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Create date :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_CREATE_DATE, "", wxDefaultPosition, [100,-1], 0 );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Width :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_WIDTH, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Height :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_HEIGHT, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Orientation :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_ORIENTATION, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item10 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "ISO :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item11 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_ISO, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item12 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Shutter speed :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item13 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_SHUTTER_SPEED, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item14 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Aperture :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item15 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_APERTURE, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item16 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Focal length :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item17 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_FOCAL_LENGTH, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item18 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Model :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item19 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_MODEL, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item20 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Lens :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item21 ) = Wx::StaticText->new( $_[0], $main::ID_EXIF_LENS, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0b/res/photo_properties_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0b/res/photo_properties_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/res/photo_properties_wdr.pl	(revision 3291)
@@ -0,0 +1,88 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: photo_properties.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxLI_HORIZONTAL wxTE_MULTILINE );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_PHOTO); $ID_PHOTO = 10000;
+use vars qw($ID_LINE); $ID_LINE = 10001;
+use vars qw($ID_TEXT); $ID_TEXT = 10002;
+use vars qw($ID_PHOTO_AUTHOR); $ID_PHOTO_AUTHOR = 10003;
+use vars qw($ID_PHOTO_NAME); $ID_PHOTO_NAME = 10004;
+use vars qw($ID_PHOTO_COMMENT); $ID_PHOTO_COMMENT = 10005;
+use vars qw($ID_PHOTO_CREATE_DATE); $ID_PHOTO_CREATE_DATE = 10006;
+
+sub PhotoProperties {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    $item1->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item2 ) = Wx::StaticBitmap->new( $_[0], $main::ID_PHOTO, wxNullBitmap, wxDefaultPosition, [120,120] );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->AddSpace( 10, 5, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticLine->new( $_[0], $main::ID_LINE, wxDefaultPosition, [400,-1], wxLI_HORIZONTAL );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item4 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Author :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $_[0], $main::ID_PHOTO_AUTHOR, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Photo name :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $_[0], $main::ID_PHOTO_NAME, "", wxDefaultPosition, [400,-1], 0 );
+    $item1->AddWindow( $item7, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Comment :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item8, 0, wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $_[0], $main::ID_PHOTO_COMMENT, "", wxDefaultPosition, [400,100], wxTE_MULTILINE );
+    $item1->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item10 ) = Wx::StaticText->new( $_[0], $main::ID_TEXT, "Create date :", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item11 ) = Wx::StaticText->new( $_[0], $main::ID_PHOTO_CREATE_DATE, "", wxDefaultPosition, [100,-1], 0 );
+    $item1->AddWindow( $item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0b/res/progress_wdr.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0b/res/progress_wdr.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/res/progress_wdr.pl	(revision 3291)
@@ -0,0 +1,75 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: progress.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxLI_HORIZONTAL );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_PROGRESS_TXT); $ID_PROGRESS_TXT = 10000;
+use vars qw($ID_STATICBITMAP); $ID_STATICBITMAP = 10001;
+use vars qw($ID_PROGRESS_GAUGE); $ID_PROGRESS_GAUGE = 10002;
+use vars qw($ID_LINE); $ID_LINE = 10003;
+use vars qw($ID_PROGRESS_OK); $ID_PROGRESS_OK = 10004;
+
+sub ProcessingProgress {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_PROGRESS_TXT, "Processing", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticBitmap->new( $_[0], $main::ID_STATICBITMAP, wxNullBitmap, wxDefaultPosition, [100,100] );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+
+    $item1->AddSpace( 20, 30, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item4 ) = Wx::Gauge->new( $_[0], $main::ID_PROGRESS_GAUGE, 100, wxDefaultPosition, [400,12], 0 );
+    $item1->AddWindow( $item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item5 ) = Wx::StaticLine->new( $_[0], $main::ID_LINE, wxDefaultPosition, [20,-1], wxLI_HORIZONTAL );
+    $item0->AddWindow( $item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::BoxSizer->new( wxHORIZONTAL );
+    
+    my( $item7 ) = Wx::Button->new( $_[0], $main::ID_PROGRESS_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 );
+    $item6->AddWindow( $item7, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item6, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxApp.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxApp.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxApp.pm	(revision 3291)
@@ -0,0 +1,795 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxApp;
+use strict;
+use base qw/Wx::App Class::Accessor::Fast/;    
+use Wx qw/
+             wxBITMAP_TYPE_GIF 
+             wxBITMAP_TYPE_ICO 
+             wxBITMAP_TYPE_BMP 
+             wxBITMAP_TYPE_PNG 
+             wxBITMAP_TYPE_JPEG
+             wxIMAGE_QUALITY_NORMAL
+             wxIMAGE_QUALITY_HIGH
+             wxSPLASH_CENTRE_ON_SCREEN 
+             wxSPLASH_TIMEOUT
+             wxDefaultPosition 
+             wxDefaultSize 
+             wxSIMPLE_BORDER 
+             wxFRAME_TOOL_WINDOW
+             wxFRAME_NO_TASKBAR wxSTAY_ON_TOP
+             wxWHITE
+             wxICON_EXCLAMATION
+             wxOK 
+             wxLANGUAGE_ABKHAZIAN   
+             wxLANGUAGE_AFAR   
+             wxLANGUAGE_AFRIKAANS   
+             wxLANGUAGE_ALBANIAN   
+             wxLANGUAGE_AMHARIC   
+             wxLANGUAGE_ARABIC   
+             wxLANGUAGE_ARABIC_ALGERIA   
+             wxLANGUAGE_ARABIC_BAHRAIN   
+             wxLANGUAGE_ARABIC_EGYPT   
+             wxLANGUAGE_ARABIC_IRAQ   
+             wxLANGUAGE_ARABIC_JORDAN   
+             wxLANGUAGE_ARABIC_KUWAIT   
+             wxLANGUAGE_ARABIC_LEBANON   
+             wxLANGUAGE_ARABIC_LIBYA   
+             wxLANGUAGE_ARABIC_MOROCCO   
+             wxLANGUAGE_ARABIC_OMAN   
+             wxLANGUAGE_ARABIC_QATAR   
+             wxLANGUAGE_ARABIC_SAUDI_ARABIA   
+             wxLANGUAGE_ARABIC_SUDAN   
+             wxLANGUAGE_ARABIC_SYRIA   
+             wxLANGUAGE_ARABIC_TUNISIA   
+             wxLANGUAGE_ARABIC_UAE   
+             wxLANGUAGE_ARABIC_YEMEN   
+             wxLANGUAGE_ARMENIAN   
+             wxLANGUAGE_ASSAMESE   
+             wxLANGUAGE_AYMARA   
+             wxLANGUAGE_AZERI   
+             wxLANGUAGE_AZERI_CYRILLIC   
+             wxLANGUAGE_AZERI_LATIN   
+             wxLANGUAGE_BASHKIR   
+             wxLANGUAGE_BASQUE   
+             wxLANGUAGE_BELARUSIAN   
+             wxLANGUAGE_BENGALI   
+             wxLANGUAGE_BHUTANI   
+             wxLANGUAGE_BIHARI   
+             wxLANGUAGE_BISLAMA   
+             wxLANGUAGE_BRETON   
+             wxLANGUAGE_BULGARIAN   
+             wxLANGUAGE_BURMESE   
+             wxLANGUAGE_CAMBODIAN   
+             wxLANGUAGE_CATALAN   
+             wxLANGUAGE_CHINESE   
+             wxLANGUAGE_CHINESE_SIMPLIFIED   
+             wxLANGUAGE_CHINESE_TRADITIONAL   
+             wxLANGUAGE_CHINESE_HONGKONG   
+             wxLANGUAGE_CHINESE_MACAU   
+             wxLANGUAGE_CHINESE_SINGAPORE   
+             wxLANGUAGE_CHINESE_TAIWAN   
+             wxLANGUAGE_CORSICAN   
+             wxLANGUAGE_CROATIAN   
+             wxLANGUAGE_CZECH   
+             wxLANGUAGE_DANISH   
+             wxLANGUAGE_DUTCH   
+             wxLANGUAGE_DUTCH_BELGIAN   
+             wxLANGUAGE_ENGLISH   
+             wxLANGUAGE_ENGLISH_UK   
+             wxLANGUAGE_ENGLISH_US   
+             wxLANGUAGE_ENGLISH_AUSTRALIA   
+             wxLANGUAGE_ENGLISH_BELIZE   
+             wxLANGUAGE_ENGLISH_BOTSWANA   
+             wxLANGUAGE_ENGLISH_CANADA   
+             wxLANGUAGE_ENGLISH_CARIBBEAN   
+             wxLANGUAGE_ENGLISH_DENMARK   
+             wxLANGUAGE_ENGLISH_EIRE   
+             wxLANGUAGE_ENGLISH_JAMAICA   
+             wxLANGUAGE_ENGLISH_NEW_ZEALAND   
+             wxLANGUAGE_ENGLISH_PHILIPPINES   
+             wxLANGUAGE_ENGLISH_SOUTH_AFRICA   
+             wxLANGUAGE_ENGLISH_TRINIDAD   
+             wxLANGUAGE_ENGLISH_ZIMBABWE   
+             wxLANGUAGE_ESPERANTO   
+             wxLANGUAGE_ESTONIAN   
+             wxLANGUAGE_FAEROESE   
+             wxLANGUAGE_FARSI   
+             wxLANGUAGE_FIJI   
+             wxLANGUAGE_FINNISH   
+             wxLANGUAGE_FRENCH   
+             wxLANGUAGE_FRENCH_BELGIAN   
+             wxLANGUAGE_FRENCH_CANADIAN   
+             wxLANGUAGE_FRENCH_LUXEMBOURG   
+             wxLANGUAGE_FRENCH_MONACO   
+             wxLANGUAGE_FRENCH_SWISS   
+             wxLANGUAGE_FRISIAN   
+             wxLANGUAGE_GALICIAN   
+             wxLANGUAGE_GEORGIAN   
+             wxLANGUAGE_GERMAN   
+             wxLANGUAGE_GERMAN_AUSTRIAN   
+             wxLANGUAGE_GERMAN_BELGIUM   
+             wxLANGUAGE_GERMAN_LIECHTENSTEIN   
+             wxLANGUAGE_GERMAN_LUXEMBOURG   
+             wxLANGUAGE_GERMAN_SWISS   
+             wxLANGUAGE_GREEK   
+             wxLANGUAGE_GREENLANDIC   
+             wxLANGUAGE_GUARANI   
+             wxLANGUAGE_GUJARATI   
+             wxLANGUAGE_HAUSA   
+             wxLANGUAGE_HEBREW   
+             wxLANGUAGE_HINDI   
+             wxLANGUAGE_HUNGARIAN   
+             wxLANGUAGE_ICELANDIC   
+             wxLANGUAGE_INDONESIAN   
+             wxLANGUAGE_INTERLINGUA   
+             wxLANGUAGE_INTERLINGUE   
+             wxLANGUAGE_INUKTITUT   
+             wxLANGUAGE_INUPIAK   
+             wxLANGUAGE_IRISH   
+             wxLANGUAGE_ITALIAN   
+             wxLANGUAGE_ITALIAN_SWISS   
+             wxLANGUAGE_JAPANESE   
+             wxLANGUAGE_JAVANESE   
+             wxLANGUAGE_KANNADA   
+             wxLANGUAGE_KASHMIRI   
+             wxLANGUAGE_KASHMIRI_INDIA   
+             wxLANGUAGE_KAZAKH   
+             wxLANGUAGE_KERNEWEK   
+             wxLANGUAGE_KINYARWANDA   
+             wxLANGUAGE_KIRGHIZ   
+             wxLANGUAGE_KIRUNDI   
+             wxLANGUAGE_KONKANI   
+             wxLANGUAGE_KOREAN   
+             wxLANGUAGE_KURDISH   
+             wxLANGUAGE_LAOTHIAN   
+             wxLANGUAGE_LATIN   
+             wxLANGUAGE_LATVIAN   
+             wxLANGUAGE_LINGALA   
+             wxLANGUAGE_LITHUANIAN   
+             wxLANGUAGE_MACEDONIAN   
+             wxLANGUAGE_MALAGASY   
+             wxLANGUAGE_MALAY   
+             wxLANGUAGE_MALAYALAM   
+             wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM   
+             wxLANGUAGE_MALAY_MALAYSIA   
+             wxLANGUAGE_MALTESE   
+             wxLANGUAGE_MANIPURI   
+             wxLANGUAGE_MAORI   
+             wxLANGUAGE_MARATHI   
+             wxLANGUAGE_MOLDAVIAN   
+             wxLANGUAGE_MONGOLIAN   
+             wxLANGUAGE_NAURU   
+             wxLANGUAGE_NEPALI   
+             wxLANGUAGE_NEPALI_INDIA   
+             wxLANGUAGE_NORWEGIAN_BOKMAL   
+             wxLANGUAGE_NORWEGIAN_NYNORSK   
+             wxLANGUAGE_OCCITAN   
+             wxLANGUAGE_ORIYA   
+             wxLANGUAGE_OROMO   
+             wxLANGUAGE_PASHTO   
+             wxLANGUAGE_POLISH   
+             wxLANGUAGE_PORTUGUESE   
+             wxLANGUAGE_PORTUGUESE_BRAZILIAN   
+             wxLANGUAGE_PUNJABI   
+             wxLANGUAGE_QUECHUA   
+             wxLANGUAGE_RHAETO_ROMANCE   
+             wxLANGUAGE_ROMANIAN   
+             wxLANGUAGE_RUSSIAN   
+             wxLANGUAGE_RUSSIAN_UKRAINE   
+             wxLANGUAGE_SAMI   
+             wxLANGUAGE_SAMOAN   
+             wxLANGUAGE_SANGHO   
+             wxLANGUAGE_SANSKRIT   
+             wxLANGUAGE_SCOTS_GAELIC   
+             wxLANGUAGE_SERBIAN   
+             wxLANGUAGE_SERBIAN_CYRILLIC   
+             wxLANGUAGE_SERBIAN_LATIN   
+             wxLANGUAGE_SERBO_CROATIAN   
+             wxLANGUAGE_SESOTHO   
+             wxLANGUAGE_SETSWANA   
+             wxLANGUAGE_SHONA   
+             wxLANGUAGE_SINDHI   
+             wxLANGUAGE_SINHALESE   
+             wxLANGUAGE_SISWATI   
+             wxLANGUAGE_SLOVAK   
+             wxLANGUAGE_SLOVENIAN   
+             wxLANGUAGE_SOMALI   
+             wxLANGUAGE_SPANISH   
+             wxLANGUAGE_SPANISH_ARGENTINA   
+             wxLANGUAGE_SPANISH_BOLIVIA   
+             wxLANGUAGE_SPANISH_CHILE   
+             wxLANGUAGE_SPANISH_COLOMBIA   
+             wxLANGUAGE_SPANISH_COSTA_RICA   
+             wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC   
+             wxLANGUAGE_SPANISH_ECUADOR   
+             wxLANGUAGE_SPANISH_EL_SALVADOR   
+             wxLANGUAGE_SPANISH_GUATEMALA   
+             wxLANGUAGE_SPANISH_HONDURAS   
+             wxLANGUAGE_SPANISH_MEXICAN   
+             wxLANGUAGE_SPANISH_MODERN   
+             wxLANGUAGE_SPANISH_NICARAGUA   
+             wxLANGUAGE_SPANISH_PANAMA   
+             wxLANGUAGE_SPANISH_PARAGUAY   
+             wxLANGUAGE_SPANISH_PERU   
+             wxLANGUAGE_SPANISH_PUERTO_RICO   
+             wxLANGUAGE_SPANISH_URUGUAY   
+             wxLANGUAGE_SPANISH_US   
+             wxLANGUAGE_SPANISH_VENEZUELA   
+             wxLANGUAGE_SUNDANESE   
+             wxLANGUAGE_SWAHILI   
+             wxLANGUAGE_SWEDISH   
+             wxLANGUAGE_SWEDISH_FINLAND   
+             wxLANGUAGE_TAGALOG   
+             wxLANGUAGE_TAJIK   
+             wxLANGUAGE_TAMIL   
+             wxLANGUAGE_TATAR   
+             wxLANGUAGE_TELUGU   
+             wxLANGUAGE_THAI   
+             wxLANGUAGE_TIBETAN   
+             wxLANGUAGE_TIGRINYA   
+             wxLANGUAGE_TONGA   
+             wxLANGUAGE_TSONGA   
+             wxLANGUAGE_TURKISH   
+             wxLANGUAGE_TURKMEN   
+             wxLANGUAGE_TWI   
+             wxLANGUAGE_UIGHUR   
+             wxLANGUAGE_UKRAINIAN   
+             wxLANGUAGE_URDU   
+             wxLANGUAGE_URDU_INDIA   
+             wxLANGUAGE_URDU_PAKISTAN   
+             wxLANGUAGE_UZBEK   
+             wxLANGUAGE_UZBEK_CYRILLIC   
+             wxLANGUAGE_UZBEK_LATIN   
+             wxLANGUAGE_VALENCIAN   
+             wxLANGUAGE_VIETNAMESE   
+             wxLANGUAGE_VOLAPUK   
+             wxLANGUAGE_WELSH   
+             wxLANGUAGE_WOLOF   
+             wxLANGUAGE_XHOSA   
+             wxLANGUAGE_YIDDISH   
+             wxLANGUAGE_YORUBA   
+             wxLANGUAGE_ZHUANG   
+             wxLANGUAGE_ZULU  
+         /;
+use Uploader::GUI::wxFrameAUI;
+use File::Slurp ;
+use Data::Dumper;
+use Storable;
+use File::HomeDir;
+use File::Spec;
+use Uploader::PWG;
+use Uploader::ImageList;
+use Uploader::GUI::wxLoginDlg;
+use Wx::Locale qw/:default/;
+
+
+$|=1;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          pwg
+          site_url
+          site_username
+          site_password
+          rejects
+          imagelist
+          storable_file
+          wx_thumb_dir
+          resized_dir
+          preview_dir
+          userdata_dir
+          resized_dir
+          thumb_dir
+          conf_file
+          locale
+          current_language
+      / 
+);
+
+sub FilterEvent {
+    my( $self, $event ) = @_;
+    
+    Wx::LogMessage "EventType %s", $event->GetEventType();
+    
+    return -1;
+}
+
+sub OnInit {
+    my( $self ) = @_;
+
+    Wx::InitAllImageHandlers();
+    my $applicationName = "pLoader" ;
+    $self->SetAppName( $applicationName );
+    $self->SetVendorName( "Piwigo Team" );
+
+    $self->{IMGTYPE} = {
+        'jpg' => wxBITMAP_TYPE_JPEG,
+        'gif' => wxBITMAP_TYPE_GIF,
+        'png' => wxBITMAP_TYPE_PNG,
+    };
+
+    $self->_readParams2( 'locale.ini' ) ;
+
+    $self->_init_userdir;
+
+
+    my $conf = retrieve $self->conf_file if -e $self->conf_file;	
+
+    if(defined $conf ){
+        $self->SetKeyValues($conf);
+    }
+    else {
+        $self->_readParams( 'pLoader.ini' ) unless defined $conf ;
+    }
+
+
+    $self->site_url(
+        $self->{site_url}
+    );
+
+    $self->site_username(
+        $self->{site_username}
+    );
+    $self->site_password(
+        $self->{site_password}
+    );
+    $self->current_language(
+        $self->{current_language}||wxLANGUAGE_ENGLISH
+    );
+
+    
+    $self->init_locale;
+    
+
+
+    my $ok = $self->Login();
+    # user pressed OK
+    if($ok){
+        $self->pwg(
+            # get these parameters from dialog or from file
+            Uploader::PWG->new(
+                {
+                    site_url       => $self->site_url,
+                    site_username  => $self->site_username,
+                    site_password  => $self->site_password,
+                }
+            )
+        );
+      
+    
+        $self->_init_imagelist;
+        $self->_init_thumbimagelist;
+        
+        $self->_init_frame;
+    }
+
+    $ok;
+}
+
+my $locale;
+sub init_locale {
+    my ( $self, $language ) = @_;
+    
+    $self->current_language(
+        $language
+    ) if defined $language;
+
+    undef $locale;
+    $locale = Wx::Locale->new(
+        $self->current_language
+    );
+    $locale->AddCatalogLookupPathPrefix( '../locale');
+    if(!$locale->AddCatalog( 'pLoader' )){
+        print "Cannot find translation catalog files. Use default language\n";
+    }
+	
+}
+
+sub StoreConnectionProperties {
+    my ( $self ) = @_;
+
+    eval {    
+        store( 
+            {
+                map{
+                   $_ => $self->{$_},
+                }
+                qw/
+                    site_url
+                    site_username
+                    site_password
+                    current_language
+                /
+            },
+            $self->conf_file
+        );
+    };
+}
+
+sub _init_imagelist {
+    my ( $self ) = @_;	
+
+    my $stored_imagelist;
+    
+    if( -e $self->storable_file ){
+        eval {
+            $stored_imagelist = retrieve $self->storable_file;
+        };
+        if($@){
+            Wx::LogMessage(
+                "An error has occured. Can not read %s\n%s",
+                $self->storable_file,
+                $@
+            );
+            $stored_imagelist = $self->_default_imagelist_params ;
+        }
+    }
+    else{
+        $stored_imagelist = $self->_default_imagelist_params ;
+    }
+
+    $self->imagelist(
+        Uploader::ImageList->new(
+            $stored_imagelist
+        )
+    );
+
+    $self->imagelist->ResizeCallback(
+        sub { $self->ResizeImage(@_) }
+    );
+}
+
+
+sub _default_imagelist_params {
+    my ( $self ) = @_ ;
+
+    my $params = {
+       	thumb_size       => 120,
+        site_thumb_dir   => $self->thumb_dir,
+       	wx_thumb_size    => 120,
+        wx_thumb_dir     => $self->wx_thumb_dir,
+        preview_ratio    => 25, 
+        preview_dir      => $self->preview_dir,
+        resize_w         => 800,
+        resize_h         => 600,
+        site_resized_dir => $self->resized_dir,
+      	type             => 'jpg',
+      	filter           => 'Lanczos',
+      	blur             => 0.9,
+      	quality          => 100,
+      	prefix           => 'TN',
+      	count            => 0,
+        storable_file    => $self->storable_file,
+        images           => [],
+        userdata_dir     => $self->userdata_dir,
+        default_name_prefix => 'Photo',
+        upload_rejects  =>  [],
+        ResizeCallback  => sub { $self->ResizeImage(@_) },
+    };
+
+    return $params;
+}
+
+sub Login {
+    my ( $self ) = @_;	
+
+    my $dlg = Uploader::GUI::wxLoginDlg->new(
+        {
+            title         => gettext("Piwigo login"),
+            site_url      => sub { $self->site_url(@_) },
+            site_username => sub { $self->site_username(@_) },	
+            site_password => sub { $self->site_password(@_) },	
+        }
+    );
+
+    my $icon = Wx::Icon->new();
+    $icon->LoadFile('../res/favicon.ico', wxBITMAP_TYPE_ICO);
+    $dlg->SetIcon($icon);	
+
+    
+    my $rval = $dlg->ShowModal();
+    $dlg->Destroy;
+    
+    $rval;
+}
+
+sub _init_userdir {
+    my ( $self ) = @_;
+    
+    my $applicationName = $self->GetAppName ;
+    my $userdatadir = File::Spec->canonpath(
+        File::Spec->catfile(
+            File::HomeDir->my_data(), 
+            "\.$applicationName"
+        )
+    );
+
+    if(! -d $userdatadir){
+        if(! mkdir $userdatadir){
+            Wx::MessageBox( 
+                sprintf(
+                    "%s directory creation failed",
+                    $userdatadir,
+                ),
+                "pLoader working directory creation error",
+                wxOK | wxICON_EXCLAMATION, 
+            );
+
+            $userdatadir = File::Spec->canonpath(
+                File::Spec->catfile(
+                    File::Spec->tmpdir(), 
+                    "\.$applicationName"
+                )
+            );
+            mkdir $userdatadir;
+        }	
+    }
+
+    $self->userdata_dir($userdatadir);
+    
+    $self->conf_file(
+        File::Spec->catfile(
+            $self->userdata_dir, 
+            ".$applicationName.conf"
+        )
+    );
+
+    
+
+    $self->storable_file(
+        File::Spec->catfile($self->userdata_dir, 'pLoader.dat')
+    );
+    
+    my $thumbdir = File::Spec->catfile($self->userdata_dir, 'thumbnails');
+    mkdir $thumbdir unless -d $thumbdir ;
+    $self->thumb_dir($thumbdir);
+
+    my $wxthumbdir = File::Spec->catfile($self->userdata_dir, 'wxthumbnails');
+    mkdir $wxthumbdir unless -d $wxthumbdir ;
+    $self->wx_thumb_dir($wxthumbdir);
+
+
+    my $resizedir = File::Spec->catfile($self->userdata_dir, 'resize');
+    mkdir $resizedir unless -d $resizedir ;
+    $self->resized_dir($resizedir);
+
+    my $previewdir = File::Spec->catfile($self->userdata_dir, 'preview');
+    mkdir $previewdir unless -d $previewdir ;
+    $self->preview_dir($previewdir);
+
+	
+}
+
+sub _init_thumbimagelist {
+    my ( $self ) = @_;
+
+    
+    $self->imagelist->wx_thumb_imglist(
+        Wx::ImageList->new( 
+            $self->imagelist->wx_thumb_size, 
+            $self->imagelist->wx_thumb_size, 
+            1,
+            0
+        )
+    );
+    
+    # reload images 
+    $self->_reload_thumb_images;
+}
+
+
+sub _reload_thumb_images {
+    my ( $self ) = @_;
+    
+    my $wximagelist = $self->imagelist->wx_thumb_imglist;
+    my $images = $self->imagelist->images;
+
+    map {
+        $wximagelist->Add(
+            Wx::Bitmap->new( 
+                $_->wx_thumb_file, 
+                $self->GetWxBitmapType($self->imagelist->type), 
+            )
+        );
+    }
+    @$images ;
+
+}
+
+sub GetWxBitmapType {
+    my ( $self, $type ) = @_;
+    
+    $self->{IMGTYPE}->{$type};
+}
+
+
+sub ResizeImage {
+    my ( $self, $image_file, $image_file_out, $type, $ratio, $width, $height, $quality ) = @_;
+   
+
+    my $image = Wx::Image->new(
+            $image_file, 
+            $self->GetWxBitmapType($type),
+            0
+    );
+    
+    my $w;
+    my $h;
+
+    my $img_w = $image->GetWidth;
+    my $img_h = $image->GetHeight;
+    
+    # use a ratio ( 25% default ) if defined
+    # default ratio is used for preview.
+    if($ratio){
+    	$w = $ratio*$img_w/100 ;
+        $h = $ratio*$img_h/100 ;
+    }
+    # use specified width and height
+    else{
+        # portrait
+        if( $img_w < $img_h ){
+            $w = $height;
+        }
+        else{
+            $w = $width;
+        }
+        # to respect aspect ratio
+        $h = sprintf(
+            "%.0f",
+            ($w*$img_h)/$img_w
+        );
+    }
+
+    $image->Rescale(
+        $w,
+        $h,
+        wxIMAGE_QUALITY_HIGH
+    );
+    
+    $quality ||= 90;
+    
+    $image->SetOption( 
+        "quality", 
+        $quality 
+    );
+    
+    if(!$image->SaveFile(
+        $image_file_out,
+        $self->GetWxBitmapType($type),
+    )){
+    	Wx::LogMessage(
+    	    "An error has occured. Can not save file %s",
+    	    $image_file_out,
+    	)
+    };
+}
+
+sub _init_frame {
+    my ( $self ) = @_ ;	
+
+    my $config = Wx::ConfigBase::Get;
+
+    my $x = $config->ReadInt( "X", 50 );
+    my $y = $config->ReadInt( "Y", 50 );
+    my $w = $config->ReadInt( "Width", 1024 );
+    my $h = $config->ReadInt( "height", 768 );
+    my $sv = $config->ReadInt( "splitVertical", 150 );
+    my $sh = $config->ReadInt( "splitHorizontal", 300 );
+	
+    my $url;
+    if($self->pwg->login_result->{stat} eq 'ok'){
+        $url = $self->site_url;    
+    }
+    else{
+        $url = gettext("Not connected");
+        Wx::MessageBox( 
+            sprintf(
+                "%s\n\n%s %s %s",
+                $self->pwg->login_result->{message},
+                gettext("Connection to"),
+                $self->site_url,
+                gettext("failed"),
+            ),
+            gettext("Piwigo login error"),
+            wxOK | wxICON_EXCLAMATION, 
+        );
+    }	
+    	
+
+    my ( $frame ) = Uploader::GUI::wxFrameAUI->new( 
+        {
+            x         => $x,
+            y         => $y,
+            width     => $w,
+            height    => $h,
+            title     => "pLoader - Piwigo uploader 2.0.0b - [$url]" ,
+            pwg       => $self->pwg,
+            imagelist => $self->imagelist,
+        }
+    );
+	
+	#printf("Config x %s, y %s, w %s, h %s\n", $x, $y, $w, $h);
+	#$frame->SetSize( $x, $y, $w, $h );
+    $frame->Show( 1 );
+    $self->SetTopWindow( $frame );
+
+    my $icon = Wx::Icon->new();
+    $icon->LoadFile('../res/favicon.ico', wxBITMAP_TYPE_ICO);
+    $frame->SetIcon($icon);	
+
+
+    return 1;
+}
+
+
+sub _readParams {
+	my( $self, $file ) = @_ ;
+
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params ; " ;
+		eval $expr ;
+	}
+	
+	return unless 'ARRAY' eq ref $paramValues ;
+	
+	if(scalar(@$paramValues )){
+	    my $params = $paramValues->[0] ;
+	    $self->SetKeyValues($params);
+	}
+}
+
+sub _readParams2 {
+	my( $self, $file ) = @_ ;
+
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params ; " ;
+		eval $expr ;
+	}
+	
+	return unless 'HASH' eq ref $paramValues ;
+	
+	$self->SetKeyValues($paramValues);
+}
+
+
+sub SetKeyValues {
+    my ( $self, $params )= @_;	
+
+    foreach( keys %$params ) {
+        $self->{$_} = $params->{$_} ;
+    }
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxExportJobsDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxExportJobsDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxExportJobsDlg.pm	(revision 3291)
@@ -0,0 +1,221 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxExportJobsDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+#use TDSC::GUI::export_dlg;
+use Wx::Event qw/
+                    EVT_CHECKLISTBOX
+                    EVT_RADIOBOX
+                    EVT_BUTTON
+                    EVT_UPDATE_UI
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           clbjobs
+           rbolanguage
+           output_path
+           language
+           btok
+           jobs
+      / 
+);
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::DSExportJobs($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->clbjobs( $self->FindWindow($main::ID_EXPORT_JOBS) );
+    $self->rbolanguage( $self->FindWindow($main::ID_LANGUAGE) );
+    $self->btok( $self->FindWindow($main::ID_EXPORT_OK) );
+    
+
+    # Undefined is default and hidden : no default language choice
+    $self->rbolanguage->SetSelection(2);
+    $self->rbolanguage->Show(2, 0);
+    
+    
+
+    $self->clbjobs->InsertItems( $params->{jobs}, 0 );
+    $self->_restorePrevValues( $params );
+    
+    $self;    
+}
+
+sub _restorePrevValues {
+    my ( $self, $params ) = @_;
+    
+    if ( defined( $params->{prevjobs} ) ){
+        my $selected = {};
+        map {
+            $selected->{$_} = 1;
+        }
+        @{$params->{prevjobs}};
+        
+        # restore prev export selection
+        for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+          if($selected->{$self->clbjobs->GetString($i)}){
+              $self->clbjobs->Check($i, 1);
+          }
+        }    	
+        $self->jobs( $params->{prevjobs} );
+    }
+    else {
+        $self->jobs( [] );	
+    }
+    
+    if ( defined( $params->{output_path} ) ){
+        $self->output_path( $params->{output_path} );
+    }	
+
+    if ( defined( $params->{language} ) ){
+        $self->language( $params->{language} );
+    }
+    else {
+    	# Undefined
+        $self->language( 2 );
+    }
+
+}
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_SELECT_ALL, \&OnSelectAll );
+    EVT_BUTTON( $self, $main::ID_REVERSE_SEL, \&OnReverseSelection );
+    EVT_BUTTON( $self, $main::ID_EXPORT_OK, \&OnExportOK );
+    EVT_BUTTON( $self, $main::ID_EXPORT_CANCEL, \&OnExportCancel );
+    EVT_BUTTON( $self, $main::ID_EXPORT_DIRDIALOG, \&OnExportDirDialog );
+    EVT_CHECKLISTBOX($self, $main::ID_EXPORT_JOBS, \&OnCheckListBox ) ;
+    EVT_RADIOBOX($self, $main::ID_LANGUAGE, \&OnRadioBox ) ;
+    
+    EVT_UPDATE_UI( $self, $self, \&OnUpdateUI ) ;   
+	
+}
+
+# UI context management
+sub OnUpdateUI {
+    my ( $self, $event ) = @_;
+    
+    $self->FindWindow($main::ID_EXPORT_DIRECTORY)->SetValue( $self->output_path );
+    $self->FindWindow($main::ID_LANGUAGE)->SetSelection( $self->language );
+    
+    # Enable OK if required properties are set
+    $self->btok->Enable(1) if (
+        defined $self->output_path &&
+        2 != $self->rbolanguage->GetSelection &&
+        scalar @{$self->jobs}
+    );
+	
+}
+
+sub OnRadioBox {
+    my ( $self, $event ) = @_;
+
+    $self->language($event->GetInt);
+}
+
+sub OnCheckListBox {
+    my ( $self, $event ) = @_;
+    
+    $self->SelectedJobs();
+}
+
+sub OnExportDirDialog {
+    my ( $self, $event ) = @_;
+
+    my $dialog = Wx::DirDialog->new( $self );
+
+    if( $dialog->ShowModal == wxID_CANCEL ) {
+        Wx::LogMessage( "User cancelled the dialog" );
+    } else {
+        Wx::LogMessage( "Export directory: %s", $dialog->GetPath );
+        $self->output_path( $dialog->GetPath );
+    }
+
+    $dialog->Destroy;
+	
+}
+
+sub OnExportOK {
+    my ( $self, $event ) = @_;
+    
+    $self->EndModal(wxID_OK);
+ 
+}
+
+sub OnExportCancel {
+    my ( $self, $event ) = @_;
+    
+    $self->EndModal(wxID_CANCEL);
+}
+
+sub OnSelectAll {
+    my ( $self, $event ) = @_;
+    
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+      $self->clbjobs->Check($i, 1) if !$self->clbjobs->IsChecked($i);	
+    }	
+    $self->SelectedJobs();
+}
+
+sub OnReverseSelection {
+    my ( $self, $event ) = @_;
+    
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+      if($self->clbjobs->IsChecked($i)){
+          $self->clbjobs->Check($i, 0);
+      }
+      else{
+          $self->clbjobs->Check($i, 1);
+      }	
+    }
+    $self->SelectedJobs();
+}
+
+
+sub SelectedJobs {
+    my ( $self ) = @_;
+
+    my $jobs = [];
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+        if($self->clbjobs->IsChecked($i)){
+            push @$jobs, $self->clbjobs->GetString($i);
+        }
+    }
+    $self->jobs( $jobs );	
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxExportProgressDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxExportProgressDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxExportProgressDlg.pm	(revision 3291)
@@ -0,0 +1,102 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxExportProgressDlg;
+use strict;
+use Carp;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           gauge
+           progress
+           processing
+           txtprocessing
+           cancelled
+      / 
+);
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::ProcessingProgress($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PROGRESS_OK) );
+    $self->gauge( $self->FindWindow($main::ID_PROGRESS_GAUGE) );
+    $self->txtprocessing( $self->FindWindow($main::ID_PROGRESS_TXT) );
+    $self->gauge->SetForegroundColour(wxGREEN);
+      
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PROGRESS_OK, \&OnExportOK );
+    
+	
+}
+
+# Update progress information
+sub LogProgress {
+    my ( $self ) = @_;
+
+printf("$self cancelled %s \n", $self->cancelled);
+    die if $self->cancelled;    
+    $self->txtprocessing->SetLabel(
+        $text || $self->processing
+    );
+    $self->gauge->SetValue(
+        $value || $self->progress
+    );
+
+}
+
+# Close the dialog. cancel export
+sub OnExportOK {
+    my ( $self, $event ) = @_;
+    
+    $self->cancelled(1);
+    $self->Destroy;
+ 
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxFrameAUI.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxFrameAUI.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxFrameAUI.pm	(revision 3291)
@@ -0,0 +1,1501 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxFrameAUI;
+use strict;
+use Carp;
+use Wx;
+use Wx::DND;
+use Wx qw/
+             wxID_OK
+             wxDEFAULT_FRAME_STYLE
+             wxVERTICAL
+             wxGROW
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_GIF
+             wxBITMAP_TYPE_PNG
+             wxTB_FLAT
+             wxSIZE
+             wxWHITE
+             wxBLACK
+             wxID_CANCEL
+             wxFD_OPEN
+             wxFD_MULTIPLE
+             wxLI_HORIZONTAL
+             wxALIGN_CENTER_VERTICAL
+             wxALL
+             wxDefaultPosition
+             wxDefaultSize
+             wxTheApp
+             wxIMAGE_LIST_NORMAL
+             wxAUI_NB_TAB_MOVE
+             wxAUI_NB_TAB_SPLIT
+             wxNO_BORDER
+             wxTE_MULTILINE
+             wxTE_READONLY
+             wxITEM_NORMAL 
+             wxCLIP_CHILDREN
+             wxBORDER_NONE
+             wxNullBitmap 
+             wxTR_MULTIPLE
+             wxTR_EXTENDED
+             wxTR_HIDE_ROOT
+             wxTR_HAS_BUTTONS
+             wxMAXIMIZE
+             wxOK
+             wxICON_EXCLAMATION
+             wxICON_INFORMATION
+             WXK_DELETE
+             wxLANGUAGE_ABKHAZIAN   
+             wxLANGUAGE_AFAR   
+             wxLANGUAGE_AFRIKAANS   
+             wxLANGUAGE_ALBANIAN   
+             wxLANGUAGE_AMHARIC   
+             wxLANGUAGE_ARABIC   
+             wxLANGUAGE_ARABIC_ALGERIA   
+             wxLANGUAGE_ARABIC_BAHRAIN   
+             wxLANGUAGE_ARABIC_EGYPT   
+             wxLANGUAGE_ARABIC_IRAQ   
+             wxLANGUAGE_ARABIC_JORDAN   
+             wxLANGUAGE_ARABIC_KUWAIT   
+             wxLANGUAGE_ARABIC_LEBANON   
+             wxLANGUAGE_ARABIC_LIBYA   
+             wxLANGUAGE_ARABIC_MOROCCO   
+             wxLANGUAGE_ARABIC_OMAN   
+             wxLANGUAGE_ARABIC_QATAR   
+             wxLANGUAGE_ARABIC_SAUDI_ARABIA   
+             wxLANGUAGE_ARABIC_SUDAN   
+             wxLANGUAGE_ARABIC_SYRIA   
+             wxLANGUAGE_ARABIC_TUNISIA   
+             wxLANGUAGE_ARABIC_UAE   
+             wxLANGUAGE_ARABIC_YEMEN   
+             wxLANGUAGE_ARMENIAN   
+             wxLANGUAGE_ASSAMESE   
+             wxLANGUAGE_AYMARA   
+             wxLANGUAGE_AZERI   
+             wxLANGUAGE_AZERI_CYRILLIC   
+             wxLANGUAGE_AZERI_LATIN   
+             wxLANGUAGE_BASHKIR   
+             wxLANGUAGE_BASQUE   
+             wxLANGUAGE_BELARUSIAN   
+             wxLANGUAGE_BENGALI   
+             wxLANGUAGE_BHUTANI   
+             wxLANGUAGE_BIHARI   
+             wxLANGUAGE_BISLAMA   
+             wxLANGUAGE_BRETON   
+             wxLANGUAGE_BULGARIAN   
+             wxLANGUAGE_BURMESE   
+             wxLANGUAGE_CAMBODIAN   
+             wxLANGUAGE_CATALAN   
+             wxLANGUAGE_CHINESE   
+             wxLANGUAGE_CHINESE_SIMPLIFIED   
+             wxLANGUAGE_CHINESE_TRADITIONAL   
+             wxLANGUAGE_CHINESE_HONGKONG   
+             wxLANGUAGE_CHINESE_MACAU   
+             wxLANGUAGE_CHINESE_SINGAPORE   
+             wxLANGUAGE_CHINESE_TAIWAN   
+             wxLANGUAGE_CORSICAN   
+             wxLANGUAGE_CROATIAN   
+             wxLANGUAGE_CZECH   
+             wxLANGUAGE_DANISH   
+             wxLANGUAGE_DUTCH   
+             wxLANGUAGE_DUTCH_BELGIAN   
+             wxLANGUAGE_ENGLISH   
+             wxLANGUAGE_ENGLISH_UK   
+             wxLANGUAGE_ENGLISH_US   
+             wxLANGUAGE_ENGLISH_AUSTRALIA   
+             wxLANGUAGE_ENGLISH_BELIZE   
+             wxLANGUAGE_ENGLISH_BOTSWANA   
+             wxLANGUAGE_ENGLISH_CANADA   
+             wxLANGUAGE_ENGLISH_CARIBBEAN   
+             wxLANGUAGE_ENGLISH_DENMARK   
+             wxLANGUAGE_ENGLISH_EIRE   
+             wxLANGUAGE_ENGLISH_JAMAICA   
+             wxLANGUAGE_ENGLISH_NEW_ZEALAND   
+             wxLANGUAGE_ENGLISH_PHILIPPINES   
+             wxLANGUAGE_ENGLISH_SOUTH_AFRICA   
+             wxLANGUAGE_ENGLISH_TRINIDAD   
+             wxLANGUAGE_ENGLISH_ZIMBABWE   
+             wxLANGUAGE_ESPERANTO   
+             wxLANGUAGE_ESTONIAN   
+             wxLANGUAGE_FAEROESE   
+             wxLANGUAGE_FARSI   
+             wxLANGUAGE_FIJI   
+             wxLANGUAGE_FINNISH   
+             wxLANGUAGE_FRENCH   
+             wxLANGUAGE_FRENCH_BELGIAN   
+             wxLANGUAGE_FRENCH_CANADIAN   
+             wxLANGUAGE_FRENCH_LUXEMBOURG   
+             wxLANGUAGE_FRENCH_MONACO   
+             wxLANGUAGE_FRENCH_SWISS   
+             wxLANGUAGE_FRISIAN   
+             wxLANGUAGE_GALICIAN   
+             wxLANGUAGE_GEORGIAN   
+             wxLANGUAGE_GERMAN   
+             wxLANGUAGE_GERMAN_AUSTRIAN   
+             wxLANGUAGE_GERMAN_BELGIUM   
+             wxLANGUAGE_GERMAN_LIECHTENSTEIN   
+             wxLANGUAGE_GERMAN_LUXEMBOURG   
+             wxLANGUAGE_GERMAN_SWISS   
+             wxLANGUAGE_GREEK   
+             wxLANGUAGE_GREENLANDIC   
+             wxLANGUAGE_GUARANI   
+             wxLANGUAGE_GUJARATI   
+             wxLANGUAGE_HAUSA   
+             wxLANGUAGE_HEBREW   
+             wxLANGUAGE_HINDI   
+             wxLANGUAGE_HUNGARIAN   
+             wxLANGUAGE_ICELANDIC   
+             wxLANGUAGE_INDONESIAN   
+             wxLANGUAGE_INTERLINGUA   
+             wxLANGUAGE_INTERLINGUE   
+             wxLANGUAGE_INUKTITUT   
+             wxLANGUAGE_INUPIAK   
+             wxLANGUAGE_IRISH   
+             wxLANGUAGE_ITALIAN   
+             wxLANGUAGE_ITALIAN_SWISS   
+             wxLANGUAGE_JAPANESE   
+             wxLANGUAGE_JAVANESE   
+             wxLANGUAGE_KANNADA   
+             wxLANGUAGE_KASHMIRI   
+             wxLANGUAGE_KASHMIRI_INDIA   
+             wxLANGUAGE_KAZAKH   
+             wxLANGUAGE_KERNEWEK   
+             wxLANGUAGE_KINYARWANDA   
+             wxLANGUAGE_KIRGHIZ   
+             wxLANGUAGE_KIRUNDI   
+             wxLANGUAGE_KONKANI   
+             wxLANGUAGE_KOREAN   
+             wxLANGUAGE_KURDISH   
+             wxLANGUAGE_LAOTHIAN   
+             wxLANGUAGE_LATIN   
+             wxLANGUAGE_LATVIAN   
+             wxLANGUAGE_LINGALA   
+             wxLANGUAGE_LITHUANIAN   
+             wxLANGUAGE_MACEDONIAN   
+             wxLANGUAGE_MALAGASY   
+             wxLANGUAGE_MALAY   
+             wxLANGUAGE_MALAYALAM   
+             wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM   
+             wxLANGUAGE_MALAY_MALAYSIA   
+             wxLANGUAGE_MALTESE   
+             wxLANGUAGE_MANIPURI   
+             wxLANGUAGE_MAORI   
+             wxLANGUAGE_MARATHI   
+             wxLANGUAGE_MOLDAVIAN   
+             wxLANGUAGE_MONGOLIAN   
+             wxLANGUAGE_NAURU   
+             wxLANGUAGE_NEPALI   
+             wxLANGUAGE_NEPALI_INDIA   
+             wxLANGUAGE_NORWEGIAN_BOKMAL   
+             wxLANGUAGE_NORWEGIAN_NYNORSK   
+             wxLANGUAGE_OCCITAN   
+             wxLANGUAGE_ORIYA   
+             wxLANGUAGE_OROMO   
+             wxLANGUAGE_PASHTO   
+             wxLANGUAGE_POLISH   
+             wxLANGUAGE_PORTUGUESE   
+             wxLANGUAGE_PORTUGUESE_BRAZILIAN   
+             wxLANGUAGE_PUNJABI   
+             wxLANGUAGE_QUECHUA   
+             wxLANGUAGE_RHAETO_ROMANCE   
+             wxLANGUAGE_ROMANIAN   
+             wxLANGUAGE_RUSSIAN   
+             wxLANGUAGE_RUSSIAN_UKRAINE   
+             wxLANGUAGE_SAMI   
+             wxLANGUAGE_SAMOAN   
+             wxLANGUAGE_SANGHO   
+             wxLANGUAGE_SANSKRIT   
+             wxLANGUAGE_SCOTS_GAELIC   
+             wxLANGUAGE_SERBIAN   
+             wxLANGUAGE_SERBIAN_CYRILLIC   
+             wxLANGUAGE_SERBIAN_LATIN   
+             wxLANGUAGE_SERBO_CROATIAN   
+             wxLANGUAGE_SESOTHO   
+             wxLANGUAGE_SETSWANA   
+             wxLANGUAGE_SHONA   
+             wxLANGUAGE_SINDHI   
+             wxLANGUAGE_SINHALESE   
+             wxLANGUAGE_SISWATI   
+             wxLANGUAGE_SLOVAK   
+             wxLANGUAGE_SLOVENIAN   
+             wxLANGUAGE_SOMALI   
+             wxLANGUAGE_SPANISH   
+             wxLANGUAGE_SPANISH_ARGENTINA   
+             wxLANGUAGE_SPANISH_BOLIVIA   
+             wxLANGUAGE_SPANISH_CHILE   
+             wxLANGUAGE_SPANISH_COLOMBIA   
+             wxLANGUAGE_SPANISH_COSTA_RICA   
+             wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC   
+             wxLANGUAGE_SPANISH_ECUADOR   
+             wxLANGUAGE_SPANISH_EL_SALVADOR   
+             wxLANGUAGE_SPANISH_GUATEMALA   
+             wxLANGUAGE_SPANISH_HONDURAS   
+             wxLANGUAGE_SPANISH_MEXICAN   
+             wxLANGUAGE_SPANISH_MODERN   
+             wxLANGUAGE_SPANISH_NICARAGUA   
+             wxLANGUAGE_SPANISH_PANAMA   
+             wxLANGUAGE_SPANISH_PARAGUAY   
+             wxLANGUAGE_SPANISH_PERU   
+             wxLANGUAGE_SPANISH_PUERTO_RICO   
+             wxLANGUAGE_SPANISH_URUGUAY   
+             wxLANGUAGE_SPANISH_US   
+             wxLANGUAGE_SPANISH_VENEZUELA   
+             wxLANGUAGE_SUNDANESE   
+             wxLANGUAGE_SWAHILI   
+             wxLANGUAGE_SWEDISH   
+             wxLANGUAGE_SWEDISH_FINLAND   
+             wxLANGUAGE_TAGALOG   
+             wxLANGUAGE_TAJIK   
+             wxLANGUAGE_TAMIL   
+             wxLANGUAGE_TATAR   
+             wxLANGUAGE_TELUGU   
+             wxLANGUAGE_THAI   
+             wxLANGUAGE_TIBETAN   
+             wxLANGUAGE_TIGRINYA   
+             wxLANGUAGE_TONGA   
+             wxLANGUAGE_TSONGA   
+             wxLANGUAGE_TURKISH   
+             wxLANGUAGE_TURKMEN   
+             wxLANGUAGE_TWI   
+             wxLANGUAGE_UIGHUR   
+             wxLANGUAGE_UKRAINIAN   
+             wxLANGUAGE_URDU   
+             wxLANGUAGE_URDU_INDIA   
+             wxLANGUAGE_URDU_PAKISTAN   
+             wxLANGUAGE_UZBEK   
+             wxLANGUAGE_UZBEK_CYRILLIC   
+             wxLANGUAGE_UZBEK_LATIN   
+             wxLANGUAGE_VALENCIAN   
+             wxLANGUAGE_VIETNAMESE   
+             wxLANGUAGE_VOLAPUK   
+             wxLANGUAGE_WELSH   
+             wxLANGUAGE_WOLOF   
+             wxLANGUAGE_XHOSA   
+             wxLANGUAGE_YIDDISH   
+             wxLANGUAGE_YORUBA   
+             wxLANGUAGE_ZHUANG   
+             wxLANGUAGE_ZULU  
+         /;
+use base qw/Wx::Frame Class::Accessor::Fast/;
+use File::Spec;
+use Wx::Locale qw/:default/;
+
+
+my @properties = 
+    qw/
+          progressdlg
+          upload_progressdlg
+          imageviewer
+          tree
+          tree_root
+          treeimglist
+          tree_item_default
+          topsizer
+          pwg
+          manager
+          logwnd
+          oldlogwnd
+          htmlhome
+          notebook
+          categories
+          imagelist
+          image_prop_general
+          image_prop_exif
+          notebook_image_properties
+          notebook_global_settings
+          global_settings_panel
+      /;
+__PACKAGE__->mk_accessors( @properties );
+
+use Wx::Event 
+    qw/
+          EVT_MENU
+          EVT_TREE_SEL_CHANGED
+          EVT_CLOSE 
+          EVT_LIST_END_LABEL_EDIT
+          EVT_LIST_ITEM_SELECTED
+          EVT_TREE_ITEM_RIGHT_CLICK
+          EVT_LIST_KEY_DOWN       
+      /;
+      
+use Uploader::GUI::wxImageListCtrl;
+use Uploader::GUI::wxImageProcessingProgressDlg;
+use Wx::Html;
+use Uploader::GUI::wxHtmlWindow;
+use Data::Dumper;
+use Wx::AUI;
+use Storable;
+use Uploader::GUI::wxPhotoPropertiesPanel;
+use Uploader::GUI::wxPhotoExifPanel;
+use Uploader::GUI::wxGlobalSettingsPanel;
+use Encode qw/encode decode is_utf8/;
+
+$|=1;
+
+my $ID_TREE_CTX_MENU = 20000 ;
+
+sub new {
+  my( $class, $params ) = @_;
+  my( $self ) = $class->SUPER::new( 
+                                      undef, 
+                                      -1, 
+                                      $params->{title}, 
+                                      [ $params->{x}, $params->{y} ],
+                                      [ $params->{width}, $params->{height} ],
+                                      wxDEFAULT_FRAME_STYLE|wxMAXIMIZE
+                                   );
+    $self->pwg( $params->{pwg} );
+    $self->imagelist( $params->{imagelist} );
+
+    # callback for GUI refresh : add thumbnail images to the imageviewer control
+    $self->imagelist->SetNewFilesViewerRefreshCallback(
+        sub { $self->SetNewFilesViewerRefresh(@_) }
+    );
+
+    # callback for GUI refresh : progress dialog display of thumbnail image being created
+    $self->imagelist->SetNewFilesProgressCallback(
+        sub { $self->SetNewFilesProgress(@_) }
+    );
+
+    $self->imagelist->SetNewFilesDisplayEndInfoCallback(
+        sub { $self->SetNewFilesDisplayEndInfo(@_) }
+    );
+
+
+    # callback for GUI refresh : remove thumbnail images from imageviewer control
+    $self->imagelist->UploadImagesViewerCallback(
+        sub { $self->UploadImagesViewerRefresh(@_) }
+    );
+
+
+
+    # callback for GUI refresh : progress dialog display current uploaded image
+    $self->imagelist->progress_thumbnail_refresh(
+        sub { $self->UploadProgressThumbnailRefresh(@_) }
+    );
+
+    $self->imagelist->progress_msg_refresh(
+        sub { $self->UploadProgressMessageRefresh(@_) }
+    );
+
+
+    $self->imagelist->progressbar_refresh(
+        sub { $self->UploadProgressBarRefresh(@_) }
+    );
+    
+    $self->imagelist->progress_endinfo_refresh(
+        sub { $self->UploadDisplayEndInfo(@_) }
+    );
+
+
+    $self->imagelist->pwg(
+        $self->pwg
+    );
+
+    $self->imagelist->categories(
+        []
+    );
+
+    $self->manager( Wx::AuiManager->new );
+    $self->manager->SetManagedWindow( $self );
+
+    $self->_initFrame;
+    $self->_InitEventHandlers;
+    $self->_initImgTypes;   
+   
+    $self;
+}
+
+sub _initImgTypes {
+    my ( $self ) = @_;
+
+    $self->{IMGTYPE} = {
+             'jpg' => wxBITMAP_TYPE_JPEG,
+             'gif' => wxBITMAP_TYPE_GIF,
+             'png' => wxBITMAP_TYPE_PNG,
+    };
+}
+
+
+sub GetWxBitmapType {
+    my ( $self, $type ) = @_;
+    
+    $self->{IMGTYPE}->{$type};
+}
+
+sub _refreshFrame {
+    my ( $self ) = @_;
+    
+    $self->_destroy_settings_panels;
+    $self->manager->Update;
+    
+    $self->_init_settings_panels;
+    $self->_init_aui_settings_panels;
+
+    $self->manager->Update;
+}
+
+sub _destroy_settings_panels {
+    my ( $self ) = @_;
+
+
+
+    map {
+        $self->manager->DetachPane(
+            $_
+        );
+        $_->Show(0);
+        $_->Destroy;
+    }(
+        $self->notebook_global_settings,
+        $self->notebook_image_properties,
+    );
+}
+
+# 
+sub _initFrame {
+    my ( $self ) = @_;
+    
+ 
+    $self->init_panels;
+
+    $self->imageviewer->Show(0);
+
+    $self->init_aui;
+    $self->init_dnd_targets;
+
+    if( $self->imagelist->wx_thumb_imglist->GetImageCount){
+    	$self->ShowImageViewer;
+        
+        $self->imageviewer->Refresh(
+            $self->imagelist->wx_thumb_imglist
+        );
+    }
+
+}
+
+sub _init_settings_panels {
+    my ( $self ) = @_;	
+
+    $self->global_settings_panel(
+        $self->create_global_settings_panel()
+    );    
+    
+    $self->global_settings_panel->Show(0);
+
+    $self->image_prop_general(
+        Uploader::GUI::wxPhotoPropertiesPanel->new( 
+            { 
+                parentwnd => $self,
+                accessors => {
+                	          $main::ID_PHOTO =>
+                	              sub {
+                                            Wx::Bitmap->new( 
+                                                $self->imagelist->current_image->wx_thumb_file, 
+                                                $self->GetWxBitmapType($self->imagelist->type), 
+                                            );
+                	              }, 
+                	          $main::ID_PHOTO_NAME =>
+                	              sub { $self->imagelist->current_image->site_name(@_) }, 
+
+                	          $main::ID_PHOTO_CREATE_DATE =>
+                	              sub { $self->imagelist->current_image->create_date(@_) }, 
+                                  
+                                  $main::ID_PHOTO_COMMENT =>
+                	              sub { $self->imagelist->current_image->site_comment(@_) }, 
+                                  
+                                  $main::ID_PHOTO_AUTHOR =>
+                	              sub { $self->imagelist->current_image->site_author(@_) }, 
+                             },
+                frame_callbacks => { 
+                  	              $main::ID_PHOTO_NAME =>
+                                          sub {
+                                              $self->imageviewer->Refresh();
+                                          },
+                	           },
+            }
+        )
+    );
+
+    $self->image_prop_general->Show(0);
+
+        
+    $self->image_prop_exif(
+        Uploader::GUI::wxPhotoExifPanel->new( 
+            { 
+                parentwnd => $self,
+                frame_callback => sub { 
+                                      $self->imageviewer->Refresh();
+                	          },
+                accessors => {
+                	          $main::ID_EXIF_CREATE_DATE =>
+                	              sub { $self->imagelist->current_image->create_date }, 
+                	          $main::ID_EXIF_MODEL =>
+                	              sub { $self->imagelist->current_image->exif_tag('Model') }, 
+                	          $main::ID_EXIF_WIDTH =>
+                	              sub { $self->imagelist->current_image->exif_tag('ImageWidth') }, 
+                	          $main::ID_EXIF_HEIGHT =>
+                	              sub { $self->imagelist->current_image->exif_tag('ImageHeight') }, 
+                	          $main::ID_EXIF_ORIENTATION =>
+                	              sub { $self->imagelist->current_image->exif_tag('Orientation') }, 
+                	          $main::ID_EXIF_ISO =>
+                	              sub { $self->imagelist->current_image->exif_tag('ISO') }, 
+                	          $main::ID_EXIF_SHUTTER_SPEED =>
+                	              sub { $self->imagelist->current_image->exif_tag('ExposureTime') }, 
+                	          $main::ID_EXIF_APERTURE =>
+                	              sub { $self->imagelist->current_image->exif_tag('ApertureValue') }, 
+                	          $main::ID_EXIF_FOCAL_LENGTH =>
+                	              sub { $self->imagelist->current_image->exif_tag('FocalLength') }, 
+                	          $main::ID_EXIF_LENS =>
+                	              sub { $self->imagelist->current_image->exif_tag('Lens') }, 
+                             },
+            }
+        )
+    );
+    
+    $self->image_prop_exif->Show(0);
+	
+}
+
+sub init_panels {
+    my ( $self ) = @_;	
+
+    $self->htmlhome(
+        Uploader::GUI::wxHtmlWindow->new(
+            $self, -1
+        )
+    );
+    
+    $self->imageviewer(
+        Uploader::GUI::wxImageListCtrl->new( 
+            { 
+                parentwnd => $self,
+                imagelist => $self->imagelist,
+            }
+        )
+    );
+    
+    $self->_init_settings_panels;	
+}
+
+sub init_dnd_targets {
+    my ( $self ) = @_;	
+
+    $self->imageviewer->SetDropTarget( 
+        DNDImageListDropTarget->new(
+            $self->imageviewer 
+        ) 
+    );
+    $self->htmlhome->SetDropTarget( 
+        DNDImageListDropTarget->new( 
+            $self->imageviewer 
+        ) 
+    );
+
+
+    $self->tree->SetDropTarget( 
+        DNDCategoryTreeDropTarget->new(
+            $self->tree
+        )
+    );
+	
+}
+
+sub init_aui {
+    my ( $self ) = @_;	
+
+    $self->manager->AddPane
+      ( $self->create_notebook_imagelist, Wx::AuiPaneInfo->new->Name( "ImageViewer" )
+        ->CenterPane->Resizable->CloseButton(0) );
+
+    $self->manager->AddPane
+      ( $self->create_tree, Wx::AuiPaneInfo->new->Name( "categories" )->Caption(
+          sprintf("%s - %s", gettext("Piwigo categories"), wxTheApp->site_url )
+      )
+        ->Right->Position( 0 )->Resizable->CloseButton(0) );
+
+    $self->_init_aui_settings_panels;
+
+    my $tb = $self->create_toolbar;
+
+    $self->manager->AddPane
+      ( $tb, Wx::AuiPaneInfo->new->Name( "tb1" )->Caption( gettext("Tools") )
+        ->ToolbarPane->Top->Row( 1 )->LeftDockable( 0 )->RightDockable( 0 ) ) if defined $tb;
+
+    $self->manager->Update;
+
+}
+
+sub _init_aui_settings_panels {
+    my ( $self ) = @_;	
+
+    $self->manager->AddPane
+      ( $self->create_notebook_image_properties, Wx::AuiPaneInfo->new->Name( "photo_properties" )->Caption(gettext("Photo properties"))
+        ->Right->Position( 1 )->Resizable->CloseButton(0) );
+
+    $self->manager->AddPane
+      ( $self->create_notebook_global_settings, Wx::AuiPaneInfo->new->Name( "global_settings" )
+        ->Right->Position( 2 )->Resizable->CloseButton(1) );
+	
+}
+
+sub OnGlobalSettings {
+    my ( $self ) = @_;
+
+    $self->manager->GetPane("global_settings")->Show(1);
+    $self->manager->Update();    
+}
+
+sub OnChooseLanguage {
+    my ( $self ) = @_;	
+
+  my $languages = [
+             ['Dutch', wxLANGUAGE_DUTCH, ],   
+             ['English', wxLANGUAGE_ENGLISH, ],   
+             ['French', wxLANGUAGE_FRENCH, ],   
+             ['German', wxLANGUAGE_GERMAN, ],   
+             ['Italian', wxLANGUAGE_ITALIAN, ],   
+             ['Polish', wxLANGUAGE_POLISH, ],   
+             ['Portuguese', wxLANGUAGE_PORTUGUESE, ],   
+             ['Russian', wxLANGUAGE_RUSSIAN, ],   
+             ['Spanish', wxLANGUAGE_SPANISH, ],   
+  ];
+
+  my $dialog = new Wx::SingleChoiceDialog
+    ( undef, gettext( "Choose a language" ), gettext( "Choose a language" ),
+      [ map { Wx::GetTranslation( ${$_}[0] ) } @$languages ] );
+
+  if( $dialog->ShowModal() == wxID_OK ) {
+    wxTheApp->current_language(
+        $languages->[$dialog->GetSelection][1]
+    );
+    wxTheApp->init_locale();
+    $self->_refreshFrame;
+  }
+
+  $dialog->Destroy;
+
+}
+
+
+sub create_notebook_imagelist {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [300, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->htmlhome, 
+            gettext("Photo selection"),
+            '../res/images.png', 
+            wxBITMAP_TYPE_PNG,
+        ],
+        #[
+        #    $self->logwnd( $self->_create_textctrl( $book, undef, [450, 450] )),
+        #    "Log",
+        #    '../res/nb_log.png', 
+        #    wxBITMAP_TYPE_PNG,
+        #]
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    #$self->logwnd(Wx::LogTextCtrl->new( $self->logwnd ));
+    #$self->oldlogwnd( Wx::Log::SetActiveTarget( $self->logwnd ) );
+    $self->notebook($book);
+    return $book;
+}
+
+sub create_notebook_image_properties {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [450, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->image_prop_general, 
+            "Piwigo",
+        ],
+        [
+            $self->image_prop_exif, 
+            "Exif",
+        ],
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    $self->notebook_image_properties($book);
+
+    return $book;
+}
+
+sub create_notebook_global_settings {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [450, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->global_settings_panel, 
+            gettext("Global settings"),
+        ],
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    $self->notebook_global_settings($book);
+
+    return $book;
+}
+
+sub create_global_settings_panel {
+    my ( $self ) = @_;
+
+    Uploader::GUI::wxGlobalSettingsPanel->new( 
+            { 
+                parentwnd => $self,
+                accessors => {
+                	          $main::ID_GLOBAL_NAME_PREFIX =>
+                	              sub { $self->imagelist->default_name_prefix(@_) }, 
+                	          $main::ID_GLOBAL_AUTHOR =>
+                	              sub { $self->imagelist->author(@_) }, 
+                	          $main::ID_GLOBAL_THUMB_SIZE => 
+                	              sub { $self->imagelist->thumb_size(@_) }, 
+                	          $main::ID_GLOBAL_RESIZED_W =>
+                	              sub { $self->imagelist->resize_w(@_) }, 
+                	          $main::ID_GLOBAL_RESIZED_H =>
+                	              sub { $self->imagelist->resize_h(@_) },
+                	          $main::ID_GLOBAL_HIGH =>
+                	              sub { $self->imagelist->upload_high(@_)}, 
+                             },
+                frame_callbacks => { 
+                	           },
+            }
+        );
+}
+
+sub create_tree {
+    my ( $self ) = @_;
+
+    my $images = [
+        map {
+            Wx::Bitmap->new( $_, wxBITMAP_TYPE_PNG )
+        	
+        }
+        (
+          '../res/tree_pwg.png',
+          '../res/tree_folder.png',
+        )    
+    ];
+
+    $self->treeimglist( Wx::ImageList->new( 16, 16, 1 ) );
+    map {
+    	$self->treeimglist->Add($_);
+    }
+    @$images;
+
+    
+    $self->tree( 
+        Wx::TreeCtrl->new( 
+           $self, 
+           -1, 
+           wxDefaultPosition, 
+           wxDefaultSize, 
+           wxBORDER_NONE|
+           wxCLIP_CHILDREN|
+#           wxTR_MULTIPLE|
+#           wxTR_EXTENDED|
+           wxTR_HAS_BUTTONS
+#           wxTR_HIDE_ROOT   
+        ) 
+    );
+
+    $self->tree->SetImageList( $self->treeimglist );
+    $self->populate_tree_categories;
+    $self->tree ;
+}
+
+
+sub populate_tree_categories {
+    my ( $self ) = @_;
+
+    $self->populate_tree(
+        $self->tree,
+        wxTheApp->pwg->categories,
+    ) if defined wxTheApp->pwg ;
+    
+    $self->tree->ExpandAll;
+
+}
+
+#$tree_items is a list of anonymous arrays
+# [ itemLabel, undef, rootInfo, ImageIndex, SelImageIndex ] for the root
+
+# [ itemLabel, 
+#       [ childItemLabel, 
+#           [...], 
+#           childItemdata, 
+#           childImageIndex, 
+#           childSelImageIndex
+#       ], 
+#    Itemdata, 
+#    ImageIndex, 
+#    SelImageIndex 
+# ]
+
+# returns a valid itemData
+sub itemData { Wx::TreeItemData->new( $_[0] ) }
+
+sub populate_tree {
+    my ( $self, $tree, $tree_items ) = @_;
+    my $root = shift @{$tree_items};
+    $self->tree_root(
+        $tree->AddRoot( 
+            $root->[0], 
+            $root->[3], 
+            $root->[4], 
+            itemData( $root->[2] ) 
+        )
+    );
+
+  $self->populate_tree_helper( $tree, $self->tree_root, $tree_items );
+
+  $tree->Expand( $self->tree_root );
+}
+
+sub populate_tree_helper {
+  my ( $self, $tree, $parent_id, $tree_items ) = @_;
+
+  my $id;
+
+  map {
+      my $name = $_->[0];
+      eval {
+      	$name = is_utf8($name) ?  decode('UTF-8', $name) : $name;
+      };
+      if($@){
+          $name = $_->[0];
+      }
+       $id = $tree->AppendItem( 
+                                   $parent_id, 
+                                   $name,
+                                   defined($_->[3]) ? $_->[3] : 0, 
+                                   defined($_->[4]) ? $_->[4] : 0, 
+                                   itemData( $_->[2]) 
+                              );
+      $self->tree_item_default($id) if ! defined $self->tree_item_default;
+      # current item has children
+      if( ref( $_->[1] ) eq 'ARRAY' ) {
+          $self->populate_tree_helper( $tree, $id, $_->[1] );
+      } 
+  }
+  @{$tree_items};
+
+}
+
+
+
+
+sub _populate_notebook {
+    my ( $self, $book, $pages, $position ) = @_;	
+
+    my $i = 0;
+    map {
+        my $icon = Wx::Icon->new();
+        eval { $icon->LoadFile($_->[2], $_->[3]) ; }
+            if defined $_->[2];
+        my $nb_icon = Wx::Bitmap->new( $icon );
+        defined $position ?
+            $book->InsertPage($position, $_->[0],
+                    $_->[1], 1, $nb_icon )
+                          :
+            $book->AddPage($_->[0],
+                    $_->[1], 0, $nb_icon );
+
+        $i++;
+    } @$pages;
+
+}
+
+
+
+sub _InitEventHandlers {
+    my ( $self ) = @_ ;
+	
+    Wx::Event::EVT_MENU( $self, 101, \&OnAddImages );
+    Wx::Event::EVT_MENU( $self, 102, \&OnRemoveImages );
+    Wx::Event::EVT_MENU( $self, 103, \&OnUploadImages );
+    Wx::Event::EVT_MENU( $self, 104, \&OnGlobalSettings );
+    Wx::Event::EVT_MENU( $self, 105, \&OnChooseLanguage );
+    EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged );
+    EVT_TREE_ITEM_RIGHT_CLICK( $self->tree, $self->tree, \&OnTreeItemRightClick );
+    EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit );
+    EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ;
+    EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ;
+    EVT_CLOSE( $self, \&OnClose );
+
+
+    Wx::Event::EVT_MENU( $self, 1+$ID_TREE_CTX_MENU, \&OnAddCategories );
+    Wx::Event::EVT_MENU( $self, 2+$ID_TREE_CTX_MENU, \&OnRefreshCategories );
+}
+
+{
+  my $prevdir;
+  my $prevfile;
+
+  sub OnAddImages {
+    my( $self, $event ) = @_;
+    my $dialog = Wx::FileDialog->new
+      ( $self, "Select photos to send", $prevfile, $prevdir,
+        "JPEG files (*.jpg)|*.jpg|All(*.*)|*.*",
+        wxFD_OPEN|wxFD_MULTIPLE );
+
+    my $file_paths = [];
+    if( $dialog->ShowModal != wxID_CANCEL ) {
+        @$file_paths = $dialog->GetPaths;
+        $self->SetNewFiles($file_paths) ;
+    }
+    $dialog->Destroy;
+    $event->Skip;
+  }
+}
+
+sub OnRemoveImages {
+    my( $self, $event ) = @_;
+
+    
+    $self->imagelist->RemoveImageSelection;
+    $self->imageviewer->Refresh;	
+}
+
+sub SetNewFiles {
+    my ( $self, $file_paths ) = @_;
+
+    $self->ShowImageViewer();
+    $self->progressdlg( 
+        Uploader::GUI::wxImageProcessingProgressDlg->new(
+            { 
+                title => "Image processing progress information",
+                bt_label => "Cancel image processing", 
+             }
+        )        
+    );
+    $self->progressdlg->Show(1);
+    Wx::Yield();
+
+    $self->imagelist->SetNewFiles(
+        $file_paths
+    );
+
+    
+}
+
+sub OnTreeSelChanged {
+    my( $self, $event ) = @_;
+  
+    my @items = $self->tree->GetSelections;
+
+    $self->imagelist->categories(
+        [
+            map {
+                my $category = $self->tree->GetPlData( $_ );
+                $category->{id} if $category != -1;
+            }
+            @items
+        ]
+    );
+}
+
+sub OnTreeItemRightClick {
+    my( $self, $event ) = @_;
+
+    my $point = $event->GetPoint ;
+    my $ctx_mnu = Wx::Menu->new;
+    
+    map {
+    	$ctx_mnu->Append(
+    	    @$_
+    	);
+    }
+    (
+        [1+$ID_TREE_CTX_MENU, "Add new category","Add a new category to the current selected category."],
+        [2+$ID_TREE_CTX_MENU, "Refresh","Refresh category list."],
+    );
+    $self->PopupMenu($ctx_mnu, $point);
+	
+}
+
+sub OnAddCategories {
+    my ( $self, $event ) = @_;
+
+    my $item = $self->tree->GetSelection;
+
+    my $category = $self->tree->GetPlData($item);
+    my $category_id;
+    
+    $category_id = $category->{id} if 'HASH' eq ref($category) ;
+
+    my $dialog = Wx::TextEntryDialog->new( 
+        $self, 
+        gettext("Category name :"), 
+        gettext("Add new category"),
+        gettext("New category"), 
+    );
+
+    if( $dialog->ShowModal != wxID_CANCEL ) {
+    	my $name = $dialog->GetValue;
+        my ( $status, $status_msg ) = $self->pwg->AddCategories( $name, $category_id);
+        $self->_refresh_tree_categories_helper;
+    }
+    $dialog->Destroy;
+}
+
+sub OnRefreshCategories {
+    my ( $self, $event ) = @_;
+
+    $self->_refresh_tree_categories_helper;
+}
+
+sub _refresh_tree_categories_helper {
+    my ( $self ) = @_;	
+
+    my $busycursor = Wx::BusyCursor->new();
+    $self->tree->CollapseAll;
+    $self->tree->DeleteAllItems;
+    $self->imagelist->categories([]);
+    $self->pwg->RefreshCategories();
+    $self->populate_tree_categories;
+}
+
+sub OnImageViewerEndLabelEdit {
+    my( $self, $event ) = @_;
+  
+    my $image = $self->imagelist->images->[$event->GetIndex];
+    $image->site_name(
+        $event->GetLabel
+    );
+    	
+    $self->image_prop_general->SetControlValues();
+}
+
+
+sub OnImageViewerItemSelected {
+    my( $self, $event ) = @_;
+  
+    my $indx = $event->GetIndex;
+
+    # retrieve photo info for the last selected photo
+    $self->imagelist->SetCurrentImage($indx);
+    
+    $self->imagelist->image_selection(
+        $self->imageviewer->GetSelectedItems
+    );
+
+    $self->image_prop_general->SetControlValues();
+    $self->image_prop_exif->SetControlValues();
+}
+
+sub OnImageViewerKeyDown {
+    my( $self, $event ) = @_;
+
+    if(WXK_DELETE == $event->GetKeyCode){
+        $self->OnRemoveImages();
+    }	
+}
+
+sub OnUploadImages {
+    my( $self, $event ) = @_;
+
+#    eval {
+        $self->ProcessImageSelection();    
+#    };
+}
+
+# remove image from imagelist when uploaded
+sub UploadImagesViewerRefresh {
+    my ( $self ) = @_;	
+
+    my $imagelist= $self->imagelist ;
+
+    Wx::Yield();
+}
+
+sub UploadProgressMessageRefresh {
+    my ( $self, $msg ) = @_;	
+
+    $self->upload_progressdlg->processing(
+        $msg   
+    );	
+
+    Wx::Yield();
+}
+
+sub UploadProgressThumbnailRefresh {
+    my ( $self ) = @_;	
+
+    my $imagelist = $self->imagelist ;
+
+ 
+    $self->upload_progressdlg->image->SetBitmap(wxNullBitmap);
+    $self->upload_progressdlg->image->SetBitmap(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->wx_thumb_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    );
+
+    Wx::Yield();
+}
+
+sub UploadProgressBarRefresh {
+    my ( $self, $ratio ) = @_;	
+
+    $ratio = $self->imagelist->count > 1 ? 1 : $ratio; 
+    eval {
+        $self->upload_progressdlg->progress(
+            $ratio*$self->imagelist->count * ( 100/scalar @{$self->imagelist->image_selection} )
+        );
+        $self->upload_progressdlg->LogProgress();
+    };
+    croak gettext("Upload cancelled") if $@;
+
+    Wx::Yield();
+}
+
+sub SetNewFilesDisplayEndInfo {
+    my ( $self, $msg ) = @_;	
+	
+    $self->progressdlg->DisplayEndInfo($msg);
+}
+
+sub UploadDisplayEndInfo {
+    my ( $self, $msg ) = @_;	
+    
+    my $imagelist = $self->imagelist ;
+    
+    $self->upload_progressdlg->DisplayEndInfo($msg);
+}
+
+sub ShowImageViewer {
+    my ( $self ) = @_;	
+
+    if(!$self->imageviewer->IsShown){
+        my $imglistpage = [
+            [
+                $self->imageviewer, 
+                gettext("Photo selection"),
+                '../res/images.png', 
+                wxBITMAP_TYPE_PNG,
+            ],
+        ];
+        $self->notebook->DeletePage(0);
+    
+        $self->imageviewer->Show(1);
+        $self->_populate_notebook($self->notebook, $imglistpage, 0);
+        # load imagelist with loading.jpg
+    }
+	
+}
+
+
+
+
+sub SetNewFilesViewerRefresh {
+
+    my ( $self ) = @_;	
+
+    my $wximagelist = $self->imagelist->wx_thumb_imglist;
+
+    my $indx = $wximagelist->Add(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->wx_thumb_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    ) if defined $self->imagelist->current_image->wx_thumb_file;
+    
+    $self->imageviewer->Refresh(
+        $wximagelist
+    );
+
+    Wx::Yield();
+}
+
+
+
+# prepare and upload image_selection
+sub ProcessImageSelection {
+    my ( $self ) = @_;
+
+    return if !scalar @{$self->imagelist->images};
+
+    if( scalar @{$self->imagelist->categories} ){
+        return if( !defined $self->imagelist->image_selection );
+        return if( !scalar @{$self->imagelist->image_selection} );
+        
+        $self->upload_progressdlg(
+            Uploader::GUI::wxImageProcessingProgressDlg->new(
+                { 
+                    title => gettext("Image upload progress information"),
+                    bt_label => gettext("Cancel upload"), 
+                 }
+            )        
+        );
+        # modeless dialog
+        $self->upload_progressdlg->Show(1);
+        Wx::Yield();
+        eval {
+            $self->imagelist->UploadSelection;
+        };
+        if($@){
+            Wx::MessageBox( 
+                sprintf(
+                    gettext("Upload cancelled"),
+                ),
+                gettext("Piwigo upload information"),
+                wxOK | wxICON_INFORMATION, 
+            );
+        }
+    }
+    else {
+        Wx::MessageBox( 
+            sprintf(
+                gettext("Please select a valid target category"),
+            ),
+            gettext("Piwigo upload error"),
+            wxOK | wxICON_EXCLAMATION, 
+        );
+    }
+}
+
+
+sub SetNewFilesProgress {
+    my ( $self ) = @_;
+
+    my $imagelist = $self->imagelist;
+
+    $self->progressdlg->processing(
+        sprintf(
+            $imagelist->progress_msg, 
+            $imagelist->current_image->file,
+        )
+    );
+
+    eval {
+        $self->progressdlg->image->SetSize([ $imagelist->wx_thumb_size, $imagelist->wx_thumb_size]);
+        $self->progressdlg->image->SetBitmap(wxNullBitmap);
+        $self->progressdlg->image->SetBitmap(
+            Wx::Bitmap->new( 
+                $imagelist->current_image->wx_thumb_file,
+                $self->GetWxBitmapType( $imagelist->type )
+            )
+        );
+        $self->progressdlg->progress(
+            $imagelist->count * ( 100/scalar @{$imagelist->new_files} )
+        );
+        $self->progressdlg->LogProgress();
+    };
+    Wx::Yield();
+}
+
+sub OnClose {
+  my $self = shift;
+
+    # Restaure previous log wnd
+    Wx::Log::SetActiveTarget( $self->oldlogwnd );
+
+    # allways store
+    
+    wxTheApp->StoreConnectionProperties;
+    
+    $self->imagelist->Store;
+    $self->Destroy;
+}
+
+
+sub create_toolbar {
+    my( $self ) = @_;
+
+    my $tb = Wx::ToolBar->new( $self, -1, wxDefaultPosition, wxDefaultSize, wxTB_FLAT );
+    $tb->SetToolBitmapSize( wxSIZE( 32, 32 ) );
+    map {
+        my $icon1 = Wx::Icon->new();
+        eval {
+            $icon1->LoadFile($_->[2], $_->[3]);
+        };
+        my $tb_icon1 = Wx::Bitmap->new( $icon1 );
+
+        my $icon2 = Wx::Icon->new();
+        eval {
+            $icon2->LoadFile($_->[5], $_->[3]);
+        };
+        my $tb_icon2 = Wx::Bitmap->new( $icon2 );
+
+
+        $tb->AddTool( $_->[0], $_->[1], $tb_icon1, $tb_icon2, wxITEM_NORMAL, $_->[1] );
+        $tb->EnableTool( $_->[0], $_->[4]);
+    }
+    (
+        [
+            101, gettext("Add photo to selection"), '../res/tb_add.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_add.png', gettext("Add photo to selection for resizing and uploading")
+        ],
+        [
+            102, gettext("Remove photo from selection"), '../res/tb_remove.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_remove.png',gettext("Remove photo from selection. Files are not deleted ")
+        ],
+        [
+            103, gettext("Upload to Piwigo"), '../res/tb_upload.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_upload.png',gettext("Upload photos to Piwigo.")
+        ],
+        [
+            104, gettext("Global settings"), '../res/tb_settings.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_settings.png',gettext("Change global settings.")
+        ],
+        [
+            105, gettext("Language choice"), '../res/tb_i18n.png', wxBITMAP_TYPE_PNG, 1, '../res/tb_i18n.png',gettext("Language choice")
+        ],
+    
+    );
+
+    if($@){
+    	undef $tb;
+    }
+    else{
+        $tb->Realize;
+    }
+
+    return $tb;
+}
+
+
+sub _create_textctrl {
+    my( $self, $parent, $text, $size ) = @_;
+
+    return Wx::TextCtrl->new( $parent, -1, $text, [0, 0], $size,
+                              wxNO_BORDER | wxTE_MULTILINE | wxTE_READONLY  );
+}
+
+sub create_textctrl {
+    my( $self, $text, $size ) = @_;
+
+    return $self->_create_textctrl( $self, $text, $size );
+}
+
+sub DESTROY {
+    my( $self ) = @_;
+
+    $self->manager->UnInit;
+}
+
+
+
+1;
+
+
+
+
+
+package DNDImageListDropTarget;
+
+use base qw(Wx::FileDropTarget Class::Accessor::Fast);
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          imageviewer
+          frame
+      /
+);
+
+sub new {
+  my $class = shift;
+  my $imageviewer = shift;
+  my $self = $class->SUPER::new( @_ );
+
+  $self->imageviewer($imageviewer);
+  $self->frame($imageviewer->GetParent);
+  return $self;
+}
+
+sub OnDropFiles {
+  my( $self, $x, $y, $files ) = @_;
+
+  $self->frame->SetNewFiles($files) ;
+}
+
+1;
+
+
+package DNDCategoryTreeDropTarget;
+
+use base qw(Wx::TextDropTarget Class::Accessor::Fast);
+use Data::Dumper;
+use Wx qw/
+              wxDragNone
+              wxDragCopy
+              wxDragMove
+         /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          tree
+          frame
+      /
+);
+
+sub new {
+  my ( $class, $tree ) = @_;
+  my $self = $class->SUPER::new();
+
+  $self->tree($tree);
+  $self->frame($tree->GetParent);
+  return $self;
+}
+
+
+
+sub OnDropText {
+  my( $self, $x, $y, $textdata ) = @_;
+
+  # must be $VAR1 because $textdata is the result of Data::Dumper
+  my $VAR1;
+  eval $textdata;
+  eval {
+      if(scalar @$VAR1){
+      	   my @items;
+      	   if(scalar @items < 2) {
+               my ($dropItem, $flag) = $self->tree->HitTest([$x, $y]);
+      	   	push @items, $dropItem;
+      	   }
+      	   else {
+      	   	@items = $self->tree->GetSelections;
+      	   }
+      	   
+      	   # remove root item which is not a valid category
+      	   @items = grep { $self->tree->GetPlData( $_ ) != -1 } @items;
+      	   
+           $self->frame->imagelist->categories(
+               [
+                   map {
+                       $self->tree->GetPlData( $_ )->{id};
+                   }
+                   @items
+               ]
+           );
+           
+      	   $self->frame->imagelist->image_selection($VAR1);
+      	   $self->frame->ProcessImageSelection ;
+      }	
+  };
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxGlobalSettingsPanel.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxGlobalSettingsPanel.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxGlobalSettingsPanel.pm	(revision 3291)
@@ -0,0 +1,131 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxGlobalSettingsPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+
+use base qw/Wx::Panel Uploader::Object2/;
+use Wx::Perl::TextValidator;
+
+use Wx::Event qw/
+                    EVT_TEXT
+                    EVT_RADIOBOX
+                /;
+
+
+__PACKAGE__->mk_accessors(     
+    qw/
+        accessors
+        frame_callback
+      /
+);
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+
+    
+    $self->accessors( $params->{accessors} );
+    $self->frame_callbacks(
+        $params->{frame_callbacks}
+    );
+    
+    $self->Initialize;
+      
+    $self;    
+}
+
+sub Initialize {
+    my ( $self ) = @_;	
+
+    # load controls
+    &main::GlobalSettings($self, 1);
+
+    $self->_set_validators;    
+    $self->SetControlValues;
+    $self->_initEventHandlers();
+}
+
+sub _set_validators {
+    my ( $self ) = @_;	
+
+    map {
+        my $numval = Wx::Perl::TextValidator->new( '\d' );
+        $self->FindWindow($_)->SetValidator(
+            $numval
+        );    	
+    }
+    (
+        $main::ID_GLOBAL_THUMB_SIZE,
+        $main::ID_GLOBAL_RESIZED_W,
+        $main::ID_GLOBAL_RESIZED_H,
+    );
+}
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+   
+    map {
+        my $ctrl = $self->FindWindow($_);
+        if('Wx::TextCtrl' eq ref $ctrl){
+            EVT_TEXT($self, $ctrl, sub { OnControlChanged(@_) });
+        }
+        elsif('Wx::RadioBox' eq ref $ctrl){
+            EVT_RADIOBOX($self, $ctrl, sub { OnControlChanged(@_) });
+        }
+    }
+    keys %{$self->accessors};	
+
+}
+
+sub OnControlChanged {
+    my ( $self, $event ) = @_;
+    
+    my $control_id = $event->GetId ;
+
+    $self->GetControlValue(
+        $control_id
+    );
+    
+    
+    my $frame_callback = $self->frame_callbacks->{$control_id};
+
+    eval{
+        $frame_callback->() if defined $frame_callback;
+    };
+}
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxHtmlWindow.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxHtmlWindow.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxHtmlWindow.pm	(revision 3291)
@@ -0,0 +1,46 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxHtmlWindow;
+
+use strict;
+use Wx::Html;
+use base qw(Wx::HtmlWindow);
+
+sub new {
+  my $class = shift;
+  my $this = $class->SUPER::new( @_ );
+
+  if( -e '../res/intro.html' ){
+      $this->LoadPage( 
+          '../res/intro.html' 
+      );
+  }
+
+  return $this;
+}
+
+sub OnLinkClicked {
+  my( $this, $link ) = @_;
+
+  Wx::LogMessage( 'Link clicked: href="%s"', $link->GetHref() );
+  $this->SUPER::OnLinkClicked( $link );
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageGrid.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageGrid.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageGrid.pm	(revision 3291)
@@ -0,0 +1,85 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageGrid;
+
+use strict;
+use base qw(Wx::Grid);
+
+sub new {
+  my $class = shift;
+  my $this = $class->SUPER::new( $_[0], -1 );
+
+  $this->CreateGrid( 3, 7 );
+  # set every cell read-only
+  for my $x ( 1 .. 7 ) {
+    for my $y ( 1 .. 3 ) {
+      $this->SetReadOnly( $y, $x, 1 ); # rows, cols
+    }
+  }
+$this->SetDefaultColSize(120);
+$this->SetDefaultRowSize(120);
+
+
+  $this->SetCellValue( 1, 5, "SoMe TeXt!" );
+  $this->SetCellRenderer( 1, 5, Wx::DemoModules::wxGridCER::CustomRenderer->new );
+  $this->SetReadOnly( 1, 5, 0 );
+
+  return $this;
+}
+
+sub add_to_tags { 'controls/grid' }
+sub title { 'Custom editors and renderers' }
+
+package Wx::DemoModules::wxGridCER::CustomRenderer;
+
+use strict;
+use base 'Wx::PlGridCellRenderer';
+use Wx qw/
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_GIF
+             wxBITMAP_TYPE_PNG
+             wxBLACK_PEN 
+             wxWHITE_BRUSH 
+             wxSYS_DEFAULT_GUI_FONT
+         /;
+sub Draw {
+  my( $self, $grid, $attr, $dc, $rect, $row, $col, $sel ) = ( shift, @_ );
+
+  $self->SUPER::Draw( @_ );
+
+  $dc->SetPen( wxBLACK_PEN );
+  $dc->SetBrush( wxWHITE_BRUSH );
+  $dc->SetFont(Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
+#  $dc->DrawEllipse( $rect->x, $rect->y, $rect->width, $rect->height );
+#  $dc->DrawText( $grid->GetCellValue( $row, $col ), $rect->x, $rect->y );
+    my $img = Wx::Bitmap->new( "J:/uploader/test10066.jpg", wxBITMAP_TYPE_JPEG );
+  $dc->DrawBitmap( $img, 10+$rect->x, 10+$rect->y, 0 );
+
+
+}
+
+sub Clone {
+  my $self = shift;
+
+  return $self->new;
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageListCtrl.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageListCtrl.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageListCtrl.pm	(revision 3291)
@@ -0,0 +1,137 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageListCtrl;
+use strict;
+use Wx;
+use Wx::DND;
+use Wx qw/
+             wxDefaultPosition
+             wxDefaultSize
+             wxLC_LIST
+             wxNO_BORDER
+             wxLC_EDIT_LABELS
+             wxLC_ICON
+             wxIMAGE_LIST_NORMAL
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_PNG
+             wxBLACK
+             wxLC_VIRTUAL
+             wxLC_REPORT
+             wxBORDER_THEME
+             wxLIST_HITTEST_ONITEM
+             wxLIST_NEXT_ALL
+             wxLIST_STATE_SELECTED 
+         /;
+use Wx::Event qw/
+                    EVT_LIST_BEGIN_DRAG
+                    EVT_LIST_ITEM_SELECTED
+                /;
+         
+use base qw/Wx::ListCtrl Class::Accessor::Fast/;
+__PACKAGE__->mk_accessors( 
+    qw/
+          prevItemCount
+          imagenames
+          imagelist
+      / 
+);
+use Data::Dumper;
+sub new {
+  my( $class, $params ) = @_;
+  my( $self ) = $class->SUPER::new(
+                                       $params->{parentwnd},
+                                       -1,
+                                       wxDefaultPosition,
+                                       wxDefaultSize,
+                                       wxNO_BORDER|
+                                       wxLC_ICON|
+                                       wxLC_EDIT_LABELS
+                                  );
+
+  $self->imagelist(
+      $params->{imagelist}
+  );
+
+                                  
+  $self->prevItemCount(-1);
+
+  EVT_LIST_BEGIN_DRAG( $self, $self, \&OnBeginDrag);
+
+
+  $self;
+}
+
+sub OnBeginDrag {
+  my( $self, $event ) = @_;
+
+
+  my $data = Wx::TextDataObject->new( 
+      Dumper $self->GetSelectedItems 
+  );
+  my $source = Wx::DropSource->new( $self );
+  $source->SetData( $data );
+
+  $source->DoDragDrop( 1 );
+}
+
+
+sub GetSelectedItems {
+    my ( $self ) = @_;	
+
+  # find selected items
+  my $item = -1;
+  my $items = [];
+  while(1) {
+      $item = $self->GetNextItem(
+          $item,      
+          wxLIST_NEXT_ALL,
+          wxLIST_STATE_SELECTED
+      );
+      last if(-1 == $item);
+      
+      # item is selected	
+      push @$items, $item
+  }
+  
+  $items;
+}
+
+
+
+sub Refresh {
+    my ( $self, $wximagelist ) = @_;	
+
+   $self->SetImageList( $wximagelist, wxIMAGE_LIST_NORMAL ) if defined $wximagelist ;
+   $self->DeleteAllItems;
+   eval {
+       for( my $i = 0 ; $i < $self->GetImageList(wxIMAGE_LIST_NORMAL)->GetImageCount ; $i++){
+            my $indx = $self->InsertImageStringItem(
+                $i,
+                $self->imagelist->images->[$i]->site_name,
+                $i,
+            );
+       }   
+   };
+}
+
+
+
+1;
+
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageProcessingProgressDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageProcessingProgressDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageProcessingProgressDlg.pm	(revision 3291)
@@ -0,0 +1,125 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageProcessingProgressDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           gauge
+           progress
+           processing
+           txtprocessing
+           image
+           cancelled
+      / 
+);
+use Carp;
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    eval {
+      &main::ProcessingProgress($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PROGRESS_OK) );
+    $self->gauge( $self->FindWindow($main::ID_PROGRESS_GAUGE) );
+    $self->txtprocessing( $self->FindWindow($main::ID_PROGRESS_TXT) );
+    $self->image( $self->FindWindow($main::ID_STATICBITMAP) );
+    $self->gauge->SetForegroundColour(wxGREEN);
+    };
+
+    $self->btok->SetLabel(
+        $params->{bt_label}||'Cancel'
+    );
+
+    if($@){
+        Wx::LogMessage("Error during dialogbox initialization");
+    }
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PROGRESS_OK, \&OnOK );
+    
+	
+}
+
+# Update progress information
+sub LogProgress {
+    my ( $self ) = @_;
+    
+    croak "Cancelled by user\n" if $self->cancelled;    
+   
+    $self->txtprocessing->SetLabel(
+        $self->processing
+    );
+    $self->gauge->SetValue(
+        $self->progress
+    );
+}
+
+sub DisplayEndInfo {
+    my ( $self, $msg ) = @_;
+
+    $self->txtprocessing->SetLabel(
+        $msg
+    );
+    $self->image->Show(0);
+    $self->gauge->Show(0);
+
+    $self->btok->SetLabel(
+        'Close'
+    );
+	
+}
+
+sub OnOK {
+    my ( $self, $event ) = @_;
+    
+    $self->cancelled(1);
+    $self->Destroy;
+ 
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageView.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageView.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxImageView.pm	(revision 3291)
@@ -0,0 +1,49 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageView;
+use Wx qw/wxDefaultPosition wxDefaultSize wxLC_ICON wxIMAGE_LIST_NORMAL wxLC_LIST
+                                       wxSUNKEN_BORDER wxLC_EDIT_LABELS/;
+use base qw/Wx::ListCtrl/;
+use strict;
+
+sub new {
+    my ( $class, $parentwnd, $images ) = @_;
+
+
+    my $self = $class->SUPER::new( $parentwnd, -1, wxDefaultPosition, wxDefaultSize, wxLC_LIST|
+                                       wxSUNKEN_BORDER|wxLC_EDIT_LABELS );
+    $self->SetSingleStyle( wxLC_ICON );
+    $self->Initialize($images);
+    
+    return $self;
+}
+
+sub Initialize {
+    my ( $self, $images ) = @_;	
+
+    $self->AssignImageList( $images, wxIMAGE_LIST_NORMAL );
+
+    for( my $i = 0 ; $i < $images->GetImageCount ; $i++ ) {
+        my $idx = $self->InsertStringImageItem( $i, "Item $i", $i % 5 );
+        $self->SetItemData( $idx, $i );
+   }
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxLoginDlg.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxLoginDlg.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxLoginDlg.pm	(revision 3291)
@@ -0,0 +1,126 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxLoginDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           url
+           username
+           password
+      / 
+);
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::Login($self, 1);
+    
+    $self->url(
+        $params->{site_url}
+    );
+
+    $self->username(
+        $params->{site_username}
+    );
+
+    $self->password(
+        $params->{site_password}
+    );
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PWG_OK) );
+
+    $self->FindWindow($main::ID_PWG_URL)->SetValue(
+        $self->url->()
+    );
+    
+    
+    $self->FindWindow($main::ID_PWG_USERNAME)->SetValue(
+        $self->username->() 
+    );
+    
+    $self->FindWindow($main::ID_PWG_PASSWORD)->SetValue( 
+        $self->password->() 
+    );
+      
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PWG_OK, \&OnLoginOK );
+    EVT_BUTTON( $self, $main::ID_PWG_CANCEL, \&OnLoginCancel );
+    
+	
+}
+
+
+
+sub OnLoginOK {
+    my ( $self, $event ) = @_;
+    
+    $self->url->(
+        $self->FindWindow($main::ID_PWG_URL)->GetValue    
+    );
+
+    $self->username->(
+        $self->FindWindow($main::ID_PWG_USERNAME)->GetValue
+    );
+    
+    $self->password->(
+        $self->FindWindow($main::ID_PWG_PASSWORD)->GetValue
+    );
+
+    $self->EndModal(1);
+}
+
+sub OnLoginCancel {
+    my ( $self, $event ) = @_;
+    
+    
+    $self->EndModal(0);
+ 
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxPhotoExifPanel.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxPhotoExifPanel.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxPhotoExifPanel.pm	(revision 3291)
@@ -0,0 +1,72 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxPhotoExifPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+#use base qw/Wx::Panel Class::Accessor::Fast/;
+
+use base qw/Wx::Panel Uploader::Object2/;
+
+use Wx::Event qw/
+                    EVT_BUTTON
+                /;
+
+
+    __PACKAGE__->mk_accessors(     
+        qw/accessors/
+    );
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+
+    
+    $self->accessors( $params->{accessors} );
+    
+    # load controls
+    &main::PhotoExif($self, 1);
+    
+
+    
+      
+    $self;    
+}
+
+
+
+
+
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxPhotoPropertiesPanel.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxPhotoPropertiesPanel.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/GUI/wxPhotoPropertiesPanel.pm	(revision 3291)
@@ -0,0 +1,98 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxPhotoPropertiesPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+
+use base qw/Wx::Panel Uploader::Object2/;
+
+use Wx::Event qw/
+                    EVT_TEXT
+                /;
+
+
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+
+    
+    $self->accessors( $params->{accessors} );
+    $self->frame_callbacks(
+        $params->{frame_callbacks}
+    );
+    
+    # load controls
+    &main::PhotoProperties($self, 1);
+ 
+
+    $self->_initEventHandlers();
+    
+      
+    $self;    
+}
+
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+       
+    map {
+        my $ctrl = $self->FindWindow($_);
+        EVT_TEXT($self, $ctrl, sub { OnTextChanged(@_) });
+    }
+    keys %{$self->accessors};	
+}
+
+
+
+sub OnTextChanged {
+    my ( $self, $event ) = @_;
+    
+    my $control_id = $event->GetId ;
+
+    $self->accessors->{$control_id}->(
+        $event->GetString
+    );
+        
+    my $frame_callback = $self->frame_callbacks->{$control_id};
+
+    eval{
+        $frame_callback->();
+    };
+}
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/Image.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/Image.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/Image.pm	(revision 3291)
@@ -0,0 +1,64 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Image;
+use strict;
+use base qw/Uploader::Object/;
+
+__PACKAGE__->mk_accessors(
+    qw/
+        file
+        wx_thumb_file
+        preview_file
+        site_high_file
+        site_name
+        site_resized_file
+        site_thumb_file
+        site_author
+        site_comment
+        exif_metadata
+        add_rank
+        site_categories
+        site_tags
+    /
+);
+
+sub Init {
+    my ( $self ) = @_;
+}
+
+sub exif_tag {
+    my ( $self, $tag ) = @_;
+	
+    my $exif = $self->exif_metadata ;
+    
+    $exif->{$tag};	
+}
+
+sub create_date {
+    my ( $self ) = @_;
+    
+    my $exif = $self->exif_metadata ;
+    
+    $exif->{CreateDate};	
+}
+
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/ImageList.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/ImageList.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/ImageList.pm	(revision 3291)
@@ -0,0 +1,999 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::ImageList;
+use strict;
+use Carp;
+use base qw/Uploader::Object/;
+use Image::ExifTool qw(:Public);
+use Image::Magick;
+use File::Spec;
+use Uploader::Image;
+use Data::Dumper;
+use Storable;
+# this class implements a collection of image files with associated data
+$|=1;
+__PACKAGE__->mk_accessors( 
+    qw/
+       	        thumb_size
+                preview_ratio
+                categories
+      	        type
+      	        filter
+      	        blur
+      	        quality
+      	        prefix
+      	        author
+      	        count
+                resize_w
+                resize_h
+                new_files
+                storable_file
+       	        wx_thumb_size
+                current_image
+                images
+                image_selection
+                exif_metadata
+                wx_thumb_imglist
+                wx_thumb_dir
+                preview_dir
+                site_resized_dir
+                site_thumb_dir
+                userdata_dir
+                progress_msg
+                last_error_msg
+            	default_name_prefix
+                SetNewFilesViewerRefreshCallback
+                SetNewFilesProgressCallback
+                SetNewFilesDisplayEndInfoCallback
+                UploadImagesViewerCallback
+                progress_thumbnail_refresh
+                progress_msg_refresh
+                progressbar_refresh
+                progress_endinfo_refresh
+                ResizeCallback
+                upload_rejects
+                pwg
+                upload_high
+     /
+);
+
+
+sub Init {
+    my ( $self ) = @_;	
+}
+
+
+
+# save exif preview image if available
+# otherwise create a preview image
+sub _write_preview_image {
+    my ( $self, $imagedata ) = @_;
+
+
+    # If PreviewImage is available, we use it
+    if(defined $imagedata ) {
+    	eval {
+            open PREVIEW_FILE, ">", $self->current_image->preview_file ;
+            binmode PREVIEW_FILE;
+            print PREVIEW_FILE $$imagedata;
+            close PREVIEW_FILE;
+        };
+        $self->last_error_msg($@) if $@;
+    }
+    
+}
+
+# Rotate exif preview if needed
+sub _rotate_image {
+    my ( $self, $file ) = @_;	
+
+}
+
+sub _set_exif_tag {
+    my ( $self, $file, $tag, $newValue ) = @_;	
+
+  my $options = {};
+  # Create a new Image::ExifTool object
+  my $exifTool = new Image::ExifTool;
+
+  # Extract meta information from an image
+  $exifTool->ExtractInfo($file, $options);
+
+  # Set a new value for a tag
+  $exifTool->SetNewValue($tag, $newValue);
+
+  # Write new meta information to a file
+  $exifTool->WriteInfo($file);
+
+}
+
+sub _set_current_image_filepaths {
+    my ( $self ) = @_;
+
+    my ( $vol, $dir, $file ) = File::Spec->splitpath(
+        $self->current_image->file
+    );
+
+    my ( $filename, $ext ) = split /\./, $file ;
+
+    $self->current_image->wx_thumb_file( 
+        File::Spec->catfile(
+            $self->wx_thumb_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+    $self->current_image->preview_file( 
+        File::Spec->catfile(
+            $self->preview_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+
+    $self->current_image->site_thumb_file( 
+        File::Spec->catfile(
+            $self->site_thumb_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+	
+}
+
+sub SetCurrentImage {
+    my ( $self, $indx ) = @_;	
+
+    $self->current_image(
+        $self->images->[$indx]
+    );
+}
+
+
+sub SetNewFiles {
+    my ( $self, $files ) = @_;
+
+    $self->new_files( $files );
+
+    # if some files have been previously selected 
+    my $i = scalar @{$self->images};
+    my $count = 0;
+    $self->count($count);
+    my $errors = 0;
+    map {
+        # read exif metadata
+        my $info;
+
+
+        eval {
+            $info = ImageInfo( $_ );
+        };
+
+        $info = {} if($@);
+
+       	$self->_add_image($_, $info, $i);	
+        $self->SetCurrentImage($i);
+    	$self->_set_current_image_filepaths();
+
+        my $create_gui_preview;        
+        # an exif preview is available. we try to use it
+        if(defined $info->{PreviewImage} ){
+            printf("use preview\n");
+            $self->_write_preview_image( $info->{PreviewImage} );
+            my $image = new Image::Magick;
+            eval {
+            	$create_gui_preview = $image->ReadImage(
+                    $self->current_image->preview_file
+                );
+            };
+            unlink $self->current_image->preview_file if $create_gui_preview;
+        }else {
+            $create_gui_preview = 1;
+        }
+        print $create_gui_preview, "\n";
+        # have to create a preview file
+        if($create_gui_preview) {
+            eval {
+                if(!$self->CreateGUIPreview()){
+                    # use method provided by the caller
+                    # source, target, type, ratio
+                    $self->ResizeCallback->(
+                        $self->current_image->file,
+                        $self->current_image->preview_file,
+                        $self->type,
+                        $self->preview_ratio,
+                        undef,
+                        undef,
+                        $self->quality,
+                    );
+                }
+            };# create a preview file
+        }    
+
+        $self->RotateImage(
+            $self->current_image->preview_file,
+        );
+
+        $self->_set_exif_tag(
+            $self->current_image->preview_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+
+        # Now, we should have a valid preview image.
+        # try to thumbnail it
+        eval {
+            printf("create gui thumbnail\n");
+            # use the preview image to create a gui display thumbnail
+            $self->CreateGUIThumbnail();
+        };
+        # ok
+        if(!$@){
+            $self->progress_msg("Thumbnail and preview created for %s");
+            $i++;
+            $count++;
+            $self->count($count);
+        }
+        else {
+            $self->progress_msg("An error has occured when processing %s\n$@");
+            # remove from list
+            splice @{$self->images}, $i, 1;
+            $errors++;
+        }
+        
+        $self->SetNewFilesProgressCallback->();
+        $self->SetNewFilesViewerRefreshCallback->();
+
+    }
+    @{$files};
+    $self->SetNewFilesDisplayEndInfoCallback->(
+        sprintf(
+            "%s images added to the selection\n\n%s errors",
+            $self->count,
+            $errors
+            
+        )
+    );
+    
+    $self->Store;
+    
+}
+
+# key is file path
+sub _add_image {
+    my ( $self, $file, $info, $i ) = @_;	
+
+    my $image = Uploader::Image->new(
+        {
+            file              => $_,
+            site_name         => sprintf(
+        	                     "%s %s", 
+        	                     $self->default_name_prefix, 
+        	                     $i,
+        	                 ),
+            site_author       => $self->author,
+            exif_metadata     => $self->_select_exif_data($info),
+            add_rank          => $i,
+            site_categories   => [],
+            site_tags         => [],
+            site_high_file    => $_,
+        }
+    );
+
+    # append to image list
+    $self->images->[$i] = $image ;
+
+}
+
+
+sub RemoveImageSelection {
+    my ( $self ) = @_;
+    
+    return if (! scalar @{$self->images} );
+    return if (! defined $self->image_selection );
+    
+    # higher first, to keep same indexes during remove
+    my @images = reverse @{$self->image_selection};     
+    map {
+        my $image = $self->images->[$_]->file;
+        splice @{$self->images}, $_, 1 ;
+        $self->wx_thumb_imglist->Remove($_);
+        shift @images;
+    }
+    @images;
+    
+    # clear image selection
+    $self->image_selection([]);
+}
+
+# used for display in GUI. has to fit a square box ( wxImageList )
+sub CreateGUIThumbnail {
+    my ( $self ) = @_;
+
+    return 1 if( -e $self->current_image->wx_thumb_file );
+    my $rval = 0;
+print "CreateGUIThumbnail ", $self->current_image->wx_thumb_file, "\n";
+    my $image = new Image::Magick;
+
+    my $size = $self->wx_thumb_size;
+
+    my $status = $image->Set(size=>sprintf("%sx%s", 3*$size, 3*$size));
+    warn "$status" if $status ;
+
+    $status = $image->ReadImage(
+        $self->current_image->preview_file
+    );
+    warn "$status" if $status;
+    return $rval if $status;
+
+    $status = $image->Thumbnail(
+        geometry=>sprintf("%s%s>", $size*$size, '@')
+    );
+    warn "$status" if $status;
+    return $rval if $status;
+
+    $status = $image->Set(background=>"white");
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    $image->Extent(
+        geometry=>sprintf("%sx%s", $size, $size),
+        gravity=>'center',
+    );
+
+    $image->Set(quality=>100);
+
+    $status = $image->Strip();
+    warn "$status" if $status ;
+    
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->wx_thumb_file,
+        )
+    );
+
+    undef $image;
+    
+    $rval = 1;
+    
+    return $rval;
+}
+
+
+sub CreateGUIPreview {
+    my ( $self ) = @_;
+
+    return 1 if( -e $self->current_image->preview_file );
+    
+    my $rval = 1;
+
+    my $image = Image::Magick->new();
+
+    my $ratio = $self->preview_ratio;
+
+
+    my $status = $image->Read(
+        sprintf(
+            "'%s'",
+            $self->current_image->file,
+        )
+    );
+    warn "$status ", $self->current_image->file, "\n" if $status ;
+    return 0 if $status;
+
+    $status = $image->Thumbnail(
+        geometry=>sprintf(
+                              "%s%%x%s%%>", 
+                              $ratio, 
+                              $ratio
+                         )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+
+    $status = $image->Set(background=>"white");
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+
+    $image->Set(quality=>$self->quality);
+
+
+    $status = $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->preview_file,
+        )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+    
+    undef $image;
+
+    return $rval;
+}
+
+
+sub CreateResized {
+    my ( $self ) = @_;
+    
+    my $rval = 1 ;
+    return $rval if( -e $self->current_image->site_resized_file );
+
+printf(
+    "Create resized %s\n",
+    $self->current_image->file,
+);     
+
+    my $image = new Image::Magick;
+
+    my $status = $image->ReadImage(
+        $self->current_image->file
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+    my $w = $image->Get('width');
+    my $h = $image->Get('height');
+        
+    # should calculate the aspect ratio
+    my $resize_w = $self->resize_w;
+    my $resize_h = $self->resize_h;
+        
+    if( $w < $h ){
+        my $resize_w_ = $resize_w;
+        $resize_w = $resize_h;
+        $resize_h = $resize_w_;
+    }
+    
+    $status = $image->Resize(
+        geometry => sprintf("%sx%s>", $resize_w, $resize_h), 
+        filter => sprintf("%s", $self->filter), 
+        blur => $self->blur
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    # exif from original image
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+        printf(
+            "Rotate %s\n",
+            $1
+        );
+    
+        $image->Rotate( degrees=>$1 );	
+    }
+
+    $status = $image->Set(quality=>$self->quality);
+    warn "$status" if $status ;
+
+    $status = $image->Set(interlace=>'Line');
+    warn "$status" if $status ;
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->site_resized_file,
+        )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+    
+    undef $image;
+
+   
+    $rval = 0 if $status;
+
+    return $rval;
+}
+
+sub CreateThumbnail {
+    my ( $self ) = @_;
+    
+    return 1 if( -e $self->current_image->site_thumb_file );
+    
+    my $rval = 1;
+
+    my $image = new Image::Magick;
+
+    my $status = $image->ReadImage(
+        $self->current_image->site_resized_file
+    );
+    warn "$status" if $status ;
+
+    
+    $status = $image->Resize(
+        geometry => sprintf(
+                                "%sx%s>", 
+                                $self->thumb_size, 
+                                $self->thumb_size
+                           ),
+    );
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    $status = $image->Set(quality=>$self->quality);
+    warn "$status" if $status ;
+
+    $status = $image->Strip();
+    warn "$status" if $status ;
+
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            $self->current_image->site_thumb_file,
+        )
+    );
+    
+    undef $image;
+
+
+    $rval = 0 if $status;
+
+    return $rval;
+}
+
+
+
+sub _select_exif_data {
+    my ( $self, $exif ) = @_;
+
+    return {
+        map {
+    	    $_ => $exif->{$_},
+        }
+        qw/
+            CreateDate
+            ImageWidth
+            ImageHeight
+            Orientation
+            DateTimeOriginal
+            ISO
+            ExposureTime
+            ApertureValue
+            FocalLength
+            Lens
+            Exposure
+            Make
+            Model
+        /
+    };    
+}
+
+sub Store {
+    my ( $self ) = @_;
+    
+    my $data = $self->get_storable(
+        [ 
+            qw/
+                images
+       	        thumb_size
+                preview_ratio
+      	        type
+      	        filter
+      	        blur
+      	        quality
+      	        prefix
+      	        author
+      	        count
+                resize_w
+                resize_h
+                new_files
+                storable_file
+       	        wx_thumb_size
+                current_image
+                images
+                exif_metadata
+                wx_thumb_dir
+                preview_dir
+                site_resized_dir
+                site_thumb_dir
+                userdata_dir
+                progress_msg
+            	default_name_prefix
+            	upload_high
+            /
+        ] 
+    
+    );
+    eval {
+        store $data, $self->storable_file;
+    };
+    if($@){
+        print $@, "\n";	
+    }
+}
+
+
+
+sub UploadSelection {
+    my ( $self ) = @_;	
+
+    my $viewer_callback = $self->UploadImagesViewerCallback ;
+
+
+    $self->upload_rejects(
+        []
+    );
+
+    my $count = 1;
+    my $msg;
+    $self->count(
+        $count
+    );
+    my $uploaded = 0;
+    my $rejected = 0;
+    my $time_begin = time;
+    my $last_error;
+    map {
+        # current image object    	
+    	$self->current_image(
+    	    $self->images->[$_]
+    	);
+
+        my ( $vol, $dir, $file ) = File::Spec->splitpath(
+            $self->current_image->file
+        );
+        
+        my $site_name = $self->current_image->site_name;
+    
+        my ( $filename, $ext ) = split /\./, $file ;
+
+        # lately defined to make sure we have the last global properties ( resize_w, resize_h )
+        $self->current_image->site_resized_file( 
+            File::Spec->catfile(
+                $self->site_resized_dir,
+                sprintf(
+                    "%s_%sx%s.%s",
+                    $filename,
+                    $self->resize_w,
+                    $self->resize_h,
+                    $self->type,
+                )
+            )
+        );
+        
+        $msg = sprintf(
+            "Preparing resized image for %s - %s",
+            $site_name,
+            $file,
+        ); 
+
+    	eval {
+            # set current image thumbnail
+            $self->progress_thumbnail_refresh->();
+
+            $self->progress_msg_refresh->($msg);
+    
+      	    # update upload progress dialog
+            $self->progressbar_refresh->(0.25);
+        };
+        # user cancelled : dialog box is destroyed
+        croak "Upload cancelled." if $@ ;
+
+    	eval {
+            if(!$self->CreateResized()){
+                printf("CreateResized failed %s. Use ResizeCallback\n", $@);
+                # use method provided by the caller
+                # source, target, type, ratio, width, $height
+                $self->ResizeCallback->(
+                    $self->current_image->file,
+                    $self->current_image->site_resized_file,
+                    $self->type,
+                    undef,
+                    $self->resize_w,
+                    $self->resize_h,
+                    $self->quality,
+                );
+                
+                $self->RotateImage(
+                    $self->current_image->site_resized_file,
+                );
+            }
+        };
+
+        $self->_set_exif_tag(
+            $self->current_image->site_resized_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+
+        # if upload high, rotate a copy of original file
+        if($self->upload_high){
+            $self->CreateHigh();
+        }
+
+
+
+
+        $msg = sprintf(
+            "Preparing thumbnail for %s - %s",
+            $site_name,
+            $file,
+        );
+
+    	eval {
+            $self->progress_msg_refresh->($msg);
+        };
+        croak "Upload cancelled." if $@ ;
+
+    	eval {
+            $self->CreateThumbnail();
+        };
+
+        if($@){
+            $msg = sprintf(
+                "An error has occured %s - %s\n$@",
+                $site_name,
+                $file
+            );
+        }
+        else{
+            $msg = sprintf(
+                "Uploading %s - %s",
+                $site_name,
+                $file
+            );
+        }
+    	eval {
+            $self->progress_msg_refresh->($msg);
+       	    $self->progressbar_refresh->(0.50);
+        };
+        croak "Upload cancelled." if $@ ;
+
+        # photo metadata
+        $self->_prepare_upload_properties();    	
+        my ( $status, $status_msg ) = $self->pwg->UploadImage();
+
+        if ( $status ){
+            $msg = sprintf(
+                "%s : %s upload succcessful.",
+                $site_name,
+                $file
+            );
+            $uploaded++;
+        } else {
+            $msg = sprintf(
+                "An error has occured.\n%s : %s upload is cancelled.\n$status_msg",
+                $site_name,
+                $file
+            );
+            $rejected++;
+            $last_error = $status_msg;
+        }	
+        
+        $count++;
+        $self->count(
+            $count
+        );
+    	# update upload progress dialog
+    	eval {
+            $self->progress_msg_refresh->($msg);
+       	    $self->progressbar_refresh->(1);
+        };
+        croak "Upload cancelled." if $@ ;
+        
+    }
+    @{$self->image_selection} if defined 
+        $self->image_selection;
+
+    my $time_end = time;
+    my $duration = $time_end - $time_begin;
+    $msg = sprintf(
+        "%s images processed\n\n%s images uploaded\n\n%s images in errors and not uploaded - $last_error\n\nDuration : %s seconds",
+        $self->count - 1,
+        $uploaded,
+        $rejected,
+        $duration,
+    );
+    $self->progress_endinfo_refresh->($msg);
+}
+
+# if we need to rotate
+sub CreateHigh {
+    my ( $self ) = @_;
+
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+
+        my ( $vol, $dir, $file ) = File::Spec->splitpath(
+            $self->current_image->file
+        );
+    
+        my ( $filename, $ext ) = split /\./, $file ;
+    
+        # high_file is a copy of original
+        $self->current_image->site_high_file( 
+            File::Spec->catfile(
+                $self->site_resized_dir,
+                sprintf(
+                    "%s_high.%s",
+                    $filename,
+                    $self->type,
+                )
+            )
+        );
+
+        my $image = Image::Magick->new();
+        # we read original
+        my $status = $image->Read(
+            $self->current_image->file
+        );
+        warn "$status ", $self->current_image->file, "\n" if $status ;
+        return 0 if $status;
+
+        $image->Rotate( degrees=>$1 );	
+        
+        $image->Write(
+            filename=>$self->current_image->site_high_file
+        );
+        warn "$status ", $self->current_image->site_high_file, "\n" if $status ;
+        return 0 if $status;
+        
+        undef $image;
+
+        $self->_set_exif_tag(
+            $self->current_image->site_high_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+
+        # Now all images that need to be rotated are done. Update exif
+        $self->current_image->exif_metadata->{Orientation} = 'Horizontal (normal)';
+    }
+    else{
+        # high file is the original file
+        $self->current_image->site_high_file(
+            $self->current_image->file
+        );
+    }
+
+    return 1;
+}
+
+sub _prepare_upload_properties {
+    my ( $self ) = @_;
+    
+    $self->pwg->upload_high(
+        $self->upload_high
+    );
+
+    $self->pwg->site_high_file(
+        $self->current_image->site_high_file
+    );
+
+    $self->pwg->site_resized_file(
+        $self->current_image->site_resized_file
+    );
+
+    $self->pwg->site_thumb_file(
+        $self->current_image->site_thumb_file
+    );
+
+    $self->pwg->site_author(
+        $self->current_image->site_author
+    );
+
+    $self->pwg->site_comment(
+        $self->current_image->site_comment
+    );
+
+    $self->pwg->site_image_name(
+        $self->current_image->site_name
+    );
+
+    $self->pwg->site_img_date_creation(
+        $self->current_image->create_date
+    );
+
+    $self->current_image->site_categories(
+        $self->categories
+    );
+
+    $self->pwg->categories(
+        sprintf(
+            "%s",
+            join(';', @{$self->categories})
+        )
+    );
+
+    $self->pwg->tags(
+        #join(',', @{$self->current_image->site_tags})
+    );
+	
+}
+
+# read Orientation exif tag from original image
+# apply rotation to image ( preview or resize )
+sub RotateImage {
+    my ( $self, $file ) = @_;
+    
+    # exif from original image
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+        printf(
+            "Rotate %s\n",
+            $1
+        );
+
+        my $image = Image::Magick->new();
+        
+        # read resized file
+        my $status = $image->Read(
+            $file
+        );
+        warn "$status ", $file, "\n" if $status ;
+        return 0 if $status;
+    
+        $image->Rotate( degrees=>$1 );	
+        
+        # write resizd file
+        $image->Write(
+            filename=>$file
+        );
+        warn "$status ", $file, "\n" if $status ;
+        return 0 if $status;
+        
+        undef $image;
+    
+    }	
+    return 1;
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/Object.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/Object.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/Object.pm	(revision 3291)
@@ -0,0 +1,142 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Object;
+use strict;
+use Data::Dumper;
+use Storable;
+use File::Slurp ; 
+use Data::Dumper;
+use base qw/
+               Class::Accessor::Fast
+           /; 
+
+# $param is a hash with :
+# key : member name
+sub new {
+    my ( $class, $params ) = @_;
+    
+    $params ||= {};
+    
+    my $self = bless $params, $class ;
+
+    # create member accessors
+    #__PACKAGE__->mk_accessors(     
+    #    keys %$params
+    #);
+    
+    
+    if(defined $self->{plugin_file}){
+    	die "Plugin file is missing." unless -e $self->{plugin_file};
+        $self->InitPlugins();
+    }
+
+    # member accessors initialization
+    eval {
+        map {
+        	$self->$_(
+        	    $params->{$_}
+        	);
+        }
+        keys %$params;
+    };
+    if($@){
+        warn $@;	
+    }
+
+    # must be defined in child class
+    $self->Init();
+
+    
+    return $self;
+}
+
+
+sub InitPlugins {
+    my ( $self ) = @_;
+    
+    my $data;
+    eval { $data = read_file( $self->{plugin_file} ); } ;
+
+    my $plugins = [] ;
+    if( defined $data){
+        my $expr = '$plugins = ' ;
+        $expr .=  "$data  " ;
+        eval $expr ;
+    }
+    # load plugins
+    
+    my $hplugins = $plugins->[0] if scalar @$plugins;
+    while( my ( $key, $value ) = each %$hplugins ) {
+    	$self->ReadParams( $value, $key);
+    }
+    
+}
+
+sub ReadParams {
+	my( $self, $file, $key ) = @_ ;
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params  " ;
+		eval $expr ;
+	}
+	return unless 'ARRAY' eq ref $paramValues ;
+        if($@){
+            die "Cannot load data $@";	
+        }
+	if(scalar(@$paramValues )){
+	    my $params = $paramValues->[0] ;
+	    $self->SetKeyValues($params, $key);
+	}
+}
+
+sub SetKeyValues {
+    my ( $self, $params, $key )= @_;
+    if (defined $key) {	
+        foreach( keys %$params ) {
+            $self->{$key}->{$_} = $params->{$_} ;
+        }
+    }
+    else {
+        foreach( keys %$params ) {
+            $self->{$_} = $params->{$_} ;
+        }
+    }
+}
+
+
+sub get_storable {
+    my ( $self, $keys ) = @_;	
+
+    my $data = {
+        map {
+    	    $_ => $self->{$_},
+          }
+          @$keys
+    };
+    
+    $data;
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/Object2.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/Object2.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/Object2.pm	(revision 3291)
@@ -0,0 +1,128 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Object2;
+use strict;
+
+use Data::Dumper;
+use base qw/
+               Class::Accessor::Fast
+           /; 
+
+__PACKAGE__->mk_accessors(     
+    qw/
+        accessors
+        frame_callbacks
+      /
+);
+
+
+
+
+
+
+# Set control values with accessor
+sub SetControlValues {
+    my ( $self ) = @_;
+    
+    my $accessors = $self->accessors;
+    
+    # accessor_name => [ sub {}, control_id ]
+    map {
+    	my $control_id = $_;
+        $self->SetControlValue($control_id);
+   }
+    keys %$accessors;
+}
+
+
+
+sub GetControlValue {
+    my( $self, $control_id ) = @_;
+
+    my $ctrl = $self->FindWindow($control_id) ;
+    my $accessor = $self->accessors->{$control_id};
+
+    # to execute the right method
+    my $method = {
+        'Wx::TextCtrl' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetValue()
+        	              );
+                          },	
+        'Wx::StaticText' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetLabel()
+        	              );
+                          },	
+        'Wx::StaticBitmap' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetBitmap()
+        	              );
+                          },	
+        'Wx::RadioBox' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetSelection()
+        	              );
+                          },	
+    };
+
+
+    eval {
+        $method->{ref $ctrl }->();
+    };
+}
+
+
+
+sub SetControlValue {
+    my( $self, $control_id ) = @_;
+
+    my $ctrl = $self->FindWindow($control_id) ;
+    my $accessor = $self->accessors->{$control_id};
+
+
+    # to execute the right method
+    my $method = {
+        'Wx::TextCtrl' => sub { 
+        	              $ctrl->ChangeValue(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::StaticText' => sub { 
+        	              $ctrl->SetLabel(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::StaticBitmap' => sub { 
+        	              $ctrl->SetBitmap(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::RadioBox' => sub { 
+        	              $ctrl->SetSelection(
+        	                  $accessor->()
+        	              );
+                          },	
+    };
+    eval {
+        $method->{ref $ctrl }->();
+    };
+}
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG.pm	(revision 3291)
@@ -0,0 +1,64 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG;
+use strict;
+use Data::Dumper;
+use Uploader::PWG::WebServices;
+use Uploader::PWG::Categories;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           Uploader::PWG::WebServices
+           Uploader::PWG::Categories
+           /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           site_url
+           site_username
+           site_password
+      / 
+);
+
+$|=1;
+
+
+sub Init {
+    my ( $self ) = @_;
+
+    # for web services    
+    $self->SUPER::Init();
+    
+    $self->RefreshCategories;	
+
+}
+
+sub RefreshCategories {
+    my ( $self ) = @_;
+
+    $self->categories(
+        $self->prepare_items(
+            $self->GetCategories
+        )
+    );
+}
+
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG/Categories.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG/Categories.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG/Categories.pm	(revision 3291)
@@ -0,0 +1,123 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG::Categories;
+use strict;
+use Data::Dumper;
+use Wx::Locale qw/:default/;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           /;
+
+# create a list of tree items
+sub prepare_items {
+    my ( $self, $categories ) = @_;
+
+
+    my $records = {};    
+
+    # lookup by id
+    # every node is a parent
+    map {
+        $records->{$_->{id}} = _record( $_ );
+    }
+    @$categories;
+
+    # find the parent
+    map {
+    	my $child = $records->{$_};
+    	my $parentid = _parentid($child);
+        if(defined $parentid){
+            _addchild( 
+                $records->{$parentid}, 
+                $child
+            );
+            delete $records->{$_};	
+        }
+    }
+    sort { $b <=> $a }
+    keys %$records;
+
+    return [
+        [
+            gettext("Categories"),
+            undef,
+            -1,
+            0,
+            -1,
+            
+        ],
+        sort { $a->[6] <=> $b->[6] } values %$records,
+    ];
+}
+
+sub _parentid {
+    my ( $record ) = @_;
+    
+    $record->[5];
+}
+
+
+sub _addchild {
+    my ( $record, $child ) = @_;
+    
+    $record->[1] ||= [];
+    
+    my $children = $record->[1];
+    
+    push @$children, $child;
+    
+    # sort by rank 	
+    @$children = sort { $a->[6] <=> $b->[6] } @$children;
+}
+
+sub _parent_rank {
+   my ( $category ) = @_;
+
+   my @rank = split /\./, $category->{global_rank} ;
+   my @ucats = split /,/, $category->{uppercats} ;
+
+   my $parent;
+   if( 1 < scalar @ucats ){
+   	$parent = $ucats[scalar @rank - 2 ];
+   }
+   my $rank = $rank[scalar @rank - 1 ];
+   
+   return ($parent, $rank);
+}
+
+
+
+sub _record {
+    my ( $category ) = @_;
+
+    my ( $parent, $rank ) = _parent_rank($category);
+    return [
+        $category->{name},
+        undef,
+        $category,
+        1,
+        -1,
+        $parent,
+        $rank,
+    ];   
+}
+
+1;
Index: /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG/WebServices.pm
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG/WebServices.pm	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/Uploader/PWG/WebServices.pm	(revision 3291)
@@ -0,0 +1,277 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG::WebServices;
+ 
+use strict;
+use warnings;
+use MIME::Base64; 
+use JSON;
+use LWP::UserAgent;
+use Data::Dumper;
+use Digest::MD5::File qw/file_md5_hex md5_hex/;
+use File::Slurp;
+use Encode qw/encode decode/;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           uagent
+           urlbase
+           username
+           password
+           qry_list_categories
+           qry_add_categories
+           items
+           tags
+           categories
+           site_high_file
+           site_resized_file
+           site_thumb_file
+           site_image_name
+           rank
+           site_author
+           site_comment
+           site_img_date_creation
+           uagent_response
+           login_result
+           action_result
+           upload_high
+      / 
+);
+
+$|=1;
+
+sub Init {
+    my ( $self ) = @_ ;
+ 
+    $self->uagent(
+        LWP::UserAgent->new
+    );
+    
+    $self->uagent->cookie_jar({});	
+
+    $self->urlbase(
+        $self->{site_url}
+    );
+    
+    $self->username(
+        $self->{site_username}
+    );
+    
+    $self->password(
+        $self->{site_password}
+    );
+    
+    $self->qry_list_categories( sprintf
+        "%s/ws.php?format=json&method=%s&recursive=%s",
+        $self->urlbase,
+        'pwg.categories.getAdminList',
+        'true',
+    );
+
+    my $form = {
+        method => 'pwg.session.login',
+        username => $self->username,
+        password => $self->password,
+    };
+ 
+    $self->uagent_response(
+        $self->uagent->post(
+            $self->urlbase.'/ws.php?format=json',
+            $form
+        )
+    );
+    
+    my $hresult = {} ;
+
+    if($self->uagent_response->is_success){
+        eval {
+            $hresult = from_json(
+                $self->uagent_response->content
+            );
+        };
+    }
+    else{
+        $hresult = {
+            'message' => $self->uagent_response->message,
+            'stat'    => 'fail',
+        };
+    }
+        
+    $self->login_result(
+        $hresult
+    );
+
+}
+
+sub GetCategories {
+    my ( $self ) = @_;
+
+    my $result;
+    eval {
+        $result = $self->uagent->get(
+            $self->qry_list_categories
+        );
+    };
+
+    if($@){
+        printf("An error occured in query execution %s\n%s",
+            $self->qry_list_categories,
+            $@,
+        );	
+    }
+    my $hresult;
+    
+    eval {
+    	$hresult = from_json(
+            $result->content
+        );
+    };
+    
+    $hresult ||= {};
+    my $categories = $hresult->{result}{categories};
+
+
+    $categories;	
+}
+
+sub UploadImage {
+    my ( $self ) = @_;
+    
+
+
+    my $file_content = encode_base64(
+        read_file(
+            $self->site_resized_file,
+            binmode => ':raw',
+        )
+    );
+
+    my $file_sum = file_md5_hex(
+        $self->site_resized_file
+    );
+ 
+    my $thumbnail_content = encode_base64(
+        read_file(
+            $self->site_thumb_file,
+            binmode => ':raw',
+        )
+    );
+
+    my $thumbnail_sum = file_md5_hex(
+        $self->site_thumb_file,
+    );
+
+    my $original_sum = file_md5_hex(
+        $self->site_high_file
+    );
+
+    my $form = {
+        method            => 'pwg.images.exist',
+        md5sum_list       => $original_sum,
+    };
+
+    my $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    #print Dumper $result;
+    my $hresult = {};
+        eval {
+            $hresult = from_json(
+                $result->{_content}
+            );
+        };
+    #print Dumper $hresult;
+    my $image_id = $hresult->{result}{$original_sum};
+    if(!defined($image_id)){
+        $form = {
+            method            => 'pwg.images.add',
+            original_sum      => $original_sum,
+            file_sum          => $file_sum,
+            file_content      => $file_content,
+            thumbnail_sum     => $thumbnail_sum,
+            thumbnail_content => $thumbnail_content,
+            categories        => $self->categories,
+            name              => $self->site_image_name,
+            rank              => $self->rank,
+            author            => $self->site_author,
+            comment           => $self->site_comment,
+            date_creation     => $self->site_img_date_creation,
+            
+        };
+    
+        if($self->upload_high){
+        	$form->{high_content} = encode_base64(
+        	                             read_file(
+        	                                 $self->site_high_file,
+                                             binmode => ':raw',
+        	                             )
+        	                         );
+    
+        	$form->{high_sum}     = $original_sum;
+        }
+    }
+    else {
+        $form = {
+            method            => 'pwg.images.setInfo',
+            image_id          => $image_id,
+            categories        => $self->categories,
+            name              => $self->site_image_name,
+            rank              => $self->rank,
+            author            => $self->site_author,
+            comment           => $self->site_comment,
+            date_creation     => $self->site_img_date_creation,
+        };
+    }
+
+    $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    return ( $result->is_success, $result->status_line );
+}
+ 
+
+sub AddCategories{
+    my ( $self, $name, $parentid ) = @_;
+
+    my $form = {
+        method            => 'pwg.categories.add',
+        name              => $name,
+        parent            => $parentid,
+        
+    };
+
+    my $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    return ( $result->is_success, $result->status_line );
+	
+} 
+1;
+    
Index: /extensions/pLoader/tags/2.0.0b/src/pLoader.exe.manifest
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/pLoader.exe.manifest	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/pLoader.exe.manifest	(revision 3291)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+     <assemblyIdentity
+         processorArchitecture="x86"
+         version="5.1.0.0"
+         type="win32"
+         name="Controls"
+     />
+     <description>pLoader</description>
+     <dependency>
+         <dependentAssembly>
+             <assemblyIdentity
+                 type="win32"
+                 name="Microsoft.Windows.Common-Controls"        
+                 version="6.0.0.0"
+                 publicKeyToken="6595b64144ccf1df"
+                 language="*"
+                 processorArchitecture="x86"
+         />
+     </dependentAssembly>
+     </dependency>
+ </assembly>
Index: /extensions/pLoader/tags/2.0.0b/src/pLoader.ini
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/pLoader.ini	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/pLoader.ini	(revision 3291)
@@ -0,0 +1,7 @@
+[
+    {
+        site_url      => 'http://localhost',
+        site_username => 'username',
+        site_password => 'password',
+    }
+]
Index: /extensions/pLoader/tags/2.0.0b/src/ploader.pl
===================================================================
--- /extensions/pLoader/tags/2.0.0b/src/ploader.pl	(revision 3291)
+++ /extensions/pLoader/tags/2.0.0b/src/ploader.pl	(revision 3291)
@@ -0,0 +1,40 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.  i                            |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+
+use strict;
+use Wx ;
+use Class::Accessor::Fast;
+use Uploader::GUI::wxApp;
+use JSON;
+
+BEGIN { use Wx::Perl::Packager; }
+
+require '../res/progress_wdr.pl'; 
+require '../res/login_wdr.pl'; 
+require '../res/photo_properties_wdr.pl'; 
+require '../res/photo_exif_wdr.pl'; 
+require '../res/global_settings_wdr.pl'; 
+
+my $app = Uploader::GUI::wxApp->new(@_);
+$app->MainLoop();
+
+1;
+
+
Index: /extensions/pLoader/trunk/build/build_pLoader.bat
===================================================================
--- /extensions/pLoader/trunk/build/build_pLoader.bat	(revision 3291)
+++ /extensions/pLoader/trunk/build/build_pLoader.bat	(revision 3291)
@@ -0,0 +1,1 @@
+wxpar.bat @par_options.txt --gui --icon=..\res\favicon.ico -output=pLoader.exe ..\src\pLoader.pl
Index: /extensions/pLoader/trunk/build/par_options.txt
===================================================================
--- /extensions/pLoader/trunk/build/par_options.txt	(revision 3291)
+++ /extensions/pLoader/trunk/build/par_options.txt	(revision 3291)
@@ -0,0 +1,184 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+# wxpar Getopt::Argfile for PAR::Packer pp
+
+-M attributes.pm
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/mingwm10.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_adv_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_qa_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_html_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxbase28u_net_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_gl_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_aui_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxmsw28u_core_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/Alien/wxWidgets/msw_2_8_8_uni_mslu_gcc_3_4/lib/wxbase28u_gcc_custom.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/delegates.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_vicar_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_x_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ept_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sun_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_png_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wpg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pdb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_txt_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cip_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xpm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xtrn_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pwp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/type.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_Magick++_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/X11.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cin_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_raw_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pix_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/Xext.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_plasma_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fax_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/configure.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/magic.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sfw_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_map_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_magick_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pdf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_clip_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_url_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rgb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_scr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_locale_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_art_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tiff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_thumbnail_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/analyze.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gray_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_xlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jp2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_braille_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps3_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jbig_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tim_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rla_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pnm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xwd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_rle_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cmyk_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_svg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_histogram_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/thresholds.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_magick_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_djvu_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_label_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gif_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/Magick.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpc_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wbmp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tga_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mpr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mvg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jbig_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dpx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_viff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/log.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_logo_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dcm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_wand_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dng_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/coder.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/english.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_miff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_msl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_html_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xbm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_exr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_jpeg_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_avs_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pict_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_jp2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ycbcr_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_emf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_topol_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pcx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/autosplit.ix
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_zlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xc_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/locale.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cut_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_uyvy_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mat_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_libxml_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_meta_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_matte_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_uil_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_caption_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mtv_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fpx_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_yuv_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_mono_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ps2_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_lcms_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sgi_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_otb_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_palm_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_vid_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_sct_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_bmp_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_clipboard_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_tiff_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/colors.xml
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_tile_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_cineon_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dps_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_xcf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dot_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_gradient_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_fits_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_avi_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_psd_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_bzlib_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_ttf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_wmf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_stegano_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_preview_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_info_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_null_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_pattern_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_icon_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ttf_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_ipl_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/CORE_RL_png_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/IM_MOD_RL_dds_.dll
+-l C:/strawberry/perl/site/lib/auto/Image/Magick/type-ghostscript.xml
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Windows.pm;lib/File/HomeDir/Windows.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Darwin.pm;lib/File/HomeDir/Darwin.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Driver.pm;lib/File/HomeDir/Driver.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/MacOS9.pm;lib/File/HomeDir/MacOS9.pm"
+-a "C:/strawberry/perl/site/lib/File/HomeDir/Unix.pm;lib/File/HomeDir/Unix.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP.pm;lib/JSON/PP.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP56.pm;lib/JSON/PP56.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP58.pm;lib/JSON/PP58.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP5005.pm;lib/JSON/PP5005.pm"
+-a "C:/strawberry/perl/site/lib/JSON/PP/Boolean.pm;lib/JSON/PP/Boolean.pm"
+-l pLoader.exe.manifest
Index: /extensions/pLoader/trunk/locale/en_EN/pLoader.po
===================================================================
--- /extensions/pLoader/trunk/locale/en_EN/pLoader.po	(revision 3291)
+++ /extensions/pLoader/trunk/locale/en_EN/pLoader.po	(revision 3291)
@@ -0,0 +1,15 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Piwigo pLoader\n"
+"Language-Team: Piwigo team <team@piwigo.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: \n"
+"Last-Translator: ron osman <ron@piwigo.com>\n"
+
+#: ../res/login_wdr.pl:43
+msgid "Admin. username :"
+msgstr ""
+
Index: /extensions/pLoader/trunk/locale/fr_FR/pLoader.po
===================================================================
--- /extensions/pLoader/trunk/locale/fr_FR/pLoader.po	(revision 3291)
+++ /extensions/pLoader/trunk/locale/fr_FR/pLoader.po	(revision 3291)
@@ -0,0 +1,335 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Piwigo pLoader\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-02-14 11:36+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: ron osman <ron@piwigo.com>\n"
+"Language-Team: Piwigo team <team@piwigo.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-SearchPath-0: C:/strawberry/perl/site/lib/Uploader/GUI\n"
+"X-Poedit-SearchPath-1: d:/pLoader/res\n"
+
+msgid "Select photos for upload"
+msgstr "Choisir les photos à transférer"
+
+msgid "JPEG files"
+msgstr "Fichiers JPEG"
+
+msgid "Default author :"
+msgstr "Auteur par défaut :"
+
+msgid "Photo caption  prefix :"
+msgstr "Préfixe du titre de la photo :"
+
+msgid "Site thumbnail size :"
+msgstr "Taille des miniature :"
+
+msgid "Site image width :"
+msgstr "Largeur de l'image"
+
+msgid "Site image height :"
+msgstr "Hauteur de l'image"
+
+msgid "Auto rotate image"
+msgstr "Rotation automatique de l'image"
+
+msgid "Upload high (original size) "
+msgstr "Transfert haute définition ( taille originale )"
+
+msgid "Yes"
+msgstr "Oui"
+
+msgid "No"
+msgstr "Non"
+
+msgid "Admin. username :"
+msgstr "Identifiant administrateur :"
+
+msgid "Admin. password :"
+msgstr "Mot de passe administrateur :"
+
+msgid "OK"
+msgstr "Valider"
+
+msgid "Cancel"
+msgstr "Annuler"
+
+msgid "Create date :"
+msgstr "Date de création :"
+
+msgid "Width :"
+msgstr "Largeur :"
+
+msgid "Height :"
+msgstr "Hauteur :"
+
+msgid "Orientation :"
+msgstr "Orientation :"
+
+msgid "Shutter speed :"
+msgstr "Vitesse d'obturation :"
+
+msgid "Aperture :"
+msgstr "Ouverture :"
+
+msgid "Focal length :"
+msgstr "Longueur focale :"
+
+msgid "Model :"
+msgstr "Modèle :"
+
+msgid "Lens :"
+msgstr "Optique :"
+
+msgid "Author :"
+msgstr "Auteur :"
+
+msgid "Comment :"
+msgstr "Commentaire :"
+
+msgid "French"
+msgstr "Français"
+
+msgid "English"
+msgstr "Anglais"
+
+msgid "Russian"
+msgstr "Russe"
+
+msgid "Italian"
+msgstr "Italien"
+
+msgid "German"
+msgstr "Allemand"
+
+msgid "Spanish"
+msgstr "Espagnol"
+
+msgid "Portuguese"
+msgstr "Portugais"
+
+msgid "Dutch"
+msgstr "Hollandais"
+
+msgid "Polish"
+msgstr "Polonais"
+
+msgid "Piwigo categories"
+msgstr "Catégories dans Piwigo"
+
+msgid "Photo properties"
+msgstr "Propriétés de la photo"
+
+msgid "Tools"
+msgstr "Outils"
+
+msgid "Global settings"
+msgstr "Préférences"
+
+msgid "General"
+msgstr "Général"
+
+msgid "Resized"
+msgstr "Réduction"
+
+msgid "Thumbnail"
+msgstr "Miniature"
+
+msgid "Preview"
+msgstr "Prévisualisation"
+
+msgid "Photo selection"
+msgstr "Photo sélectionnées"
+
+msgid "Language choice"
+msgstr "Choix de la langue"
+
+msgid "Choose a language"
+msgstr "Choisir une langue"
+
+msgid "Upload to Piwigo"
+msgstr "Transférer vers Piwigo"
+
+msgid "Remove photo from selection"
+msgstr "Enlever la photo de la sélection"
+
+msgid "Add photo to selection"
+msgstr "Ajouter la photo à la sélection"
+
+msgid "Not connected"
+msgstr "Non connecté"
+
+msgid "Connection to"
+msgstr "La connection à"
+
+msgid "failed"
+msgstr "a échoué"
+
+msgid "Piwigo login"
+msgstr "Connection à Piwigo"
+
+msgid "Piwigo login error"
+msgstr "Erreur de connection à Piwigo"
+
+msgid "Please select a valid target category"
+msgstr "Veuillez sélectionner une autre catégorie"
+
+msgid "Piwigo upload error"
+msgstr "Erreur de transfert vers Piwigo"
+
+msgid "Category name :"
+msgstr "Nom de la catégorie"
+
+msgid "Add new category"
+msgstr "Ajouter une nouvelle catégorie"
+
+msgid "New category"
+msgstr "Nouvelle catégorie"
+
+msgid "Upload cancelled"
+msgstr "Transfert annulé"
+
+msgid "Image upload progress information"
+msgstr "Progression du transfert d'image"
+
+msgid "Cancel upload"
+msgstr "Annuler le transfert"
+
+msgid "Piwigo upload information"
+msgstr "Information sur le transfert vers Piwigo"
+
+msgid "Processing"
+msgstr "Traitement en cours"
+
+msgid "images processed"
+msgstr "images traitées"
+
+msgid "images uploaded"
+msgstr "images transférées"
+
+msgid "images in errors and not uploaded"
+msgstr "images en erreur et non transférées"
+
+msgid "Duration"
+msgstr "Durée"
+
+msgid "Categories"
+msgstr "Catégories"
+
+msgid "categories"
+msgstr "catégories"
+
+msgid "Categorie"
+msgstr "Catégorie"
+
+msgid "categorie"
+msgstr "catégorie"
+
+msgid "Album"
+msgstr "Album"
+
+msgid "Albums"
+msgstr "Albums"
+
+msgid "album"
+msgstr "album"
+
+msgid "albums"
+msgstr "albums"
+
+msgid "Photo caption :"
+msgstr "Titre de la photo :"
+
+msgid "File name :"
+msgstr "Nom du fichier :"
+
+msgid "Default photo caption :"
+msgstr "Titre par défaut :"
+
+msgid "Resize site image :"
+msgstr "Réduire pour le site :"
+
+msgid "Auto rotate :"
+msgstr "Rotation automatique :"
+
+msgid "Upload high (original size) :"
+msgstr "Transférer la photo originale :"
+
+msgid "Site image jpeg quality :"
+msgstr "Qualité jpeg de la photo :"
+
+msgid "Site image filter :"
+msgstr "Filtre de réduction :"
+
+msgid "Site image blur :"
+msgstr "Accentuation/flou :"
+
+msgid "Site image interlace :"
+msgstr "Entrelacement :"
+
+msgid "Site thumbnail jpeg quality :"
+msgstr "Qualité jpeg des miniatures du site :"
+
+msgid "Photo selection thumbnail size :"
+msgstr "Taille des miniatures de la sélection photo :"
+
+msgid "Photo selection thumbnail jpeg quality :"
+msgstr "Qualité jpeg des miniatures de la sélection photo :"
+
+msgid "Use exif preview when available :"
+msgstr "Utiliser la prévisualisation  exif :"
+
+msgid "Custom preview ratio :"
+msgstr "Ratio de prévisualisation :"
+
+msgid "Piwigo url"
+msgstr "Adresse du site Piwigo"
+
+msgid "Connect"
+msgstr "Connecter"
+
+msgid "Work Offline"
+msgstr "Travailler hors connexion"
+
+msgid "Exit"
+msgstr "Sortir"
+
+msgid "empty - work Offline"
+msgstr "rien à afficher - hors connexion"
+
+msgid "None"
+msgstr "Aucun"
+
+msgid "File name"
+msgstr "Nom du fichier"
+
+msgid "File path and name"
+msgstr "Chemin et nom du fichier"
+
+msgid "Prefix"
+msgstr "Préfixe"
+
+msgid "Prefix + rank number"
+msgstr "Préfixe + N° d'ordre"
+
+msgid "Rank number + prefix"
+msgstr "N° d'ordre + préfixe"
+
+msgid "Prefix + create date chrono"
+msgstr "Préfixe + chrono date de création"
+
+msgid "Create date chrono + prefix"
+msgstr "Chrono date de création + préfixe"
+
+msgid "Photo"
+msgstr "Photo"
+
+msgid "Image processing progress information"
+msgstr "Progression du traitement d'image"
+
+msgid "Cancel image processing"
+msgstr "Annuler le traitement d'image"
Index: /extensions/pLoader/trunk/res/intro.html
===================================================================
--- /extensions/pLoader/trunk/res/intro.html	(revision 3291)
+++ /extensions/pLoader/trunk/res/intro.html	(revision 3291)
@@ -0,0 +1,6 @@
+<body style="background-color:#111111">
+  <div style="margin:5em auto; color:#777777; font-size:2em; text-align:center;">
+    <img src="piwigo_logo.png" style="margin-bottom:1em"/><br />
+    Drop your photos
+  </div>
+</body>
Index: /extensions/pLoader/trunk/res/login_wdr.pl
===================================================================
--- /extensions/pLoader/trunk/res/login_wdr.pl	(revision 3291)
+++ /extensions/pLoader/trunk/res/login_wdr.pl	(revision 3291)
@@ -0,0 +1,100 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: login.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxNullAnimation wxNullFont wxBLACK );
+use Wx qw( wxID_OK wxID_APPLY wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_NO wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxTE_PASSWORD );
+use Wx::Locale;
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_TEXT); $ID_TEXT = 10000;
+use vars qw($ID_PWG_URL); $ID_PWG_URL = 10001;
+use vars qw($ID_PWG_USERNAME); $ID_PWG_USERNAME = 10002;
+use vars qw($ID_PWG_PASSWORD); $ID_PWG_PASSWORD = 10003;
+use vars qw($ID_PWG_OK); $ID_PWG_OK = 10004;
+use vars qw($ID_PWG_OFFLINE); $ID_PWG_OFFLINE = 10005;
+use vars qw($ID_PWG_CANCEL); $ID_PWG_CANCEL = 10006;
+
+sub Login {
+    my( $parent ) = $_[0];
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    $item0->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item2 ) = Wx::StaticBox->new( $parent, -1, "" );
+    my( $item1 ) = Wx::StaticBoxSizer->new( $item2, wxVERTICAL );
+    
+    my( $item3 ) = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
+    
+    my( $item4 ) = Wx::StaticText->new( $parent, $main::ID_TEXT, gettext("Piwigo url"), wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item5 ) = Wx::TextCtrl->new( $parent, $main::ID_PWG_URL, "", wxDefaultPosition, [400,-1], 0 );
+    $item3->AddWindow( $item5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::StaticText->new( $parent, $main::ID_TEXT, gettext("Admin. username :"), wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item7 ) = Wx::TextCtrl->new( $parent, $main::ID_PWG_USERNAME, "", wxDefaultPosition, [200,-1], 0 );
+    $item3->AddWindow( $item7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item8 ) = Wx::StaticText->new( $parent, $main::ID_TEXT, gettext("Admin. password :"), wxDefaultPosition, wxDefaultSize, 0 );
+    $item3->AddWindow( $item8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item9 ) = Wx::TextCtrl->new( $parent, $main::ID_PWG_PASSWORD, "", wxDefaultPosition, [200,-1], wxTE_PASSWORD );
+    $item3->AddWindow( $item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->Add( $item3, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item10 ) = Wx::BoxSizer->new( wxHORIZONTAL );
+    
+    my( $item11 ) = Wx::Button->new( $parent, $main::ID_PWG_OK, gettext("Connect"), wxDefaultPosition, wxDefaultSize, 0 );
+    $item11->SetDefault();
+    $item10->AddWindow( $item11, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item12 ) = Wx::Button->new( $parent, $main::ID_PWG_OFFLINE, gettext("Work Offline"), wxDefaultPosition, wxDefaultSize, 0 );
+    $item10->AddWindow( $item12, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item13 ) = Wx::Button->new( $parent, $main::ID_PWG_CANCEL, gettext("Exit"), wxDefaultPosition, wxDefaultSize, 0 );
+    $item10->AddWindow( $item13, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item10, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+use Wx qw( wxITEM_NORMAL wxITEM_RADIO wxITEM_CHECK );
+
+
+# End of generated file
Index: /extensions/pLoader/trunk/res/progress_wdr.pl
===================================================================
--- /extensions/pLoader/trunk/res/progress_wdr.pl	(revision 3291)
+++ /extensions/pLoader/trunk/res/progress_wdr.pl	(revision 3291)
@@ -0,0 +1,75 @@
+#-----------------------------------------------------------------------------
+# Perl source generated by wxDesigner from file: progress.wdr
+# Do not modify this file, all changes will be lost!
+#-----------------------------------------------------------------------------
+
+use Wx;
+use strict;
+
+use Wx qw( wxDefaultSize wxDefaultPosition wxID_OK wxID_SAVE wxID_SAVEAS wxID_CANCEL wxID_YES wxID_EXIT wxID_ABOUT wxID_HELP );
+use Wx qw( wxVERTICAL wxHORIZONTAL wxALL wxLEFT wxRIGHT wxTOP wxBOTTOM wxCENTRE wxGROW wxADJUST_MINSIZE );
+use Wx qw( wxALIGN_RIGHT wxALIGN_BOTTOM wxALIGN_CENTER wxALIGN_CENTER_VERTICAL wxALIGN_CENTER_HORIZONTAL );
+use Wx qw( wxLI_HORIZONTAL );
+
+# Bitmap functions
+
+use Wx qw( wxNullBitmap wxBITMAP_TYPE_PNG );
+
+# Window functions
+
+use vars qw($ID_PROGRESS_TXT); $ID_PROGRESS_TXT = 10000;
+use vars qw($ID_STATICBITMAP); $ID_STATICBITMAP = 10001;
+use vars qw($ID_PROGRESS_GAUGE); $ID_PROGRESS_GAUGE = 10002;
+use vars qw($ID_LINE); $ID_LINE = 10003;
+use vars qw($ID_PROGRESS_OK); $ID_PROGRESS_OK = 10004;
+
+sub ProcessingProgress {
+    my( $item0 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item1 ) = Wx::BoxSizer->new( wxVERTICAL );
+    
+    my( $item2 ) = Wx::StaticText->new( $_[0], $main::ID_PROGRESS_TXT, "Processing", wxDefaultPosition, wxDefaultSize, 0 );
+    $item1->AddWindow( $item2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    $item1->AddSpace( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item3 ) = Wx::StaticBitmap->new( $_[0], $main::ID_STATICBITMAP, wxNullBitmap, wxDefaultPosition, [100,100] );
+    $item1->AddWindow( $item3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+
+    $item1->AddSpace( 20, 30, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item4 ) = Wx::Gauge->new( $_[0], $main::ID_PROGRESS_GAUGE, 100, wxDefaultPosition, [400,12], 0 );
+    $item1->AddWindow( $item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 10 );
+
+    $item0->Add( $item1, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $item5 ) = Wx::StaticLine->new( $_[0], $main::ID_LINE, wxDefaultPosition, [20,-1], wxLI_HORIZONTAL );
+    $item0->AddWindow( $item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+    my( $item6 ) = Wx::BoxSizer->new( wxHORIZONTAL );
+    
+    my( $item7 ) = Wx::Button->new( $_[0], $main::ID_PROGRESS_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 );
+    $item6->AddWindow( $item7, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    $item0->Add( $item6, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    my( $set_size ) = @_ >= 3 ? $_[2] : 1;
+    my( $call_fit ) = @_ >= 2 ? $_[1] : 1;
+    if( $set_size == 1 ) {
+         $_[0]->SetSizer( $item0 );
+         
+         if( $call_fit == 1 ) {
+             $item0->SetSizeHints( $_[0] );
+         }
+    }
+    
+    $item0;
+}
+
+# Menu bar functions
+
+
+# Toolbar functions
+
+
+# End of generated file
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm	(revision 3291)
@@ -0,0 +1,962 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxApp;
+use strict;
+use base qw/Wx::App Class::Accessor::Fast/;    
+use Wx qw/
+             wxBITMAP_TYPE_GIF 
+             wxBITMAP_TYPE_ICO 
+             wxBITMAP_TYPE_BMP 
+             wxBITMAP_TYPE_PNG 
+             wxBITMAP_TYPE_JPEG
+             wxIMAGE_QUALITY_NORMAL
+             wxIMAGE_QUALITY_HIGH
+             wxSPLASH_CENTRE_ON_SCREEN 
+             wxSPLASH_TIMEOUT
+             wxDefaultPosition 
+             wxDefaultSize 
+             wxSIMPLE_BORDER 
+             wxFRAME_TOOL_WINDOW
+             wxFRAME_NO_TASKBAR wxSTAY_ON_TOP
+             wxWHITE
+             wxICON_EXCLAMATION
+             wxOK 
+             wxLANGUAGE_ABKHAZIAN   
+             wxLANGUAGE_AFAR   
+             wxLANGUAGE_AFRIKAANS   
+             wxLANGUAGE_ALBANIAN   
+             wxLANGUAGE_AMHARIC   
+             wxLANGUAGE_ARABIC   
+             wxLANGUAGE_ARABIC_ALGERIA   
+             wxLANGUAGE_ARABIC_BAHRAIN   
+             wxLANGUAGE_ARABIC_EGYPT   
+             wxLANGUAGE_ARABIC_IRAQ   
+             wxLANGUAGE_ARABIC_JORDAN   
+             wxLANGUAGE_ARABIC_KUWAIT   
+             wxLANGUAGE_ARABIC_LEBANON   
+             wxLANGUAGE_ARABIC_LIBYA   
+             wxLANGUAGE_ARABIC_MOROCCO   
+             wxLANGUAGE_ARABIC_OMAN   
+             wxLANGUAGE_ARABIC_QATAR   
+             wxLANGUAGE_ARABIC_SAUDI_ARABIA   
+             wxLANGUAGE_ARABIC_SUDAN   
+             wxLANGUAGE_ARABIC_SYRIA   
+             wxLANGUAGE_ARABIC_TUNISIA   
+             wxLANGUAGE_ARABIC_UAE   
+             wxLANGUAGE_ARABIC_YEMEN   
+             wxLANGUAGE_ARMENIAN   
+             wxLANGUAGE_ASSAMESE   
+             wxLANGUAGE_AYMARA   
+             wxLANGUAGE_AZERI   
+             wxLANGUAGE_AZERI_CYRILLIC   
+             wxLANGUAGE_AZERI_LATIN   
+             wxLANGUAGE_BASHKIR   
+             wxLANGUAGE_BASQUE   
+             wxLANGUAGE_BELARUSIAN   
+             wxLANGUAGE_BENGALI   
+             wxLANGUAGE_BHUTANI   
+             wxLANGUAGE_BIHARI   
+             wxLANGUAGE_BISLAMA   
+             wxLANGUAGE_BRETON   
+             wxLANGUAGE_BULGARIAN   
+             wxLANGUAGE_BURMESE   
+             wxLANGUAGE_CAMBODIAN   
+             wxLANGUAGE_CATALAN   
+             wxLANGUAGE_CHINESE   
+             wxLANGUAGE_CHINESE_SIMPLIFIED   
+             wxLANGUAGE_CHINESE_TRADITIONAL   
+             wxLANGUAGE_CHINESE_HONGKONG   
+             wxLANGUAGE_CHINESE_MACAU   
+             wxLANGUAGE_CHINESE_SINGAPORE   
+             wxLANGUAGE_CHINESE_TAIWAN   
+             wxLANGUAGE_CORSICAN   
+             wxLANGUAGE_CROATIAN   
+             wxLANGUAGE_CZECH   
+             wxLANGUAGE_DANISH   
+             wxLANGUAGE_DUTCH   
+             wxLANGUAGE_DUTCH_BELGIAN   
+             wxLANGUAGE_ENGLISH   
+             wxLANGUAGE_ENGLISH_UK   
+             wxLANGUAGE_ENGLISH_US   
+             wxLANGUAGE_ENGLISH_AUSTRALIA   
+             wxLANGUAGE_ENGLISH_BELIZE   
+             wxLANGUAGE_ENGLISH_BOTSWANA   
+             wxLANGUAGE_ENGLISH_CANADA   
+             wxLANGUAGE_ENGLISH_CARIBBEAN   
+             wxLANGUAGE_ENGLISH_DENMARK   
+             wxLANGUAGE_ENGLISH_EIRE   
+             wxLANGUAGE_ENGLISH_JAMAICA   
+             wxLANGUAGE_ENGLISH_NEW_ZEALAND   
+             wxLANGUAGE_ENGLISH_PHILIPPINES   
+             wxLANGUAGE_ENGLISH_SOUTH_AFRICA   
+             wxLANGUAGE_ENGLISH_TRINIDAD   
+             wxLANGUAGE_ENGLISH_ZIMBABWE   
+             wxLANGUAGE_ESPERANTO   
+             wxLANGUAGE_ESTONIAN   
+             wxLANGUAGE_FAEROESE   
+             wxLANGUAGE_FARSI   
+             wxLANGUAGE_FIJI   
+             wxLANGUAGE_FINNISH   
+             wxLANGUAGE_FRENCH   
+             wxLANGUAGE_FRENCH_BELGIAN   
+             wxLANGUAGE_FRENCH_CANADIAN   
+             wxLANGUAGE_FRENCH_LUXEMBOURG   
+             wxLANGUAGE_FRENCH_MONACO   
+             wxLANGUAGE_FRENCH_SWISS   
+             wxLANGUAGE_FRISIAN   
+             wxLANGUAGE_GALICIAN   
+             wxLANGUAGE_GEORGIAN   
+             wxLANGUAGE_GERMAN   
+             wxLANGUAGE_GERMAN_AUSTRIAN   
+             wxLANGUAGE_GERMAN_BELGIUM   
+             wxLANGUAGE_GERMAN_LIECHTENSTEIN   
+             wxLANGUAGE_GERMAN_LUXEMBOURG   
+             wxLANGUAGE_GERMAN_SWISS   
+             wxLANGUAGE_GREEK   
+             wxLANGUAGE_GREENLANDIC   
+             wxLANGUAGE_GUARANI   
+             wxLANGUAGE_GUJARATI   
+             wxLANGUAGE_HAUSA   
+             wxLANGUAGE_HEBREW   
+             wxLANGUAGE_HINDI   
+             wxLANGUAGE_HUNGARIAN   
+             wxLANGUAGE_ICELANDIC   
+             wxLANGUAGE_INDONESIAN   
+             wxLANGUAGE_INTERLINGUA   
+             wxLANGUAGE_INTERLINGUE   
+             wxLANGUAGE_INUKTITUT   
+             wxLANGUAGE_INUPIAK   
+             wxLANGUAGE_IRISH   
+             wxLANGUAGE_ITALIAN   
+             wxLANGUAGE_ITALIAN_SWISS   
+             wxLANGUAGE_JAPANESE   
+             wxLANGUAGE_JAVANESE   
+             wxLANGUAGE_KANNADA   
+             wxLANGUAGE_KASHMIRI   
+             wxLANGUAGE_KASHMIRI_INDIA   
+             wxLANGUAGE_KAZAKH   
+             wxLANGUAGE_KERNEWEK   
+             wxLANGUAGE_KINYARWANDA   
+             wxLANGUAGE_KIRGHIZ   
+             wxLANGUAGE_KIRUNDI   
+             wxLANGUAGE_KONKANI   
+             wxLANGUAGE_KOREAN   
+             wxLANGUAGE_KURDISH   
+             wxLANGUAGE_LAOTHIAN   
+             wxLANGUAGE_LATIN   
+             wxLANGUAGE_LATVIAN   
+             wxLANGUAGE_LINGALA   
+             wxLANGUAGE_LITHUANIAN   
+             wxLANGUAGE_MACEDONIAN   
+             wxLANGUAGE_MALAGASY   
+             wxLANGUAGE_MALAY   
+             wxLANGUAGE_MALAYALAM   
+             wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM   
+             wxLANGUAGE_MALAY_MALAYSIA   
+             wxLANGUAGE_MALTESE   
+             wxLANGUAGE_MANIPURI   
+             wxLANGUAGE_MAORI   
+             wxLANGUAGE_MARATHI   
+             wxLANGUAGE_MOLDAVIAN   
+             wxLANGUAGE_MONGOLIAN   
+             wxLANGUAGE_NAURU   
+             wxLANGUAGE_NEPALI   
+             wxLANGUAGE_NEPALI_INDIA   
+             wxLANGUAGE_NORWEGIAN_BOKMAL   
+             wxLANGUAGE_NORWEGIAN_NYNORSK   
+             wxLANGUAGE_OCCITAN   
+             wxLANGUAGE_ORIYA   
+             wxLANGUAGE_OROMO   
+             wxLANGUAGE_PASHTO   
+             wxLANGUAGE_POLISH   
+             wxLANGUAGE_PORTUGUESE   
+             wxLANGUAGE_PORTUGUESE_BRAZILIAN   
+             wxLANGUAGE_PUNJABI   
+             wxLANGUAGE_QUECHUA   
+             wxLANGUAGE_RHAETO_ROMANCE   
+             wxLANGUAGE_ROMANIAN   
+             wxLANGUAGE_RUSSIAN   
+             wxLANGUAGE_RUSSIAN_UKRAINE   
+             wxLANGUAGE_SAMI   
+             wxLANGUAGE_SAMOAN   
+             wxLANGUAGE_SANGHO   
+             wxLANGUAGE_SANSKRIT   
+             wxLANGUAGE_SCOTS_GAELIC   
+             wxLANGUAGE_SERBIAN   
+             wxLANGUAGE_SERBIAN_CYRILLIC   
+             wxLANGUAGE_SERBIAN_LATIN   
+             wxLANGUAGE_SERBO_CROATIAN   
+             wxLANGUAGE_SESOTHO   
+             wxLANGUAGE_SETSWANA   
+             wxLANGUAGE_SHONA   
+             wxLANGUAGE_SINDHI   
+             wxLANGUAGE_SINHALESE   
+             wxLANGUAGE_SISWATI   
+             wxLANGUAGE_SLOVAK   
+             wxLANGUAGE_SLOVENIAN   
+             wxLANGUAGE_SOMALI   
+             wxLANGUAGE_SPANISH   
+             wxLANGUAGE_SPANISH_ARGENTINA   
+             wxLANGUAGE_SPANISH_BOLIVIA   
+             wxLANGUAGE_SPANISH_CHILE   
+             wxLANGUAGE_SPANISH_COLOMBIA   
+             wxLANGUAGE_SPANISH_COSTA_RICA   
+             wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC   
+             wxLANGUAGE_SPANISH_ECUADOR   
+             wxLANGUAGE_SPANISH_EL_SALVADOR   
+             wxLANGUAGE_SPANISH_GUATEMALA   
+             wxLANGUAGE_SPANISH_HONDURAS   
+             wxLANGUAGE_SPANISH_MEXICAN   
+             wxLANGUAGE_SPANISH_MODERN   
+             wxLANGUAGE_SPANISH_NICARAGUA   
+             wxLANGUAGE_SPANISH_PANAMA   
+             wxLANGUAGE_SPANISH_PARAGUAY   
+             wxLANGUAGE_SPANISH_PERU   
+             wxLANGUAGE_SPANISH_PUERTO_RICO   
+             wxLANGUAGE_SPANISH_URUGUAY   
+             wxLANGUAGE_SPANISH_US   
+             wxLANGUAGE_SPANISH_VENEZUELA   
+             wxLANGUAGE_SUNDANESE   
+             wxLANGUAGE_SWAHILI   
+             wxLANGUAGE_SWEDISH   
+             wxLANGUAGE_SWEDISH_FINLAND   
+             wxLANGUAGE_TAGALOG   
+             wxLANGUAGE_TAJIK   
+             wxLANGUAGE_TAMIL   
+             wxLANGUAGE_TATAR   
+             wxLANGUAGE_TELUGU   
+             wxLANGUAGE_THAI   
+             wxLANGUAGE_TIBETAN   
+             wxLANGUAGE_TIGRINYA   
+             wxLANGUAGE_TONGA   
+             wxLANGUAGE_TSONGA   
+             wxLANGUAGE_TURKISH   
+             wxLANGUAGE_TURKMEN   
+             wxLANGUAGE_TWI   
+             wxLANGUAGE_UIGHUR   
+             wxLANGUAGE_UKRAINIAN   
+             wxLANGUAGE_URDU   
+             wxLANGUAGE_URDU_INDIA   
+             wxLANGUAGE_URDU_PAKISTAN   
+             wxLANGUAGE_UZBEK   
+             wxLANGUAGE_UZBEK_CYRILLIC   
+             wxLANGUAGE_UZBEK_LATIN   
+             wxLANGUAGE_VALENCIAN   
+             wxLANGUAGE_VIETNAMESE   
+             wxLANGUAGE_VOLAPUK   
+             wxLANGUAGE_WELSH   
+             wxLANGUAGE_WOLOF   
+             wxLANGUAGE_XHOSA   
+             wxLANGUAGE_YIDDISH   
+             wxLANGUAGE_YORUBA   
+             wxLANGUAGE_ZHUANG   
+             wxLANGUAGE_ZULU  
+         /;
+use Uploader::GUI::wxFrameAUI;
+use File::Slurp ;
+use Data::Dumper;
+use Storable;
+use File::HomeDir;
+use File::Spec;
+use Uploader::PWG;
+use Uploader::ImageList;
+use Uploader::GUI::wxLoginDlg;
+use Wx::Locale qw/:default/;
+
+
+$|=1;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          pwg
+          site_url
+          site_username
+          site_password
+          http_username
+          http_password
+          rejects
+          imagelist
+          storable_file
+          wx_thumb_dir
+          resized_dir
+          preview_dir
+          userdata_dir
+          resized_dir
+          thumb_dir
+          conf_file
+          locale
+          current_language
+          version
+          imagelist_version
+          use_offline
+          login_dlg
+          branding
+      / 
+);
+
+sub FilterEvent {
+    my( $self, $event ) = @_;
+    
+    Wx::LogMessage "EventType %s", $event->GetEventType();
+    
+    return -1;
+}
+
+
+sub OnInit {
+    my( $self ) = @_;
+    
+    $self->version(
+        '2.0.2a'
+    );
+    
+    # to check if we can use stored cache
+    $self->imagelist_version(
+        '3'
+    );
+
+    Wx::InitAllImageHandlers();
+    my $applicationName = "pLoader" ;
+    $self->SetAppName( $applicationName );
+    $self->SetVendorName( "Piwigo Team" );
+
+    $self->{IMGTYPE} = {
+        'jpg' => wxBITMAP_TYPE_JPEG,
+        'gif' => wxBITMAP_TYPE_GIF,
+        'png' => wxBITMAP_TYPE_PNG,
+    };
+
+    $self->_init_userdir;
+
+
+    my $conf = retrieve $self->conf_file if -e $self->conf_file;	
+
+    if(defined $conf ){
+        $self->SetKeyValues($conf);
+    }
+    else {
+        $self->_readParams( 'pLoader.ini' ) unless defined $conf ;
+    }
+
+
+    $self->site_url(
+        $self->{site_url}
+    );
+    
+
+    $self->site_username(
+        $self->{site_username}
+    );
+    $self->site_password(
+        $self->{site_password}
+    );
+
+    $self->http_username(
+        $self->{http_username}
+    );
+    $self->http_password(
+        $self->{http_password}
+    );
+
+
+    $self->current_language(
+        $self->{current_language}||wxLANGUAGE_ENGLISH
+    );
+    
+    $self->init_locale;
+
+    my $not_exit = $self->Login();
+    # user pressed OK
+    if($not_exit){
+    	if( !$self->use_offline ){
+            while( $not_exit and !$self->_is_connected ){
+            	$not_exit = $self->Login();
+            	last if $self->use_offline;
+            }
+    	}
+        $self->_init_imagelist;
+        $self->_init_thumbimagelist;
+        $self->_init_frame;
+    }
+
+    $not_exit;
+}
+
+
+sub _is_connected {
+    my ( $self ) = @_;
+
+    my $is_connected;
+
+    if($self->pwg->login_result->{stat} eq 'ok'){
+        $is_connected = 1;
+    }
+    else{
+        Wx::MessageBox( 
+            sprintf(
+                "%s\n\n%s %s %s",
+                $self->pwg->login_result->{message},
+                gettext("Connection to"),
+                $self->site_url,
+                gettext("failed"),
+            ),
+            gettext("Piwigo login error"),
+            wxOK | wxICON_EXCLAMATION, 
+        );
+    }
+    
+    $is_connected;
+}
+
+
+my $locale;
+sub init_locale {
+    my ( $self, $language ) = @_;
+    
+    $self->current_language(
+        $language
+    ) if defined $language;
+
+    undef $locale;
+    $locale = Wx::Locale->new(
+        $self->current_language
+    );
+    $locale->AddCatalogLookupPathPrefix( '../locale');
+    if(!$locale->AddCatalog( 'pLoader.mo' )){
+        Wx::LogMessage gettext("Cannot find translation catalog files. Use default language");
+    }
+	
+}
+
+sub StoreConnectionProperties {
+    my ( $self ) = @_;
+
+    eval {    
+        store( 
+            {
+                map{
+                   $_ => $self->{$_},
+                }
+                qw/
+                    site_url
+                    site_username
+                    site_password
+                    http_username
+                    http_password
+                    current_language
+                /
+            },
+            $self->conf_file
+        );
+    };
+}
+
+sub _init_imagelist {
+    my ( $self ) = @_;	
+
+    my $stored_imagelist;
+    
+    my $use_new_imagelist;
+    
+    if( -e $self->storable_file ){
+        eval {
+            $stored_imagelist = retrieve $self->storable_file;
+        };
+        if($@){
+            Wx::LogMessage(
+                gettext("An error has occured. Can not read %s\n%s"),
+                $self->storable_file,
+                $@
+            );
+            $use_new_imagelist = 1 ;
+        }
+        # should have a valid imagelist
+        else{
+            $use_new_imagelist = 1 unless $self->imagelist_version eq $stored_imagelist->{imagelist_version};
+            if($use_new_imagelist){
+            	Wx::LogMessage(gettext("pLoader has to reset image cache."));
+            }
+        }
+    }
+    else{
+        $use_new_imagelist = 1 ;
+    }
+
+    if($use_new_imagelist){
+        $stored_imagelist = $self->_default_imagelist_params ;
+    }
+
+
+    $self->imagelist(
+        Uploader::ImageList->new(
+            $stored_imagelist
+        )
+    );
+
+    $self->imagelist->RescaleCallback(
+        sub { $self->RescaleImage(@_) }
+    );
+
+    $self->imagelist->ResizeCallback(
+        sub { $self->ResizeImage(@_) }
+    );
+}
+
+
+sub _default_imagelist_params {
+    my ( $self ) = @_ ;
+
+    my $params = {
+    	new_files        => [],
+       	thumb_size       => 120,
+        site_thumb_dir   => $self->thumb_dir,
+       	wx_thumb_size    => 120,
+        wx_thumb_dir     => $self->wx_thumb_dir,
+        preview_ratio    => 25, 
+        preview_dir      => $self->preview_dir,
+        resize_w         => 800,
+        resize_h         => 600,
+        site_resized_dir => $self->resized_dir,
+      	type             => 'jpg',
+      	filter           => 'Lanczos',
+      	blur             => 0.9,
+      	quality          => 100,
+      	wx_quality       => 80,
+      	th_quality       => 90,
+        auto_rotate      => 1,
+        remove_uploaded_from_selection => 1,
+        interlace        => 'Line',
+        create_resized   => 1,
+        use_exif_preview => 1,
+      	prefix           => 'TN',
+      	count            => 0,
+        storable_file    => $self->storable_file,
+        userdata_dir     => $self->userdata_dir,
+        default_photo_name => gettext('File name'),
+        default_name_prefix => gettext('Photo'),
+        upload_rejects   =>  [],
+        image_sums       => {},
+        sums             => [],
+        version          => $self->version,
+        imagelist_version => $self->imagelist_version,
+        RescaleCallback  => sub { $self->RescaleImage(@_) },
+        ResizeCallback   => sub { $self->ResizeImage(@_) },
+    };
+
+    return $params;
+}
+
+sub Login {
+    my ( $self ) = @_;	
+
+    $self->login_dlg( 
+        Uploader::GUI::wxLoginDlg->new(
+            {
+                title         => gettext("Piwigo login"),
+                site_url      => sub { $self->site_url(@_) },
+                site_username => sub { $self->site_username(@_) },	
+                site_password => sub { $self->site_password(@_) },
+                use_offline   => sub { $self->use_offline(@_) },	
+            }
+        )
+    ) unless $self->login_dlg;
+
+    my $icon = Wx::Icon->new();
+    $icon->LoadFile('../res/favicon.ico', wxBITMAP_TYPE_ICO);
+    $self->login_dlg->SetIcon($icon);	
+
+    
+    my $rval = $self->login_dlg->ShowModal();
+    $self->login_dlg->Show(0);
+
+    $self->_init_branding;
+
+
+    $self->pwg(
+        # get these parameters from dialog or from file
+        Uploader::PWG->new(
+            {
+                site_url       => $self->site_url,
+                site_username  => $self->site_username,
+                site_password  => $self->site_password,
+                http_username  => $self->http_username,
+                http_password  => $self->http_password,
+                branding       => $self->branding,
+            }
+        )
+    );
+    
+    $rval;
+}
+
+sub _init_userdir {
+    my ( $self ) = @_;
+    
+    my $applicationName = $self->GetAppName ;
+    my $userdatadir = File::Spec->canonpath(
+        File::Spec->catfile(
+            File::HomeDir->my_data(), 
+            "\.$applicationName"
+        )
+    );
+
+    if(! -d $userdatadir){
+        if(! mkdir $userdatadir){
+            Wx::MessageBox( 
+                sprintf(
+                    "%s directory creation failed",
+                    $userdatadir,
+                ),
+                "pLoader working directory creation error",
+                wxOK | wxICON_EXCLAMATION, 
+            );
+
+            $userdatadir = File::Spec->canonpath(
+                File::Spec->catfile(
+                    File::Spec->tmpdir(), 
+                    "\.$applicationName"
+                )
+            );
+            mkdir $userdatadir;
+        }	
+    }
+
+    $self->userdata_dir($userdatadir);
+    
+    $self->conf_file(
+        File::Spec->catfile(
+            $self->userdata_dir, 
+            ".$applicationName.conf"
+        )
+    );
+
+    
+
+    $self->storable_file(
+        File::Spec->catfile($self->userdata_dir, 'pLoader.dat')
+    );
+    
+    my $thumbdir = File::Spec->catfile($self->userdata_dir, 'thumbnails');
+    mkdir $thumbdir unless -d $thumbdir ;
+    $self->thumb_dir($thumbdir);
+
+    my $wxthumbdir = File::Spec->catfile($self->userdata_dir, 'wxthumbnails');
+    mkdir $wxthumbdir unless -d $wxthumbdir ;
+    $self->wx_thumb_dir($wxthumbdir);
+
+
+    my $resizedir = File::Spec->catfile($self->userdata_dir, 'resize');
+    mkdir $resizedir unless -d $resizedir ;
+    $self->resized_dir($resizedir);
+
+    my $previewdir = File::Spec->catfile($self->userdata_dir, 'preview');
+    mkdir $previewdir unless -d $previewdir ;
+    $self->preview_dir($previewdir);
+
+	
+}
+
+sub _init_thumbimagelist {
+    my ( $self ) = @_;
+
+    
+    $self->imagelist->wx_thumb_imglist(
+        Wx::ImageList->new( 
+            $self->imagelist->wx_thumb_size, 
+            $self->imagelist->wx_thumb_size, 
+            1,
+            0
+        )
+    );
+    
+    # reload images 
+    $self->_reload_thumb_images;
+}
+
+
+sub _reload_thumb_images {
+    my ( $self ) = @_;
+    
+    my $wximagelist = $self->imagelist->wx_thumb_imglist;
+    my $sums = $self->imagelist->sums;
+
+    map {
+    	my $image = $self->imagelist->image_sums->{$_};
+
+        $wximagelist->Add(
+            Wx::Bitmap->new( 
+                $image->wx_thumb_file, 
+                $self->GetWxBitmapType($self->imagelist->type), 
+            )
+        );
+    }
+    @$sums ;
+
+}
+
+sub GetWxBitmapType {
+    my ( $self, $type ) = @_;
+    
+    $self->{IMGTYPE}->{$type};
+}
+
+
+sub RescaleImage {
+    my ( $self, $image_file, $image_file_out, $type, $ratio, $width, $height, $quality ) = @_;
+   
+
+    my $image = Wx::Image->new(
+            $image_file, 
+            $self->GetWxBitmapType($type),
+            0
+    );
+    
+    my $w;
+    my $h;
+
+    my $img_w = $image->GetWidth;
+    my $img_h = $image->GetHeight;
+    
+    # use a ratio ( 25% default ) if defined
+    # default ratio is used for preview.
+    if($ratio){
+    	$w = $ratio*$img_w/100 ;
+        $h = $ratio*$img_h/100 ;
+    }
+    # use specified width and height
+    else{
+        # portrait
+        if( $img_w < $img_h ){
+            $w = $height;
+        }
+        else{
+            $w = $width;
+        }
+        # to respect aspect ratio
+        $h = sprintf(
+            "%.0f",
+            ($w*$img_h)/$img_w
+        );
+    }
+
+    $image->Rescale(
+        $w,
+        $h,
+        wxIMAGE_QUALITY_HIGH
+    );
+    
+    $quality ||= 90;
+    
+    $image->SetOption( 
+        "quality", 
+        $quality 
+    );
+    
+    if(!$image->SaveFile(
+        $image_file_out,
+        $self->GetWxBitmapType($type),
+    )){
+    	Wx::LogMessage(
+    	    gettext("An error has occured. Can not save file %s"),
+    	    $image_file_out,
+    	)
+    };
+}
+
+sub ResizeImage {
+    my ( $self, $image_file, $image_file_out, $type, $width, $height, $quality ) = @_;
+   
+
+    my $image = Wx::Image->new(
+            $image_file, 
+            $self->GetWxBitmapType($type),
+            0
+    );
+
+    my $w;
+    my $h;
+
+    my $img_w = $image->GetWidth;
+    my $img_h = $image->GetHeight;
+    
+        # portrait
+        if( $img_w < $img_h ){
+            $w = $height;
+        }
+        else{
+            $w = $width;
+        }
+        # to respect aspect ratio
+        $h = sprintf(
+            "%.0f",
+            ($w*$img_h)/$img_w
+        );
+
+    
+
+    $image->Rescale(
+        $w,
+        $h,
+        wxIMAGE_QUALITY_HIGH
+    );
+
+    $image->Resize(
+        [ $width, $height ], [ 0, 20],
+    );
+    
+    $quality ||= 90;
+    
+    $image->SetOption( 
+        "quality", 
+        $quality 
+    );
+    
+    if(!$image->SaveFile(
+        $image_file_out,
+        $self->GetWxBitmapType($type),
+    )){
+    	Wx::LogMessage(
+    	    gettext("An error has occured. Can not save file %s"),
+    	    $image_file_out,
+    	)
+    };
+}
+
+# some labels differ with branding ( piwigo.com or piwigo.org )
+sub _init_branding {
+    my ( $self ) =@_;
+    
+    if( $self->site_url =~ /\.piwigo\.com/ ){
+        $self->branding(
+            {
+                category  => gettext("album"),	
+                Category  => gettext("Album"),	
+                categories => gettext("albums"),	
+                Categories => gettext("Albums"),
+                'Add new category' => gettext("Add new album"),	
+            }
+        );
+    }
+    else{
+        $self->branding(
+            {
+                categorie  => gettext("categorie"),	
+                Categorie  => gettext("Categorie"),	
+                categories => gettext("categories"),	
+                Categories => gettext("Categories"),	
+                'Add new category' => gettext("Add new category"),	
+            }
+        );
+    }	
+}
+
+sub SaveConfig {
+    my ( $self, $params ) = @_;	
+
+   my $config = Wx::ConfigBase::Get;
+
+   map {
+       $config->WriteInt( $_, $params->{$_} )
+   } keys %$params;
+
+   $config->Write( 'Perspective', $params->{Perspective} )
+	
+}
+
+
+sub _init_frame {
+    my ( $self ) = @_;	
+
+    my $config = Wx::ConfigBase::Get;
+
+    my $x = $config->ReadInt( "X", 50 );
+    my $y = $config->ReadInt( "Y", 50 );
+    my $w = $config->ReadInt( "Width", 1024 );
+    my $h = $config->ReadInt( "height", 768 );
+    my $prev_w = $config->ReadInt( "PreviewWidth", 400 );
+    my $prev_h = $config->ReadInt( "PreviewHeight", 300 );
+    my $perspective = $config->Read( "Perspective" );
+    
+    #printf("Config x %s, y %s, w %s, h %s, prev_w %s, prev_h %s\n", $x, $y, $w, $h, $prev_w, $prev_h);
+    
+    my $url = $self->site_url;
+    
+    if($self->use_offline){
+    	$url = gettext("Work Offline");
+    }
+
+    my ( $frame ) = Uploader::GUI::wxFrameAUI->new( 
+        {
+            x         => $x,
+            y         => $y,
+            width     => $w,
+            height    => $h,
+            title     => sprintf("pLoader - Piwigo uploader %s - [%s]", $self->version, $url),
+            pwg       => $self->pwg,
+            imagelist => $self->imagelist,
+            preview_w => $prev_w,
+            preview_h => $prev_h,
+            perspective => $perspective,
+        }
+    );
+	
+    $frame->SetSize( $x, $y, $w, $h );
+    $frame->Show( 1 );
+    $self->SetTopWindow( $frame );
+
+    my $icon = Wx::Icon->new();
+    $icon->LoadFile('../res/favicon.ico', wxBITMAP_TYPE_ICO);
+    $frame->SetIcon($icon);	
+}
+
+sub _readParams {
+	my( $self, $file ) = @_ ;
+
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params ; " ;
+		eval $expr ;
+	}
+	
+	return unless 'ARRAY' eq ref $paramValues ;
+	
+	if(scalar(@$paramValues )){
+	    my $params = $paramValues->[0] ;
+	    $self->SetKeyValues($params);
+	}
+}
+
+
+
+sub SetKeyValues {
+    my ( $self, $params )= @_;	
+
+    foreach( keys %$params ) {
+        $self->{$_} = $params->{$_} ;
+    }
+}
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxExportJobsDlg.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxExportJobsDlg.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxExportJobsDlg.pm	(revision 3291)
@@ -0,0 +1,221 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxExportJobsDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+#use TDSC::GUI::export_dlg;
+use Wx::Event qw/
+                    EVT_CHECKLISTBOX
+                    EVT_RADIOBOX
+                    EVT_BUTTON
+                    EVT_UPDATE_UI
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           clbjobs
+           rbolanguage
+           output_path
+           language
+           btok
+           jobs
+      / 
+);
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::DSExportJobs($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->clbjobs( $self->FindWindow($main::ID_EXPORT_JOBS) );
+    $self->rbolanguage( $self->FindWindow($main::ID_LANGUAGE) );
+    $self->btok( $self->FindWindow($main::ID_EXPORT_OK) );
+    
+
+    # Undefined is default and hidden : no default language choice
+    $self->rbolanguage->SetSelection(2);
+    $self->rbolanguage->Show(2, 0);
+    
+    
+
+    $self->clbjobs->InsertItems( $params->{jobs}, 0 );
+    $self->_restorePrevValues( $params );
+    
+    $self;    
+}
+
+sub _restorePrevValues {
+    my ( $self, $params ) = @_;
+    
+    if ( defined( $params->{prevjobs} ) ){
+        my $selected = {};
+        map {
+            $selected->{$_} = 1;
+        }
+        @{$params->{prevjobs}};
+        
+        # restore prev export selection
+        for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+          if($selected->{$self->clbjobs->GetString($i)}){
+              $self->clbjobs->Check($i, 1);
+          }
+        }    	
+        $self->jobs( $params->{prevjobs} );
+    }
+    else {
+        $self->jobs( [] );	
+    }
+    
+    if ( defined( $params->{output_path} ) ){
+        $self->output_path( $params->{output_path} );
+    }	
+
+    if ( defined( $params->{language} ) ){
+        $self->language( $params->{language} );
+    }
+    else {
+    	# Undefined
+        $self->language( 2 );
+    }
+
+}
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_SELECT_ALL, \&OnSelectAll );
+    EVT_BUTTON( $self, $main::ID_REVERSE_SEL, \&OnReverseSelection );
+    EVT_BUTTON( $self, $main::ID_EXPORT_OK, \&OnExportOK );
+    EVT_BUTTON( $self, $main::ID_EXPORT_CANCEL, \&OnExportCancel );
+    EVT_BUTTON( $self, $main::ID_EXPORT_DIRDIALOG, \&OnExportDirDialog );
+    EVT_CHECKLISTBOX($self, $main::ID_EXPORT_JOBS, \&OnCheckListBox ) ;
+    EVT_RADIOBOX($self, $main::ID_LANGUAGE, \&OnRadioBox ) ;
+    
+    EVT_UPDATE_UI( $self, $self, \&OnUpdateUI ) ;   
+	
+}
+
+# UI context management
+sub OnUpdateUI {
+    my ( $self, $event ) = @_;
+    
+    $self->FindWindow($main::ID_EXPORT_DIRECTORY)->SetValue( $self->output_path );
+    $self->FindWindow($main::ID_LANGUAGE)->SetSelection( $self->language );
+    
+    # Enable OK if required properties are set
+    $self->btok->Enable(1) if (
+        defined $self->output_path &&
+        2 != $self->rbolanguage->GetSelection &&
+        scalar @{$self->jobs}
+    );
+	
+}
+
+sub OnRadioBox {
+    my ( $self, $event ) = @_;
+
+    $self->language($event->GetInt);
+}
+
+sub OnCheckListBox {
+    my ( $self, $event ) = @_;
+    
+    $self->SelectedJobs();
+}
+
+sub OnExportDirDialog {
+    my ( $self, $event ) = @_;
+
+    my $dialog = Wx::DirDialog->new( $self );
+
+    if( $dialog->ShowModal == wxID_CANCEL ) {
+        Wx::LogMessage( "User cancelled the dialog" );
+    } else {
+        Wx::LogMessage( "Export directory: %s", $dialog->GetPath );
+        $self->output_path( $dialog->GetPath );
+    }
+
+    $dialog->Destroy;
+	
+}
+
+sub OnExportOK {
+    my ( $self, $event ) = @_;
+    
+    $self->EndModal(wxID_OK);
+ 
+}
+
+sub OnExportCancel {
+    my ( $self, $event ) = @_;
+    
+    $self->EndModal(wxID_CANCEL);
+}
+
+sub OnSelectAll {
+    my ( $self, $event ) = @_;
+    
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+      $self->clbjobs->Check($i, 1) if !$self->clbjobs->IsChecked($i);	
+    }	
+    $self->SelectedJobs();
+}
+
+sub OnReverseSelection {
+    my ( $self, $event ) = @_;
+    
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+      if($self->clbjobs->IsChecked($i)){
+          $self->clbjobs->Check($i, 0);
+      }
+      else{
+          $self->clbjobs->Check($i, 1);
+      }	
+    }
+    $self->SelectedJobs();
+}
+
+
+sub SelectedJobs {
+    my ( $self ) = @_;
+
+    my $jobs = [];
+    for( my $i=0;$i<$self->clbjobs->GetCount;$i++){
+        if($self->clbjobs->IsChecked($i)){
+            push @$jobs, $self->clbjobs->GetString($i);
+        }
+    }
+    $self->jobs( $jobs );	
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxExportProgressDlg.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxExportProgressDlg.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxExportProgressDlg.pm	(revision 3291)
@@ -0,0 +1,102 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxExportProgressDlg;
+use strict;
+use Carp;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           gauge
+           progress
+           processing
+           txtprocessing
+           cancelled
+      / 
+);
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::ProcessingProgress($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PROGRESS_OK) );
+    $self->gauge( $self->FindWindow($main::ID_PROGRESS_GAUGE) );
+    $self->txtprocessing( $self->FindWindow($main::ID_PROGRESS_TXT) );
+    $self->gauge->SetForegroundColour(wxGREEN);
+      
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PROGRESS_OK, \&OnExportOK );
+    
+	
+}
+
+# Update progress information
+sub LogProgress {
+    my ( $self ) = @_;
+
+printf("$self cancelled %s \n", $self->cancelled);
+    die if $self->cancelled;    
+    $self->txtprocessing->SetLabel(
+        $text || $self->processing
+    );
+    $self->gauge->SetValue(
+        $value || $self->progress
+    );
+
+}
+
+# Close the dialog. cancel export
+sub OnExportOK {
+    my ( $self, $event ) = @_;
+    
+    $self->cancelled(1);
+    $self->Destroy;
+ 
+}
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm	(revision 3291)
@@ -0,0 +1,1921 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxFrameAUI;
+use strict;
+use Carp;
+use Wx;
+use Wx::DND;
+use Wx qw/
+             wxNullBitmap
+             wxID_OK
+             wxDEFAULT_FRAME_STYLE
+             wxVERTICAL
+             wxGROW
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_GIF
+             wxBITMAP_TYPE_PNG
+             wxTB_FLAT
+             wxSIZE
+             wxWHITE
+             wxBLACK
+             wxID_CANCEL
+             wxFD_OPEN
+             wxFD_MULTIPLE
+             wxLI_HORIZONTAL
+             wxALIGN_CENTER_VERTICAL
+             wxALL
+             wxDefaultPosition
+             wxDefaultSize
+             wxTheApp
+             wxIMAGE_LIST_NORMAL
+             wxAUI_NB_TAB_MOVE
+             wxAUI_NB_TAB_SPLIT
+             wxNO_BORDER
+             wxTE_MULTILINE
+             wxTE_READONLY
+             wxITEM_NORMAL 
+             wxCLIP_CHILDREN
+             wxBORDER_NONE
+             wxNullBitmap 
+             wxTR_MULTIPLE
+             wxTR_EXTENDED
+             wxTR_HIDE_ROOT
+             wxTR_HAS_BUTTONS
+             wxMAXIMIZE
+             wxOK
+             wxICON_EXCLAMATION
+             wxICON_INFORMATION
+             WXK_DELETE
+             wxLANGUAGE_ABKHAZIAN   
+             wxLANGUAGE_AFAR   
+             wxLANGUAGE_AFRIKAANS   
+             wxLANGUAGE_ALBANIAN   
+             wxLANGUAGE_AMHARIC   
+             wxLANGUAGE_ARABIC   
+             wxLANGUAGE_ARABIC_ALGERIA   
+             wxLANGUAGE_ARABIC_BAHRAIN   
+             wxLANGUAGE_ARABIC_EGYPT   
+             wxLANGUAGE_ARABIC_IRAQ   
+             wxLANGUAGE_ARABIC_JORDAN   
+             wxLANGUAGE_ARABIC_KUWAIT   
+             wxLANGUAGE_ARABIC_LEBANON   
+             wxLANGUAGE_ARABIC_LIBYA   
+             wxLANGUAGE_ARABIC_MOROCCO   
+             wxLANGUAGE_ARABIC_OMAN   
+             wxLANGUAGE_ARABIC_QATAR   
+             wxLANGUAGE_ARABIC_SAUDI_ARABIA   
+             wxLANGUAGE_ARABIC_SUDAN   
+             wxLANGUAGE_ARABIC_SYRIA   
+             wxLANGUAGE_ARABIC_TUNISIA   
+             wxLANGUAGE_ARABIC_UAE   
+             wxLANGUAGE_ARABIC_YEMEN   
+             wxLANGUAGE_ARMENIAN   
+             wxLANGUAGE_ASSAMESE   
+             wxLANGUAGE_AYMARA   
+             wxLANGUAGE_AZERI   
+             wxLANGUAGE_AZERI_CYRILLIC   
+             wxLANGUAGE_AZERI_LATIN   
+             wxLANGUAGE_BASHKIR   
+             wxLANGUAGE_BASQUE   
+             wxLANGUAGE_BELARUSIAN   
+             wxLANGUAGE_BENGALI   
+             wxLANGUAGE_BHUTANI   
+             wxLANGUAGE_BIHARI   
+             wxLANGUAGE_BISLAMA   
+             wxLANGUAGE_BRETON   
+             wxLANGUAGE_BULGARIAN   
+             wxLANGUAGE_BURMESE   
+             wxLANGUAGE_CAMBODIAN   
+             wxLANGUAGE_CATALAN   
+             wxLANGUAGE_CHINESE   
+             wxLANGUAGE_CHINESE_SIMPLIFIED   
+             wxLANGUAGE_CHINESE_TRADITIONAL   
+             wxLANGUAGE_CHINESE_HONGKONG   
+             wxLANGUAGE_CHINESE_MACAU   
+             wxLANGUAGE_CHINESE_SINGAPORE   
+             wxLANGUAGE_CHINESE_TAIWAN   
+             wxLANGUAGE_CORSICAN   
+             wxLANGUAGE_CROATIAN   
+             wxLANGUAGE_CZECH   
+             wxLANGUAGE_DANISH   
+             wxLANGUAGE_DUTCH   
+             wxLANGUAGE_DUTCH_BELGIAN   
+             wxLANGUAGE_ENGLISH   
+             wxLANGUAGE_ENGLISH_UK   
+             wxLANGUAGE_ENGLISH_US   
+             wxLANGUAGE_ENGLISH_AUSTRALIA   
+             wxLANGUAGE_ENGLISH_BELIZE   
+             wxLANGUAGE_ENGLISH_BOTSWANA   
+             wxLANGUAGE_ENGLISH_CANADA   
+             wxLANGUAGE_ENGLISH_CARIBBEAN   
+             wxLANGUAGE_ENGLISH_DENMARK   
+             wxLANGUAGE_ENGLISH_EIRE   
+             wxLANGUAGE_ENGLISH_JAMAICA   
+             wxLANGUAGE_ENGLISH_NEW_ZEALAND   
+             wxLANGUAGE_ENGLISH_PHILIPPINES   
+             wxLANGUAGE_ENGLISH_SOUTH_AFRICA   
+             wxLANGUAGE_ENGLISH_TRINIDAD   
+             wxLANGUAGE_ENGLISH_ZIMBABWE   
+             wxLANGUAGE_ESPERANTO   
+             wxLANGUAGE_ESTONIAN   
+             wxLANGUAGE_FAEROESE   
+             wxLANGUAGE_FARSI   
+             wxLANGUAGE_FIJI   
+             wxLANGUAGE_FINNISH   
+             wxLANGUAGE_FRENCH   
+             wxLANGUAGE_FRENCH_BELGIAN   
+             wxLANGUAGE_FRENCH_CANADIAN   
+             wxLANGUAGE_FRENCH_LUXEMBOURG   
+             wxLANGUAGE_FRENCH_MONACO   
+             wxLANGUAGE_FRENCH_SWISS   
+             wxLANGUAGE_FRISIAN   
+             wxLANGUAGE_GALICIAN   
+             wxLANGUAGE_GEORGIAN   
+             wxLANGUAGE_GERMAN   
+             wxLANGUAGE_GERMAN_AUSTRIAN   
+             wxLANGUAGE_GERMAN_BELGIUM   
+             wxLANGUAGE_GERMAN_LIECHTENSTEIN   
+             wxLANGUAGE_GERMAN_LUXEMBOURG   
+             wxLANGUAGE_GERMAN_SWISS   
+             wxLANGUAGE_GREEK   
+             wxLANGUAGE_GREENLANDIC   
+             wxLANGUAGE_GUARANI   
+             wxLANGUAGE_GUJARATI   
+             wxLANGUAGE_HAUSA   
+             wxLANGUAGE_HEBREW   
+             wxLANGUAGE_HINDI   
+             wxLANGUAGE_HUNGARIAN   
+             wxLANGUAGE_ICELANDIC   
+             wxLANGUAGE_INDONESIAN   
+             wxLANGUAGE_INTERLINGUA   
+             wxLANGUAGE_INTERLINGUE   
+             wxLANGUAGE_INUKTITUT   
+             wxLANGUAGE_INUPIAK   
+             wxLANGUAGE_IRISH   
+             wxLANGUAGE_ITALIAN   
+             wxLANGUAGE_ITALIAN_SWISS   
+             wxLANGUAGE_JAPANESE   
+             wxLANGUAGE_JAVANESE   
+             wxLANGUAGE_KANNADA   
+             wxLANGUAGE_KASHMIRI   
+             wxLANGUAGE_KASHMIRI_INDIA   
+             wxLANGUAGE_KAZAKH   
+             wxLANGUAGE_KERNEWEK   
+             wxLANGUAGE_KINYARWANDA   
+             wxLANGUAGE_KIRGHIZ   
+             wxLANGUAGE_KIRUNDI   
+             wxLANGUAGE_KONKANI   
+             wxLANGUAGE_KOREAN   
+             wxLANGUAGE_KURDISH   
+             wxLANGUAGE_LAOTHIAN   
+             wxLANGUAGE_LATIN   
+             wxLANGUAGE_LATVIAN   
+             wxLANGUAGE_LINGALA   
+             wxLANGUAGE_LITHUANIAN   
+             wxLANGUAGE_MACEDONIAN   
+             wxLANGUAGE_MALAGASY   
+             wxLANGUAGE_MALAY   
+             wxLANGUAGE_MALAYALAM   
+             wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM   
+             wxLANGUAGE_MALAY_MALAYSIA   
+             wxLANGUAGE_MALTESE   
+             wxLANGUAGE_MANIPURI   
+             wxLANGUAGE_MAORI   
+             wxLANGUAGE_MARATHI   
+             wxLANGUAGE_MOLDAVIAN   
+             wxLANGUAGE_MONGOLIAN   
+             wxLANGUAGE_NAURU   
+             wxLANGUAGE_NEPALI   
+             wxLANGUAGE_NEPALI_INDIA   
+             wxLANGUAGE_NORWEGIAN_BOKMAL   
+             wxLANGUAGE_NORWEGIAN_NYNORSK   
+             wxLANGUAGE_OCCITAN   
+             wxLANGUAGE_ORIYA   
+             wxLANGUAGE_OROMO   
+             wxLANGUAGE_PASHTO   
+             wxLANGUAGE_POLISH   
+             wxLANGUAGE_PORTUGUESE   
+             wxLANGUAGE_PORTUGUESE_BRAZILIAN   
+             wxLANGUAGE_PUNJABI   
+             wxLANGUAGE_QUECHUA   
+             wxLANGUAGE_RHAETO_ROMANCE   
+             wxLANGUAGE_ROMANIAN   
+             wxLANGUAGE_RUSSIAN   
+             wxLANGUAGE_RUSSIAN_UKRAINE   
+             wxLANGUAGE_SAMI   
+             wxLANGUAGE_SAMOAN   
+             wxLANGUAGE_SANGHO   
+             wxLANGUAGE_SANSKRIT   
+             wxLANGUAGE_SCOTS_GAELIC   
+             wxLANGUAGE_SERBIAN   
+             wxLANGUAGE_SERBIAN_CYRILLIC   
+             wxLANGUAGE_SERBIAN_LATIN   
+             wxLANGUAGE_SERBO_CROATIAN   
+             wxLANGUAGE_SESOTHO   
+             wxLANGUAGE_SETSWANA   
+             wxLANGUAGE_SHONA   
+             wxLANGUAGE_SINDHI   
+             wxLANGUAGE_SINHALESE   
+             wxLANGUAGE_SISWATI   
+             wxLANGUAGE_SLOVAK   
+             wxLANGUAGE_SLOVENIAN   
+             wxLANGUAGE_SOMALI   
+             wxLANGUAGE_SPANISH   
+             wxLANGUAGE_SPANISH_ARGENTINA   
+             wxLANGUAGE_SPANISH_BOLIVIA   
+             wxLANGUAGE_SPANISH_CHILE   
+             wxLANGUAGE_SPANISH_COLOMBIA   
+             wxLANGUAGE_SPANISH_COSTA_RICA   
+             wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC   
+             wxLANGUAGE_SPANISH_ECUADOR   
+             wxLANGUAGE_SPANISH_EL_SALVADOR   
+             wxLANGUAGE_SPANISH_GUATEMALA   
+             wxLANGUAGE_SPANISH_HONDURAS   
+             wxLANGUAGE_SPANISH_MEXICAN   
+             wxLANGUAGE_SPANISH_MODERN   
+             wxLANGUAGE_SPANISH_NICARAGUA   
+             wxLANGUAGE_SPANISH_PANAMA   
+             wxLANGUAGE_SPANISH_PARAGUAY   
+             wxLANGUAGE_SPANISH_PERU   
+             wxLANGUAGE_SPANISH_PUERTO_RICO   
+             wxLANGUAGE_SPANISH_URUGUAY   
+             wxLANGUAGE_SPANISH_US   
+             wxLANGUAGE_SPANISH_VENEZUELA   
+             wxLANGUAGE_SUNDANESE   
+             wxLANGUAGE_SWAHILI   
+             wxLANGUAGE_SWEDISH   
+             wxLANGUAGE_SWEDISH_FINLAND   
+             wxLANGUAGE_TAGALOG   
+             wxLANGUAGE_TAJIK   
+             wxLANGUAGE_TAMIL   
+             wxLANGUAGE_TATAR   
+             wxLANGUAGE_TELUGU   
+             wxLANGUAGE_THAI   
+             wxLANGUAGE_TIBETAN   
+             wxLANGUAGE_TIGRINYA   
+             wxLANGUAGE_TONGA   
+             wxLANGUAGE_TSONGA   
+             wxLANGUAGE_TURKISH   
+             wxLANGUAGE_TURKMEN   
+             wxLANGUAGE_TWI   
+             wxLANGUAGE_UIGHUR   
+             wxLANGUAGE_UKRAINIAN   
+             wxLANGUAGE_URDU   
+             wxLANGUAGE_URDU_INDIA   
+             wxLANGUAGE_URDU_PAKISTAN   
+             wxLANGUAGE_UZBEK   
+             wxLANGUAGE_UZBEK_CYRILLIC   
+             wxLANGUAGE_UZBEK_LATIN   
+             wxLANGUAGE_VALENCIAN   
+             wxLANGUAGE_VIETNAMESE   
+             wxLANGUAGE_VOLAPUK   
+             wxLANGUAGE_WELSH   
+             wxLANGUAGE_WOLOF   
+             wxLANGUAGE_XHOSA   
+             wxLANGUAGE_YIDDISH   
+             wxLANGUAGE_YORUBA   
+             wxLANGUAGE_ZHUANG   
+             wxLANGUAGE_ZULU  
+         /;
+use base qw/Wx::Frame Class::Accessor::Fast/;
+use File::Spec;
+use Wx::Locale qw/:default/;
+use Encode qw/encode decode is_utf8/;;
+
+
+my @properties = 
+    qw/
+          progressdlg
+          upload_progressdlg
+          imageviewer
+          tree
+          tree_root
+          treeimglist
+          tree_item_default
+          topsizer
+          pwg
+          manager
+          logwnd
+          oldlogwnd
+          htmlhome
+          notebook
+          categories
+          imagelist
+          image_preview
+          image_prop_piwigo
+          image_prop_exif
+          notebook_image_properties
+          notebook_global_settings
+          general_settings_panel
+          resized_settings_panel
+          thumbnail_settings_panel
+          preview_settings_panel
+          piwigo_properties
+          exif_properties
+          general_settings
+          resized_settings
+          thumbnail_settings
+          preview_settings
+          toolbar
+          branding
+          preview_w
+          preview_h
+          perspective
+      /;
+__PACKAGE__->mk_accessors( @properties );
+
+use Wx::Event 
+    qw/
+          EVT_MENU
+          EVT_TREE_SEL_CHANGED
+          EVT_CLOSE 
+          EVT_LIST_END_LABEL_EDIT
+          EVT_LIST_ITEM_SELECTED
+          EVT_LIST_ITEM_ACTIVATED
+          EVT_TREE_ITEM_RIGHT_CLICK
+          EVT_LIST_KEY_DOWN
+          EVT_UPDATE_UI       
+      /;
+      
+use Uploader::GUI::wxImageListCtrl;
+use Uploader::GUI::wxImageProcessingProgressDlg;
+use Wx::Html;
+use Uploader::GUI::wxHtmlWindow;
+use Data::Dumper;
+use Wx::AUI;
+use Storable;
+use Uploader::GUI::wxPropertyGridPanel;
+use Encode qw/encode decode is_utf8/;
+
+$|=1;
+
+my $ID_TREE_CTX_MENU = 20000 ;
+
+sub new {
+  my( $class, $params ) = @_;
+  my( $self ) = $class->SUPER::new( 
+                                      undef, 
+                                      -1, 
+                                      $params->{title}, 
+                                      [ $params->{x}, $params->{y} ],
+                                      [ $params->{width}, $params->{height} ],
+                                      wxDEFAULT_FRAME_STYLE|wxMAXIMIZE
+                                   );
+    $self->preview_w(
+        $params->{preview_w}||400
+    );
+
+    $self->preview_h(
+        $params->{preview_h}||300
+    );
+    
+    $self->perspective(
+        $params->{perspective}
+    );
+
+    $self->pwg( $params->{pwg} );
+    $self->imagelist( $params->{imagelist} );
+
+    # callback for GUI refresh : add thumbnail images to the imageviewer control
+    $self->imagelist->SetNewFilesViewerRefreshCallback(
+        sub { $self->SetNewFilesViewerRefresh(@_) }
+    );
+
+    # callback for GUI refresh : progress dialog display of thumbnail image being created
+    $self->imagelist->SetNewFilesProgressCallback(
+        sub { $self->SetNewFilesProgress(@_) }
+    );
+
+    $self->imagelist->SetNewFilesDisplayEndInfoCallback(
+        sub { $self->SetNewFilesDisplayEndInfo(@_) }
+    );
+
+
+    # callback for GUI refresh : remove thumbnail images from imageviewer control
+    $self->imagelist->UploadImagesViewerCallback(
+        sub { $self->UploadImagesViewerRefresh(@_) }
+    );
+
+
+
+    # callback for GUI refresh : progress dialog display current uploaded image
+    $self->imagelist->progress_thumbnail_refresh(
+        sub { $self->UploadProgressThumbnailRefresh(@_) }
+    );
+
+    $self->imagelist->progress_msg_refresh(
+        sub { $self->UploadProgressMessageRefresh(@_) }
+    );
+
+
+    $self->imagelist->progressbar_refresh(
+        sub { $self->UploadProgressBarRefresh(@_) }
+    );
+    
+    $self->imagelist->progress_endinfo_refresh(
+        sub { $self->UploadDisplayEndInfo(@_) }
+    );
+
+
+    $self->imagelist->pwg(
+        $self->pwg
+    );
+
+    $self->imagelist->categories(
+        []
+    );
+
+
+    $self->manager( Wx::AuiManager->new );
+    $self->manager->SetDockSizeConstraint(1, 1);
+    $self->manager->SetManagedWindow( $self );
+    $self->_set_setting_properties;
+    $self->_initFrame;
+    $self->_InitEventHandlers;
+    $self->_initImgTypes;   
+   
+    $self;
+}
+
+
+sub _initImgTypes {
+    my ( $self ) = @_;
+
+    $self->{IMGTYPE} = {
+             'jpg' => wxBITMAP_TYPE_JPEG,
+             'gif' => wxBITMAP_TYPE_GIF,
+             'png' => wxBITMAP_TYPE_PNG,
+    };
+}
+
+
+sub GetWxBitmapType {
+    my ( $self, $type ) = @_;
+    
+    $self->{IMGTYPE}->{$type};
+}
+
+
+
+sub _set_setting_properties {
+    my ( $self ) = @_;
+
+    $self->piwigo_properties(
+        [
+            {
+                label => gettext("Photo caption :"),
+                value => sub { $self->imagelist->current_image->site_name(@_) },
+            },
+            {
+                label => gettext("Comment :"),
+                value => sub { $self->imagelist->current_image->site_comment(@_) },
+                type  => "LongText",
+            },
+            {
+                label => gettext("Author :"),
+                value => sub { $self->imagelist->current_image->site_author(@_) },
+            },
+            {
+                label    => gettext("File name :"),
+                value    => sub { $self->imagelist->current_image->file(@_) },
+                readonly => 1,
+            },
+            {
+                label    => gettext("Create date :"),
+                value    => sub { $self->imagelist->current_image->create_date(@_) },
+                readonly => 1,
+            },
+        ]    
+    );
+
+    $self->exif_properties(
+        [
+            {
+                label    => gettext("Create date :"),
+                value    => sub { $self->imagelist->current_image->create_date }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Model :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('Model') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Width :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('ImageWidth') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Height :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('ImageHeight') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Orientation :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('Orientation') }, 
+                readonly => 1,
+            },	
+            {
+                label    => "ISO :",
+                value    => sub { $self->imagelist->current_image->exif_tag('ISO') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Shutter speed :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('ExposureTime') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Aperture :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('ApertureValue') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Focal length :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('FocalLength') }, 
+                readonly => 1,
+            },	
+            {
+                label    => gettext("Lens :"),
+                value    => sub { $self->imagelist->current_image->exif_tag('Lens') }, 
+                readonly => 1,
+            },	
+        ]
+    );   
+
+    $self->general_settings(
+        [
+            {
+                label     => gettext("Default author :"),
+                value	=> sub { $self->imagelist->author(@_) },
+            },
+            {
+                label     => gettext("Default photo caption :"),
+                type      => 'Choice',
+                value	=> sub { $self->imagelist->default_photo_name(@_) },
+                choice  => [
+                                  gettext('None'),
+                                  gettext('File name'),
+                                  gettext('File path and name'),
+                                  gettext('Prefix'),
+                                  gettext('Prefix + rank number'),
+                                  gettext('Rank number + prefix'),
+                                  gettext('Prefix + create date chrono'),
+                                  gettext('Create date chrono + prefix'),
+                              ],
+            },
+            {
+                label     => gettext("Photo caption  prefix :"),
+                value	=> sub { $self->imagelist->default_name_prefix(@_) },
+            },
+            {
+                label     => gettext("Resize site image :"),
+                type      => 'Bool',
+                value	=> sub { $self->imagelist->create_resized(@_) },
+            },
+            {
+                label     => gettext("Auto rotate image :"),
+                type      => 'Bool',
+                value	=> sub { $self->imagelist->auto_rotate(@_) },
+            },
+            {
+                label     => gettext("Upload high (original size) :"),
+                type      => 'Bool',
+                value	=> sub { $self->imagelist->upload_high(@_) },
+            },
+#            {
+#                label     => gettext("Remove uploaded photo from selection :"),
+#                type      => 'Bool',
+#                value	=> sub { $self->imagelist->remove_uploaded_from_selection(@_) },
+#            },
+        ]    
+    );
+    
+    $self->resized_settings(
+        [
+            {
+                label     => gettext("Site image width :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->resize_w(@_) },
+            },
+            {
+                label     => gettext("Site image height :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->resize_h(@_) },
+            },
+            {
+                label     => gettext("Site image jpeg quality :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->quality(@_) },
+            },
+            {
+                label     => gettext("Site image filter :"),
+                type      => 'Choice',
+                value	=> sub { $self->imagelist->filter(@_) },
+                choice    => [ qw/Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc/ ],
+            },
+            {
+                label     => gettext("Site image blur :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->blur(@_) },
+            },
+            {
+                label     => gettext("Site image interlace :"),
+                type      => 'Choice',
+                value	=> sub { $self->imagelist->interlace(@_) },
+                choice    => [ qw/None Line Plane Partition JPEG GIF PNG/ ],
+            },
+        ]    
+    );
+
+    $self->thumbnail_settings(
+        [
+            {
+                label     => gettext("Site thumbnail size :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->thumb_size(@_) },
+            },
+            {
+                label     => gettext("Site thumbnail jpeg quality :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->th_quality(@_) },
+            },
+            {
+                label     => gettext("Photo selection thumbnail size :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->wx_thumb_size(@_) },
+            },
+            {
+                label     => gettext("Photo selection thumbnail jpeg quality :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->wx_quality(@_) },
+            },
+        ]    
+    );
+    
+    $self->preview_settings(
+        [
+            {
+                label     => gettext("Use exif preview when available :"),
+                type      => 'Bool',
+                value	=> sub { $self->imagelist->use_exif_preview(@_) },
+            },
+            {
+                label     => gettext("Custom preview ratio :"),
+                type      => 'Number',
+                value	=> sub { $self->imagelist->preview_ratio(@_) },
+            },
+        ]    
+    );
+	
+}
+
+sub _refreshFrame {
+    my ( $self ) = @_;
+    
+    $self->_set_setting_properties;
+    $self->_refresh_settings_panels_properties;
+    map {
+        $_->Refresh;	
+    }
+    (
+        $self->image_prop_piwigo,
+        $self->image_prop_exif,
+        $self->general_settings_panel,
+        $self->resized_settings_panel,
+        $self->thumbnail_settings_panel,
+        $self->preview_settings_panel,
+    );
+    
+    $self->manager->Update;
+}
+
+
+sub _destroy_settings_panels {
+    my ( $self ) = @_;
+
+
+
+    map {
+        $self->manager->DetachPane(
+            $_
+        );
+        $_->Show(0);
+        $_->Destroy;
+    }(
+        $self->notebook_global_settings,
+        $self->notebook_image_properties,
+    );
+}
+
+# 
+sub _initFrame {
+    my ( $self ) = @_;
+    
+ 
+    $self->init_panels;
+
+    $self->imageviewer->Show(0);
+
+    $self->init_aui;
+    $self->init_dnd_targets;
+    if( $self->imagelist->wx_thumb_imglist->GetImageCount){
+        printf("%s images\n", $self->imagelist->wx_thumb_imglist->GetImageCount); 
+    	$self->ShowImageViewer;
+        
+        $self->imageviewer->Refresh(
+            $self->imagelist->wx_thumb_imglist
+        );
+    }
+
+}
+
+sub _refresh_settings_panels_properties {
+    my ( $self ) = @_;	
+
+    $self->image_prop_piwigo->properties(
+        $self->piwigo_properties
+    );
+    
+    $self->image_prop_exif->properties(
+        $self->exif_properties
+    );
+
+
+    $self->general_settings_panel->properties(
+        $self->general_settings
+    );    
+
+    $self->resized_settings_panel->properties(
+        $self->resized_settings
+    );    
+
+    $self->thumbnail_settings_panel->properties(
+        $self->thumbnail_settings,
+    );    
+
+    $self->preview_settings_panel->properties(
+        $self->preview_settings,
+    );    
+	
+}
+
+sub _init_settings_panels {
+    my ( $self ) = @_;	
+
+    $self->image_prop_piwigo(
+        Uploader::GUI::wxPropertyGridPanel->new( 
+            { 
+                parentwnd       => $self,
+                properties      => $self->piwigo_properties,
+                frame_callbacks => [ 
+                                          sub {
+                                              $self->imageviewer->Refresh();
+                                          },
+                	           ],
+            }
+        )
+    );
+
+    $self->image_prop_exif(
+        Uploader::GUI::wxPropertyGridPanel->new( 
+            { 
+                parentwnd       => $self,
+                frame_callbacks => [],
+                properties      => $self->exif_properties,
+            }
+        )
+    );
+
+
+    $self->general_settings_panel(
+        Uploader::GUI::wxPropertyGridPanel->new( 
+            { 
+                parentwnd       => $self,
+                properties      => $self->general_settings,
+                frame_callbacks => [], 
+            }
+        )
+    );    
+
+    $self->resized_settings_panel(
+        Uploader::GUI::wxPropertyGridPanel->new( 
+            { 
+                parentwnd       => $self,
+                properties      => $self->resized_settings,
+                frame_callbacks => [],
+
+            }
+        )    
+    );    
+
+    $self->thumbnail_settings_panel(
+        Uploader::GUI::wxPropertyGridPanel->new( 
+            { 
+                parentwnd       => $self,
+                properties      => $self->thumbnail_settings,
+                frame_callbacks => [],
+
+            }
+        )    
+    );    
+    $self->preview_settings_panel(
+        Uploader::GUI::wxPropertyGridPanel->new( 
+            { 
+                parentwnd       => $self,
+                properties      => $self->preview_settings,
+                frame_callbacks => [],
+
+            }
+        )    
+    );    
+    
+    $self->general_settings_panel->Show(0);
+
+    $self->image_preview(
+        Wx::StaticBitmap->new(
+            $self,
+            -1,
+            wxNullBitmap,
+            wxDefaultPosition,
+            [$self->preview_w, $self->preview_h]
+        )
+    );
+
+    $self->image_prop_piwigo->Show(0);
+    
+    $self->image_prop_exif->Show(0);
+	
+}
+
+sub init_panels {
+    my ( $self ) = @_;	
+
+    $self->htmlhome(
+        Uploader::GUI::wxHtmlWindow->new(
+            $self, -1
+        )
+    );
+    
+    $self->imageviewer(
+        Uploader::GUI::wxImageListCtrl->new( 
+            { 
+                parentwnd => $self,
+                imagelist => $self->imagelist,
+            }
+        )
+    );
+    
+    $self->_init_settings_panels;	
+}
+
+sub init_dnd_targets {
+    my ( $self ) = @_;	
+
+    $self->imageviewer->SetDropTarget( 
+        DNDImageListDropTarget->new(
+            $self->imageviewer 
+        ) 
+    );
+    $self->htmlhome->SetDropTarget( 
+        DNDImageListDropTarget->new( 
+            $self->imageviewer 
+        ) 
+    );
+
+
+    $self->tree->SetDropTarget( 
+        DNDCategoryTreeDropTarget->new(
+            $self->tree
+        )
+    );
+	
+}
+
+sub init_aui {
+    my ( $self ) = @_;
+
+    my $url = wxTheApp->site_url;
+    
+    $url = gettext("empty - work Offline") if wxTheApp->use_offline;
+
+    $self->manager->AddPane
+      ( $self->create_notebook_imagelist, Wx::AuiPaneInfo->new->Name( "ImageViewer" )
+        ->CenterPane->Resizable->CloseButton(0) );
+
+    $self->manager->AddPane
+      ( $self->create_tree, Wx::AuiPaneInfo->new->Name( "categories" )
+        ->Right->Position( 0 )->Resizable->CloseButton(0) );
+
+    $self->manager->AddPane
+      ( $self->image_preview, Wx::AuiPaneInfo->new->Name( "preview" )
+        ->Right->Position( 1 )->Resizable->CloseButton(0)->Floatable(0) );
+
+
+    $self->_init_aui_settings_panels;
+
+    $self->toolbar(
+        $self->create_toolbar
+    );
+
+    $self->manager->AddPane
+      ( $self->toolbar, Wx::AuiPaneInfo->new->Name( "tb1" )
+        ->ToolbarPane->Top->Row( 1 )->LeftDockable( 0 )->RightDockable( 0 ) ) if defined $self->toolbar;
+
+    if( $self->perspective){
+        $self->manager->LoadPerspective($self->perspective);
+    }
+
+    $self->manager->GetPane("categories")->Caption(
+          sprintf("%s - %s", sprintf("Piwigo %s", wxTheApp->branding->{categories}), $url )
+      );
+
+    $self->manager->GetPane("preview")->Caption(gettext("Preview"));
+    $self->manager->GetPane("tb1")->Caption( gettext("Tools") );
+    $self->manager->GetPane("photo_properties")->Caption(gettext("Photo properties"));
+    $self->manager->GetPane("global_settings")->Caption(gettext("Global settings"));
+
+    
+    $self->manager->Update;
+
+}
+
+sub _init_aui_settings_panels {
+    my ( $self ) = @_;	
+
+    $self->manager->AddPane
+      ( $self->create_notebook_image_properties, Wx::AuiPaneInfo->new->Name( "photo_properties" )
+        ->Floatable(1)->Resizable->CloseButton(1) );
+
+    $self->manager->AddPane
+      ( $self->create_notebook_global_settings, Wx::AuiPaneInfo->new->Name( "global_settings" )
+        ->Floatable(1)->Resizable->CloseButton(1) );
+
+    $self->manager->GetPane("photo_properties")->Show(0);
+    $self->manager->GetPane("global_settings")->Show(0);
+	
+}
+
+sub OnPhotoProperties {
+    my ( $self ) = @_;
+
+    $self->manager->GetPane("photo_properties")->Float;
+    $self->manager->GetPane("photo_properties")->Show(1);
+    $self->manager->Update();    
+	
+}
+
+sub OnGlobalSettings {
+    my ( $self ) = @_;
+
+    $self->toolbar->EnableTool(104, 0 );
+    $self->manager->GetPane("global_settings")->Float;
+    $self->manager->GetPane("global_settings")->Show(1);
+    $self->manager->Update();    
+}
+
+sub OnChooseLanguage {
+    my ( $self ) = @_;	
+
+  my $languages = [
+             ['Dutch', wxLANGUAGE_DUTCH, ],   
+             ['English', wxLANGUAGE_ENGLISH, ],   
+             ['French', wxLANGUAGE_FRENCH, ],   
+             ['German', wxLANGUAGE_GERMAN, ],   
+             ['Italian', wxLANGUAGE_ITALIAN, ],   
+             ['Polish', wxLANGUAGE_POLISH, ],   
+             ['Portuguese', wxLANGUAGE_PORTUGUESE, ],   
+             ['Russian', wxLANGUAGE_RUSSIAN, ],   
+             ['Spanish', wxLANGUAGE_SPANISH, ],   
+  ];
+
+  my $dialog = new Wx::SingleChoiceDialog
+    ( undef, gettext( "Choose a language" ), gettext( "Choose a language" ),
+      [ map { Wx::GetTranslation( ${$_}[0] ) } @$languages ] );
+
+  if( $dialog->ShowModal() == wxID_OK ) {
+    wxTheApp->current_language(
+        $languages->[$dialog->GetSelection][1]
+    );
+    wxTheApp->init_locale();
+    $self->_refreshFrame;
+  }
+
+  $dialog->Destroy;
+
+}
+
+
+sub create_notebook_imagelist {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [300, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->htmlhome, 
+            gettext("Photo selection"),
+            '../res/images.png', 
+            wxBITMAP_TYPE_PNG,
+        ],
+        #[
+        #    $self->logwnd( $self->_create_textctrl( $book, undef, [450, 450] )),
+        #    "Log",
+        #    '../res/nb_log.png', 
+        #    wxBITMAP_TYPE_PNG,
+        #]
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    #$self->logwnd(Wx::LogTextCtrl->new( $self->logwnd ));
+    #$self->oldlogwnd( Wx::Log::SetActiveTarget( $self->logwnd ) );
+    $self->notebook($book);
+    return $book;
+}
+
+sub create_notebook_image_properties {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [450, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->image_prop_piwigo, 
+            "Piwigo",
+        ],
+        [
+            $self->image_prop_exif, 
+            "Exif",
+        ],
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    $self->notebook_image_properties($book);
+
+    return $book;
+}
+
+sub create_notebook_global_settings {
+    my( $self ) = @_;
+    my $book = Wx::AuiNotebook->new( $self, -1, [-1, -1], [450, 450],
+                                     wxBORDER_NONE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT);
+    my $pages = [    
+        [
+            $self->general_settings_panel, 
+            gettext("General"),
+        ],
+        [
+            $self->resized_settings_panel, 
+            gettext("Resized"),
+        ],
+        [
+            $self->thumbnail_settings_panel, 
+            gettext("Thumbnail"),
+        ],
+        [
+            $self->preview_settings_panel, 
+            gettext("Preview"),
+        ],
+    ];
+    
+    $self->_populate_notebook( $book, $pages );
+
+    $self->notebook_global_settings($book);
+
+    return $book;
+}
+
+
+
+
+sub create_tree {
+    my ( $self ) = @_;
+
+    my $images = [
+        map {
+            Wx::Bitmap->new( $_, wxBITMAP_TYPE_PNG )
+        	
+        }
+        (
+          '../res/tree_pwg.png',
+          '../res/tree_folder.png',
+        )    
+    ];
+
+    $self->treeimglist( Wx::ImageList->new( 16, 16, 1 ) );
+    map {
+    	$self->treeimglist->Add($_);
+    }
+    @$images;
+
+    
+    $self->tree( 
+        Wx::TreeCtrl->new( 
+           $self, 
+           -1, 
+           wxDefaultPosition, 
+           wxDefaultSize, 
+           wxBORDER_NONE|
+           wxCLIP_CHILDREN|
+#           wxTR_MULTIPLE|
+#           wxTR_EXTENDED|
+           wxTR_HAS_BUTTONS
+#           wxTR_HIDE_ROOT   
+        ) 
+    );
+
+    $self->tree->SetImageList( $self->treeimglist );
+    $self->populate_tree_categories if !wxTheApp->use_offline;
+    $self->tree ;
+}
+
+
+sub populate_tree_categories {
+    my ( $self ) = @_;
+
+    $self->populate_tree(
+        $self->tree,
+        wxTheApp->pwg->categories,
+    ) if defined wxTheApp->pwg ;
+    
+    $self->tree->ExpandAll;
+
+}
+
+
+# returns a valid itemData
+sub itemData { Wx::TreeItemData->new( $_[0] ) }
+
+sub populate_tree {
+    my ( $self, $tree, $tree_items ) = @_;
+    my $root = shift @{$tree_items};
+    $self->tree_root(
+        $tree->AddRoot( 
+            $root->[0], 
+            $root->[3], 
+            $root->[4], 
+            itemData( $root->[2] ) 
+        )
+    );
+
+  $self->populate_tree_helper( $tree, $self->tree_root, $tree_items );
+
+  $tree->Expand( $self->tree_root );
+}
+
+sub populate_tree_helper {
+  my ( $self, $tree, $parent_id, $tree_items ) = @_;
+
+  my $id;
+
+  map {
+      my $name = $_->[0];
+      eval {
+      	$name = is_utf8($name) ?  decode('UTF-8', $name) : $name;
+      };
+      if($@){
+          $name = $_->[0];
+      }
+       $id = $tree->AppendItem( 
+                                   $parent_id, 
+                                   $name,
+                                   defined($_->[3]) ? $_->[3] : 0, 
+                                   defined($_->[4]) ? $_->[4] : 0, 
+                                   itemData( $_->[2]) 
+                              );
+      $self->tree_item_default($id) if ! defined $self->tree_item_default;
+      # current item has children
+      if( ref( $_->[1] ) eq 'ARRAY' ) {
+          $self->populate_tree_helper( $tree, $id, $_->[1] );
+      } 
+  }
+  @{$tree_items};
+
+}
+
+
+
+
+sub _populate_notebook {
+    my ( $self, $book, $pages, $position ) = @_;	
+
+    my $i = 0;
+    map {
+        my $icon = Wx::Icon->new();
+        eval { $icon->LoadFile($_->[2], $_->[3]) ; }
+            if defined $_->[2];
+        my $nb_icon = Wx::Bitmap->new( $icon );
+        defined $position ?
+            $book->InsertPage($position, $_->[0],
+                    $_->[1], 1, $nb_icon )
+                          :
+            $book->AddPage($_->[0],
+                    $_->[1], 0, $nb_icon );
+
+        $i++;
+    } @$pages;
+
+}
+
+
+
+sub _InitEventHandlers {
+    my ( $self ) = @_ ;
+	
+    Wx::Event::EVT_MENU( $self, 101, \&OnAddImages );
+    Wx::Event::EVT_MENU( $self, 102, \&OnRemoveImages );
+    Wx::Event::EVT_MENU( $self, 103, \&OnUploadImages );
+    Wx::Event::EVT_MENU( $self, 104, \&OnGlobalSettings );
+    Wx::Event::EVT_MENU( $self, 105, \&OnChooseLanguage );
+    EVT_TREE_SEL_CHANGED( $self, $self->tree, \&OnTreeSelChanged );
+    EVT_TREE_ITEM_RIGHT_CLICK( $self->tree, $self->tree, \&OnTreeItemRightClick );
+    EVT_LIST_END_LABEL_EDIT( $self, $self->imageviewer, \&OnImageViewerEndLabelEdit );
+    EVT_LIST_ITEM_ACTIVATED( $self, $self->imageviewer, \&OnImageViewerItemActivated );
+    EVT_LIST_ITEM_SELECTED($self, $self->imageviewer, \&OnImageViewerItemSelected) ;
+    EVT_LIST_KEY_DOWN($self, $self->imageviewer, \&OnImageViewerKeyDown) ;
+    EVT_CLOSE( $self, \&OnClose );
+    Wx::Event::EVT_UPDATE_UI( $self, $self, \&OnUpdateUI );
+
+
+    Wx::Event::EVT_MENU( $self, 1+$ID_TREE_CTX_MENU, \&OnAddCategories );
+    Wx::Event::EVT_MENU( $self, 2+$ID_TREE_CTX_MENU, \&OnRefreshCategories );
+}
+
+{
+  my $prevdir;
+  my $prevfile;
+
+  sub OnAddImages {
+    my( $self, $event ) = @_;
+    my $dialog = Wx::FileDialog->new
+      ( $self, gettext("Select photos for upload"), $prevfile, $prevdir,
+        sprintf("%s (*.jpg)|*.jpg|All(*.*)|*.*", gettext("JPEG files")),
+        wxFD_OPEN|wxFD_MULTIPLE );
+
+    my $file_paths = [];
+    if( $dialog->ShowModal != wxID_CANCEL ) {
+        @$file_paths = $dialog->GetPaths;
+        $self->SetNewFiles($file_paths) ;
+    }
+    $dialog->Destroy;
+    $event->Skip;
+  }
+}
+
+sub OnUpdateUI {
+    my( $self, $event ) = @_;
+    
+    if( $self->manager ){
+        if($self->manager->GetPane("global_settings")->IsShown){
+            $self->toolbar->EnableTool(104, 0);         	
+        }
+        else{
+            $self->toolbar->EnableTool(104, 1);         	
+        }
+    }
+}
+
+sub OnRemoveImages {
+    my( $self, $event ) = @_;
+
+    
+    $self->imagelist->RemoveImageSelection;
+    $self->imageviewer->Refresh;	
+}
+
+sub SetNewFiles {
+    my ( $self, $file_paths ) = @_;
+
+    $self->ShowImageViewer();
+    $self->progressdlg( 
+        Uploader::GUI::wxImageProcessingProgressDlg->new(
+            { 
+                title => gettext("Image processing progress information"),
+                bt_label => gettext("Cancel image processing"), 
+             }
+        )        
+    );
+    $self->progressdlg->Show(1);
+    Wx::Yield();
+    
+    my $files = [
+        map {
+            encode('iso-8859-1', $_)
+        }@$file_paths    
+    ];
+    
+    # last is first !
+    if ( scalar @$files > 1 ){
+        my $first = shift @$files;
+        push @$files, $first;	
+    }
+    #print Dumper $files;
+
+    $self->imagelist->SetNewFiles(
+        $files
+    );
+
+    
+}
+
+sub OnTreeSelChanged {
+    my( $self, $event ) = @_;
+  
+    my @items = $self->tree->GetSelections;
+
+    $self->imagelist->categories(
+        [
+            map {
+                my $category = $self->tree->GetPlData( $_ );
+                $category->{id} if $category != -1;
+            }
+            @items
+        ]
+    );
+}
+
+sub OnTreeItemRightClick {
+    my( $self, $event ) = @_;
+
+    my $point = $event->GetPoint ;
+    my $ctx_mnu = Wx::Menu->new;
+    
+    map {
+    	$ctx_mnu->Append(
+    	    @$_
+    	);
+    }
+    (
+        [
+            1+$ID_TREE_CTX_MENU, 
+            wxTheApp->branding->{'Add new category'},
+            sprintf(
+                "%s %s %s %s", 
+                gettext("Add a new"), 
+                wxTheApp->branding->{category},
+                gettext("to the currently selected"),
+                wxTheApp->branding->{category},
+            )
+        ],
+        [
+            2+$ID_TREE_CTX_MENU, 
+            "Refresh",
+            sprintf(
+                "Refresh %s list.",
+                wxTheApp->branding->{category},
+            )
+        ],
+    );
+    $self->PopupMenu($ctx_mnu, $point);
+	
+}
+
+sub OnAddCategories {
+    my ( $self, $event ) = @_;
+
+    my $item = $self->tree->GetSelection;
+
+    my $category = $self->tree->GetPlData($item);
+    my $category_id;
+    
+    $category_id = $category->{id} if 'HASH' eq ref($category) ;
+
+    my $dialog = Wx::TextEntryDialog->new( 
+        $self, 
+        sprintf("Category name :", wxTheApp->branding->{Category}), 
+        sprintf("Add new %s", wxTheApp->branding->{category}),
+        sprintf("New %s", wxTheApp->branding->{category}), 
+    );
+
+    if( $dialog->ShowModal != wxID_CANCEL ) {
+    	my $name = $dialog->GetValue;
+        my ( $status, $status_msg ) = $self->pwg->AddCategories( $name, $category_id);
+        $self->_refresh_tree_categories_helper;
+    }
+    $dialog->Destroy;
+}
+
+sub OnRefreshCategories {
+    my ( $self, $event ) = @_;
+
+    $self->_refresh_tree_categories_helper;
+}
+
+sub _refresh_tree_categories_helper {
+    my ( $self ) = @_;	
+
+    my $busycursor = Wx::BusyCursor->new();
+    $self->tree->CollapseAll;
+    $self->tree->DeleteAllItems;
+    $self->imagelist->categories([]);
+    $self->pwg->RefreshCategories();
+    $self->populate_tree_categories;
+}
+
+sub OnImageViewerEndLabelEdit {
+    my( $self, $event ) = @_;
+  
+    my $image = $self->imagelist->GetImage($event->GetIndex);
+    $image->site_name(
+        $event->GetLabel
+    );
+    	
+    $self->image_prop_piwigo->Refresh;
+}
+
+sub OnImageViewerItemActivated {
+    my( $self, $event ) = @_;
+
+    $self->OnPhotoProperties;
+}
+
+
+sub OnImageViewerItemSelected {
+    my( $self, $event ) = @_;
+  
+    my $indx = $event->GetIndex;
+
+    # retrieve photo info for the last selected photo
+    $self->imagelist->SetCurrentImage($indx);
+    
+    $self->imagelist->image_selection(
+        $self->imageviewer->GetSelectedItems
+    );
+
+    $self->image_preview->SetBitmap(
+        wxNullBitmap
+    );
+    $self->image_preview->Refresh;
+
+    
+    $self->image_preview->SetBitmap(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->preview_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    );
+    
+    $self->image_preview->Refresh;
+    
+    $self->manager->Update;
+    
+    $self->image_prop_piwigo->Refresh;
+    $self->image_prop_exif->Refresh;
+
+}
+
+sub OnImageViewerKeyDown {
+    my( $self, $event ) = @_;
+
+    if(WXK_DELETE == $event->GetKeyCode){
+        $self->OnRemoveImages();
+    }	
+}
+
+sub OnUploadImages {
+    my( $self, $event ) = @_;
+
+    eval {
+        $self->ProcessImageSelection();    
+    };
+}
+
+# remove image from imagelist when uploaded
+sub UploadImagesViewerRefresh {
+    my ( $self ) = @_;	
+
+    my $imagelist= $self->imagelist ;
+
+    Wx::Yield();
+}
+
+sub UploadProgressMessageRefresh {
+    my ( $self, $msg ) = @_;	
+
+    $self->upload_progressdlg->processing(
+        $msg   
+    );	
+
+    Wx::Yield();
+}
+
+sub UploadProgressThumbnailRefresh {
+    my ( $self ) = @_;	
+
+    my $imagelist = $self->imagelist ;
+
+ 
+    $self->upload_progressdlg->image->SetBitmap(wxNullBitmap);
+    $self->upload_progressdlg->image->SetBitmap(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->wx_thumb_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    );
+
+    Wx::Yield();
+}
+
+sub UploadProgressBarRefresh {
+    my ( $self, $ratio ) = @_;	
+
+    $ratio = $self->imagelist->count > 1 ? 1 : $ratio; 
+    eval {
+        $self->upload_progressdlg->progress(
+            $ratio*$self->imagelist->count * ( 100/scalar @{$self->imagelist->image_selection} )
+        );
+        $self->upload_progressdlg->LogProgress();
+    };
+    croak gettext("Upload cancelled") if $@;
+
+    Wx::Yield();
+}
+
+sub SetNewFilesDisplayEndInfo {
+    my ( $self, $msg ) = @_;	
+	
+    $self->progressdlg->DisplayEndInfo($msg);
+}
+
+sub UploadDisplayEndInfo {
+    my ( $self, $msg ) = @_;	
+    
+    my $imagelist = $self->imagelist ;
+    
+    $self->upload_progressdlg->DisplayEndInfo($msg);
+}
+
+sub ShowImageViewer {
+    my ( $self ) = @_;	
+
+    if(!$self->imageviewer->IsShown){
+        my $imglistpage = [
+            [
+                $self->imageviewer, 
+                gettext("Photo selection"),
+                '../res/images.png', 
+                wxBITMAP_TYPE_PNG,
+            ],
+        ];
+        $self->notebook->DeletePage(0);
+    
+        $self->imageviewer->Show(1);
+        $self->_populate_notebook($self->notebook, $imglistpage, 0);
+        # load imagelist with loading.jpg
+    }
+	
+}
+
+
+
+
+sub SetNewFilesViewerRefresh {
+
+    my ( $self ) = @_;	
+
+    my $wximagelist = $self->imagelist->wx_thumb_imglist;
+
+    my $indx = $wximagelist->Add(
+        Wx::Bitmap->new( 
+            $self->imagelist->current_image->wx_thumb_file, 
+            $self->GetWxBitmapType($self->imagelist->type), 
+        )
+    ) if defined $self->imagelist->current_image->wx_thumb_file;
+    print $self->imagelist->current_image->wx_thumb_file, " added with index ", $indx, "\n";    
+    $self->imageviewer->Refresh(
+        $wximagelist
+    );
+
+    Wx::Yield();
+}
+
+
+
+# prepare and upload image_selection
+sub ProcessImageSelection {
+    my ( $self ) = @_;
+
+    return if !scalar @{$self->imagelist->sums};
+
+    if( scalar @{$self->imagelist->categories} ){
+        return if( !defined $self->imagelist->image_selection );
+        return if( !scalar @{$self->imagelist->image_selection} );
+        
+        $self->upload_progressdlg(
+            Uploader::GUI::wxImageProcessingProgressDlg->new(
+                { 
+                    title    => gettext("Image upload progress information"),
+                    bt_label => gettext("Cancel upload"), 
+                 }
+            )        
+        );
+        # modeless dialog
+        $self->upload_progressdlg->Show(1);
+        Wx::Yield();
+        eval {
+            $self->imagelist->UploadSelection;
+        };
+        if($@){
+            Wx::MessageBox( 
+                sprintf(
+                    gettext("Upload cancelled"),
+                ),
+                gettext("Piwigo upload information"),
+                wxOK | wxICON_INFORMATION, 
+            );
+        }
+    }
+    else {
+        Wx::MessageBox( 
+            sprintf(
+                "%s %s", 
+                gettext("Please select a valid target"),
+                wxTheApp->branding->{category}
+            ),
+            gettext("Piwigo upload error"),
+            wxOK | wxICON_EXCLAMATION, 
+        );
+    }
+}
+
+
+sub SetNewFilesProgress {
+    my ( $self ) = @_;
+
+    my $imagelist = $self->imagelist;
+
+    $self->progressdlg->processing(
+        sprintf(
+            $imagelist->progress_msg, 
+            $imagelist->current_image->file,
+        )
+    );
+
+    eval {
+        $self->progressdlg->image->SetSize([ $imagelist->wx_thumb_size, $imagelist->wx_thumb_size]);
+        $self->progressdlg->image->SetBitmap(wxNullBitmap);
+        $self->progressdlg->image->SetBitmap(
+            Wx::Bitmap->new( 
+                $imagelist->current_image->wx_thumb_file,
+                $self->GetWxBitmapType( $imagelist->type )
+            )
+        );
+        $self->progressdlg->progress(
+            $imagelist->count * ( 100/scalar @{$imagelist->new_files} )
+        );
+        $self->progressdlg->LogProgress();
+    };
+    Wx::Yield();
+}
+
+sub OnClose {
+  my $self = shift;
+
+
+    # Restaure previous log wnd
+    Wx::Log::SetActiveTarget( $self->oldlogwnd );
+
+    # allways store
+  
+    wxTheApp->StoreConnectionProperties;
+    
+    $self->imagelist->Store;
+    wxTheApp->login_dlg->Destroy;	
+
+    my $params = {};
+
+    ( $params->{'X'}, $params->{'Y'} ) = $self->GetPositionXY ;
+    ( $params->{'Width'}, $params->{'Height'} ) = $self->GetSizeWH ;
+    ( $params->{'PreviewWidth'}, $params->{'PreviewHeight'} ) = $self->image_preview->GetSizeWH ;
+    $params->{Perspective} = $self->manager->SavePerspective;
+    
+
+    wxTheApp->SaveConfig( $params );
+
+    $self->Destroy;
+}
+
+
+sub create_toolbar {
+    my( $self ) = @_;
+
+    my $tb = Wx::ToolBar->new( $self, -1, wxDefaultPosition, wxDefaultSize, wxTB_FLAT );
+    $tb->SetToolBitmapSize( wxSIZE( 32, 32 ) );
+    map {
+        my $icon1 = Wx::Icon->new();
+        eval {
+            $icon1->LoadFile($_->[2], $_->[3]);
+        };
+        my $tb_icon1 = Wx::Bitmap->new( $icon1 );
+
+        my $icon2 = Wx::Icon->new();
+        eval {
+            $icon2->LoadFile($_->[5], $_->[3]);
+        };
+        my $tb_icon2 = Wx::Bitmap->new( $icon2 );
+
+
+        $tb->AddTool( $_->[0], $_->[1], $tb_icon1, $tb_icon2, wxITEM_NORMAL, $_->[1] );
+        $tb->EnableTool( $_->[0], $_->[4]);
+    }
+    (
+        [
+            101, 
+            gettext("Add photo to selection"), 
+            '../res/tb_add.png', 
+            wxBITMAP_TYPE_PNG, 
+            1, 
+            '../res/tb_add.png', 
+            gettext("Add photo to selection for resizing and uploading")
+        ],
+        [
+            102, 
+            gettext("Remove photo from selection"), 
+            '../res/tb_remove.png', 
+            wxBITMAP_TYPE_PNG, 
+            1, 
+            '../res/tb_remove.png',
+            gettext("Remove photo from selection. Files are not deleted ")
+        ],
+        [
+            103, 
+            gettext("Upload to Piwigo"), 
+            '../res/tb_upload.png', 
+            wxBITMAP_TYPE_PNG, 
+            wxTheApp->use_offline ? 0 : 1, 
+            '../res/tb_upload.png',
+            gettext("Upload photos to Piwigo.")
+        ],
+        [
+            104, 
+            gettext("Global settings"), 
+            '../res/tb_settings.png', 
+            wxBITMAP_TYPE_PNG, 
+            0, 
+            '../res/tb_settings.png',
+            gettext("Change global settings.")
+        ],
+        [
+            105, 
+            gettext("Language choice"), 
+            '../res/tb_i18n.png', 
+            wxBITMAP_TYPE_PNG, 
+            1, 
+            '../res/tb_i18n.png',
+            gettext("Language choice")
+        ],
+    
+    );
+
+    if($@){
+    	undef $tb;
+    }
+    else{
+        $tb->Realize;
+    }
+
+    return $tb;
+}
+
+
+sub _create_textctrl {
+    my( $self, $parent, $text, $size ) = @_;
+
+    return Wx::TextCtrl->new( $parent, -1, $text, [0, 0], $size,
+                              wxNO_BORDER | wxTE_MULTILINE | wxTE_READONLY  );
+}
+
+sub create_textctrl {
+    my( $self, $text, $size ) = @_;
+
+    return $self->_create_textctrl( $self, $text, $size );
+}
+
+sub DESTROY {
+    my( $self ) = @_;
+
+    $self->manager->UnInit;
+}
+
+
+
+1;
+
+
+
+
+
+package DNDImageListDropTarget;
+
+use base qw(Wx::FileDropTarget Class::Accessor::Fast);
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          imageviewer
+          frame
+      /
+);
+
+sub new {
+  my $class = shift;
+  my $imageviewer = shift;
+  my $self = $class->SUPER::new( @_ );
+
+  $self->imageviewer($imageviewer);
+  $self->frame($imageviewer->GetParent);
+  return $self;
+}
+
+sub OnDropFiles {
+  my( $self, $x, $y, $files ) = @_;
+
+  $self->frame->SetNewFiles($files) ;
+}
+
+
+
+
+1;
+
+
+package DNDCategoryTreeDropTarget;
+
+use base qw(Wx::TextDropTarget Class::Accessor::Fast);
+use Data::Dumper;
+use Wx qw/
+              wxDragNone
+              wxDragCopy
+              wxDragMove
+         /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+          tree
+          frame
+      /
+);
+
+sub new {
+  my ( $class, $tree ) = @_;
+  my $self = $class->SUPER::new();
+
+  $self->tree($tree);
+  $self->frame($tree->GetParent);
+  return $self;
+}
+
+
+
+sub OnDropText {
+  my( $self, $x, $y, $textdata ) = @_;
+
+  # must be $VAR1 because $textdata is the result of Data::Dumper
+  my $VAR1;
+  eval $textdata;
+  eval {
+      if(scalar @$VAR1){
+      	   my @items;
+      	   if(scalar @items < 2) {
+               my ($dropItem, $flag) = $self->tree->HitTest([$x, $y]);
+      	   	push @items, $dropItem;
+      	   }
+      	   else {
+      	   	@items = $self->tree->GetSelections;
+      	   }
+      	   
+      	   # remove root item which is not a valid category
+      	   @items = grep { $self->tree->GetPlData( $_ ) != -1 } @items;
+      	   
+           $self->frame->imagelist->categories(
+               [
+                   map {
+                       $self->tree->GetPlData( $_ )->{id};
+                   }
+                   @items
+               ]
+           );
+           
+      	   $self->frame->imagelist->image_selection($VAR1);
+      	   $self->frame->ProcessImageSelection ;
+      }	
+  };
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxHtmlWindow.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxHtmlWindow.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxHtmlWindow.pm	(revision 3291)
@@ -0,0 +1,46 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxHtmlWindow;
+
+use strict;
+use Wx::Html;
+use base qw(Wx::HtmlWindow);
+
+sub new {
+  my $class = shift;
+  my $this = $class->SUPER::new( @_ );
+
+  if( -e '../res/intro.html' ){
+      $this->LoadPage( 
+          '../res/intro.html' 
+      );
+  }
+
+  return $this;
+}
+
+sub OnLinkClicked {
+  my( $this, $link ) = @_;
+
+  Wx::LogMessage( 'Link clicked: href="%s"', $link->GetHref() );
+  $this->SUPER::OnLinkClicked( $link );
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm	(revision 3291)
@@ -0,0 +1,137 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageListCtrl;
+use strict;
+use Wx;
+use Wx::DND;
+use Wx qw/
+             wxDefaultPosition
+             wxDefaultSize
+             wxLC_LIST
+             wxNO_BORDER
+             wxLC_EDIT_LABELS
+             wxLC_ICON
+             wxIMAGE_LIST_NORMAL
+             wxBITMAP_TYPE_JPEG
+             wxBITMAP_TYPE_PNG
+             wxBLACK
+             wxLC_VIRTUAL
+             wxLC_REPORT
+             wxBORDER_THEME
+             wxLIST_HITTEST_ONITEM
+             wxLIST_NEXT_ALL
+             wxLIST_STATE_SELECTED 
+         /;
+use Wx::Event qw/
+                    EVT_LIST_BEGIN_DRAG
+                    EVT_LIST_ITEM_SELECTED
+                /;
+         
+use base qw/Wx::ListCtrl Class::Accessor::Fast/;
+__PACKAGE__->mk_accessors( 
+    qw/
+          prevItemCount
+          imagenames
+          imagelist
+      / 
+);
+use Data::Dumper;
+sub new {
+  my( $class, $params ) = @_;
+  my( $self ) = $class->SUPER::new(
+                                       $params->{parentwnd},
+                                       -1,
+                                       wxDefaultPosition,
+                                       wxDefaultSize,
+                                       wxNO_BORDER|
+                                       wxLC_ICON|
+                                       wxLC_EDIT_LABELS
+                                  );
+
+  $self->imagelist(
+      $params->{imagelist}
+  );
+
+                                  
+  $self->prevItemCount(-1);
+
+  EVT_LIST_BEGIN_DRAG( $self, $self, \&OnBeginDrag);
+
+
+  $self;
+}
+
+sub OnBeginDrag {
+  my( $self, $event ) = @_;
+
+
+  my $data = Wx::TextDataObject->new( 
+      Dumper $self->GetSelectedItems 
+  );
+  my $source = Wx::DropSource->new( $self );
+  $source->SetData( $data );
+
+  $source->DoDragDrop( 1 );
+}
+
+
+sub GetSelectedItems {
+    my ( $self ) = @_;	
+
+  # find selected items
+  my $item = -1;
+  my $items = [];
+  while(1) {
+      $item = $self->GetNextItem(
+          $item,      
+          wxLIST_NEXT_ALL,
+          wxLIST_STATE_SELECTED
+      );
+      last if(-1 == $item);
+      
+      # item is selected	
+      push @$items, $item
+  }
+  
+  $items;
+}
+
+
+
+sub Refresh {
+    my ( $self, $wximagelist ) = @_;	
+
+   $self->SetImageList( $wximagelist, wxIMAGE_LIST_NORMAL ) if defined $wximagelist ;
+   $self->DeleteAllItems;
+   eval {
+       for( my $i = 0 ; $i < $self->GetImageList(wxIMAGE_LIST_NORMAL)->GetImageCount ; $i++){
+            my $indx = $self->InsertImageStringItem(
+                $i,
+                $self->imagelist->GetImage($i)->site_name,
+                $i,
+            );
+       }   
+   };
+}
+
+
+
+1;
+
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxImageProcessingProgressDlg.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxImageProcessingProgressDlg.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxImageProcessingProgressDlg.pm	(revision 3291)
@@ -0,0 +1,125 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageProcessingProgressDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_UPDATE_UI
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           gauge
+           progress
+           processing
+           txtprocessing
+           image
+           cancelled
+      / 
+);
+use Carp;
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    eval {
+      &main::ProcessingProgress($self, 1);
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PROGRESS_OK) );
+    $self->gauge( $self->FindWindow($main::ID_PROGRESS_GAUGE) );
+    $self->txtprocessing( $self->FindWindow($main::ID_PROGRESS_TXT) );
+    $self->image( $self->FindWindow($main::ID_STATICBITMAP) );
+    $self->gauge->SetForegroundColour(wxGREEN);
+    };
+
+    $self->btok->SetLabel(
+        $params->{bt_label}||'Cancel'
+    );
+
+    if($@){
+        Wx::LogMessage("Error during dialogbox initialization");
+    }
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PROGRESS_OK, \&OnOK );
+    
+	
+}
+
+# Update progress information
+sub LogProgress {
+    my ( $self ) = @_;
+    
+    croak "Cancelled by user\n" if $self->cancelled;    
+   
+    $self->txtprocessing->SetLabel(
+        $self->processing
+    );
+    $self->gauge->SetValue(
+        $self->progress
+    );
+}
+
+sub DisplayEndInfo {
+    my ( $self, $msg ) = @_;
+
+    $self->txtprocessing->SetLabel(
+        $msg
+    );
+    $self->image->Show(0);
+    $self->gauge->Show(0);
+
+    $self->btok->SetLabel(
+        'Close'
+    );
+	
+}
+
+sub OnOK {
+    my ( $self, $event ) = @_;
+    
+    $self->cancelled(1);
+    $self->Destroy;
+ 
+}
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxImageView.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxImageView.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxImageView.pm	(revision 3291)
@@ -0,0 +1,49 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxImageView;
+use Wx qw/wxDefaultPosition wxDefaultSize wxLC_ICON wxIMAGE_LIST_NORMAL wxLC_LIST
+                                       wxSUNKEN_BORDER wxLC_EDIT_LABELS/;
+use base qw/Wx::ListCtrl/;
+use strict;
+
+sub new {
+    my ( $class, $parentwnd, $images ) = @_;
+
+
+    my $self = $class->SUPER::new( $parentwnd, -1, wxDefaultPosition, wxDefaultSize, wxLC_LIST|
+                                       wxSUNKEN_BORDER|wxLC_EDIT_LABELS );
+    $self->SetSingleStyle( wxLC_ICON );
+    $self->Initialize($images);
+    
+    return $self;
+}
+
+sub Initialize {
+    my ( $self, $images ) = @_;	
+
+    $self->AssignImageList( $images, wxIMAGE_LIST_NORMAL );
+
+    for( my $i = 0 ; $i < $images->GetImageCount ; $i++ ) {
+        my $idx = $self->InsertStringImageItem( $i, "Item $i", $i % 5 );
+        $self->SetItemData( $idx, $i );
+   }
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxLoginDlg.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxLoginDlg.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxLoginDlg.pm	(revision 3291)
@@ -0,0 +1,138 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxLoginDlg;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+             wxID_CANCEL
+             wxID_OK
+             wxGREEN
+         /;
+use base qw/Wx::Dialog Class::Accessor::Fast/;
+use Wx::Event qw/
+                    EVT_BUTTON
+                /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           btok
+           url
+           username
+           password
+           use_offline
+      / 
+);
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( undef, -1, $params->{title}, wxDefaultPosition, wxDefaultSize);
+    # load controls
+    &main::Login($self, 1);
+
+    $self->use_offline(
+        $params->{use_offline}
+    );
+    
+    $self->url(
+        $params->{site_url}
+    );
+
+    $self->username(
+        $params->{site_username}
+    );
+
+    $self->password(
+        $params->{site_password}
+    );
+
+    $self->_initEventHandlers();
+    
+    $self->btok( $self->FindWindow($main::ID_PWG_OK) );
+
+    $self->FindWindow($main::ID_PWG_URL)->SetValue(
+        $self->url->()
+    );
+    
+    
+    $self->FindWindow($main::ID_PWG_USERNAME)->SetValue(
+        $self->username->() 
+    );
+    
+    $self->FindWindow($main::ID_PWG_PASSWORD)->SetValue( 
+        $self->password->() 
+    );
+      
+    $self;    
+}
+
+
+sub _initEventHandlers {
+    my ( $self ) = @_;
+    
+    EVT_BUTTON( $self, $main::ID_PWG_OK, \&OnLoginOK );
+    EVT_BUTTON( $self, $main::ID_PWG_CANCEL, \&OnLoginCancel );
+    EVT_BUTTON( $self, $main::ID_PWG_OFFLINE, \&OnLoginOffline );
+    
+	
+}
+
+sub OnLoginOffline {
+    my ( $self, $event ) = @_;
+
+    $self->use_offline->(1);
+       	
+    $self->EndModal(2);
+}
+
+
+sub OnLoginOK {
+    my ( $self, $event ) = @_;
+    
+    $self->url->(
+        $self->FindWindow($main::ID_PWG_URL)->GetValue    
+    );
+
+    $self->username->(
+        $self->FindWindow($main::ID_PWG_USERNAME)->GetValue
+    );
+    
+    $self->password->(
+        $self->FindWindow($main::ID_PWG_PASSWORD)->GetValue
+    );
+
+    $self->EndModal(1);
+}
+
+sub OnLoginCancel {
+    my ( $self, $event ) = @_;
+    
+    
+    $self->EndModal(0);
+ 
+}
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxPropertyGridPanel.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxPropertyGridPanel.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxPropertyGridPanel.pm	(revision 3291)
@@ -0,0 +1,209 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::GUI::wxPropertyGridPanel;
+use strict;
+use Wx qw/
+             wxDefaultSize
+             wxDefaultPosition
+         /;
+
+use base qw/Wx::Grid Uploader::Object2/;
+
+use Wx::Event qw/
+   EVT_GRID_CMD_CELL_CHANGE
+/;
+use Data::Dumper;
+
+__PACKAGE__->mk_accessors(     
+    qw/
+        frame_callbacks
+        renderer
+        editor
+        properties
+      /
+);
+
+
+
+sub new {
+    my ($this, $params) = @_;
+    #on recupere le nom de la classe en fonction du type d'appel de la méthode.
+    my $class = ref($this) || $this;
+
+
+    my $self = $class->SUPER::new( $params->{parentwnd}, -1, wxDefaultPosition, wxDefaultSize );
+
+    $self->renderer(
+        {
+            Bool     => sub { Wx::GridCellBoolRenderer->new },
+            Number   => sub { Wx::GridCellNumberRenderer->new },
+            LongText => sub { Wx::GridCellAutoWrapStringRenderer->new },
+        }
+    );
+
+    $self->editor(
+        {
+            Bool   => sub { Wx::GridCellBoolEditor->new },
+            Number => sub { Wx::GridCellNumberEditor->new },
+            Choice => sub { Wx::GridCellChoiceEditor->new(@_) },
+            LongText => sub { Wx::GridCellAutoWrapStringEditor->new },
+        }
+    );
+
+    $self->properties(
+        $params->{properties}
+    );
+    
+    # a frame callback for each property
+    $self->frame_callbacks(
+        $params->{frame_callbacks}
+    );
+    
+    $self->Initialize;
+      
+    EVT_GRID_CMD_CELL_CHANGE( $self, $self, \&OnCellChanged );
+    $self;    
+}
+
+sub Initialize {
+    my ( $self ) = @_;	
+
+
+  $self->CreateGrid( scalar @{$self->properties}, 2 );
+  
+
+  $self->SetRowLabelSize(0);
+  $self->SetColLabelSize(0);
+  $self->SetColSize( 0, 200 );
+  $self->SetColSize( 1, 200 );
+  
+  $self->_init_property_grid();
+
+}
+
+sub Refresh {
+    my ( $self ) = @_;
+    
+    $self->ClearGrid;
+
+    my $row = 0;
+    map {
+    	eval {
+
+    	    $self->SetCellValue(
+    	        $row,
+    	        0,
+    	        $_->{label},
+    	    );	
+
+
+    	    $self->SetCellValue(
+    	        $row,
+    	        1,
+    	        $_->{value}->(),
+    	    );	
+
+
+
+    	};
+    	$row++;
+    }@{$self->properties};
+	
+}
+
+sub _init_property_grid {
+    my ( $self ) = @_;
+
+    my $row = 0;
+    #print Dumper $self->properties;
+    map {
+    	eval {
+    	    $self->SetCellEditor(
+    	        $row,
+    	        1,
+                &{
+                    sub { $self->editor->{
+                        $_->{type}
+                    }->( $_->{choice} ) },
+                },    	    
+    	    ) if $self->editor->{$_->{type}};
+
+    	    $self->SetCellRenderer(
+    	        $row,
+    	        1,
+                &{
+                    $self->renderer->{
+                        $_->{type}
+                    }
+                },    	    
+    	    ) if $self->renderer->{$_->{type}};
+
+    	    $self->SetReadOnly(
+    	        $row,
+    	        0,
+            );
+
+    	    $self->SetCellValue(
+    	        $row,
+    	        0,
+    	        $_->{label},
+    	    );	
+
+    	    $self->SetCellValue(
+    	        $row,
+    	        1,
+    	        $_->{value}->(),
+    	    );	
+
+    	    $self->SetReadOnly(
+    	        $row,
+    	        1,
+    	    ) if $_->{readonly};	
+
+
+    	};
+    	$row++;
+    }@{$self->properties};
+	
+}
+
+sub OnCellChanged {
+    my ( $self, $event ) = @_;
+
+    my( $row, $col ) = ( 
+        $event->GetRow,
+        $event->GetCol,
+    );
+    
+    my $value = $self->GetCellValue(
+        $row,
+        $col,
+    );
+    
+    # set property
+    $self->properties->[$row]->{value}->($value);
+
+    
+    # execute the corresponding frame callback
+    $self->frame_callbacks->[$row]->() if defined $self->frame_callbacks->[$row];
+}
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/Image.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/Image.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/Image.pm	(revision 3291)
@@ -0,0 +1,67 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Image;
+use strict;
+use base qw/Uploader::Object/;
+
+__PACKAGE__->mk_accessors(
+    qw/
+        file
+        wx_thumb_file
+        preview_file
+        site_high_file
+        site_name
+        site_resized_file
+        site_thumb_file
+        site_author
+        site_comment
+        exif_metadata
+        add_rank
+        site_categories
+        site_tags
+        preview_w
+        preview_h
+        file_sum
+    /
+);
+
+sub Init {
+    my ( $self ) = @_;
+}
+
+sub exif_tag {
+    my ( $self, $tag ) = @_;
+	
+    my $exif = $self->exif_metadata ;
+    
+    $exif->{$tag};	
+}
+
+sub create_date {
+    my ( $self ) = @_;
+    
+    my $exif = $self->exif_metadata ;
+    
+    $exif->{CreateDate};	
+}
+
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/ImageList.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/ImageList.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/ImageList.pm	(revision 3291)
@@ -0,0 +1,1207 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::ImageList;
+use strict;
+use Carp;
+use base qw/Uploader::Object/;
+use Image::ExifTool qw(:Public);
+use Image::Magick;
+use File::Spec;
+use Uploader::Image;
+use Data::Dumper;
+use Storable;
+use Digest::MD5::File qw/file_md5_hex md5_hex/;
+use Encode qw/encode decode is_utf8/;
+use Wx::Locale qw/:default/;
+
+# this class implements a collection of image files with associated data
+$|=1;
+__PACKAGE__->mk_accessors( 
+    qw/
+       	        thumb_size
+                preview_ratio
+                categories
+      	        type
+      	        filter
+      	        blur
+      	        quality
+      	        prefix
+      	        author
+      	        count
+                resize_w
+                resize_h
+                new_files
+                storable_file
+       	        wx_thumb_size
+                current_image
+                images
+                image_selection
+                exif_metadata
+                wx_thumb_imglist
+                wx_thumb_dir
+                preview_dir
+                site_resized_dir
+                site_thumb_dir
+                userdata_dir
+                progress_msg
+                last_error_msg
+                default_photo_name
+                default_photo_name_method
+            	default_name_prefix
+                SetNewFilesViewerRefreshCallback
+                SetNewFilesProgressCallback
+                SetNewFilesDisplayEndInfoCallback
+                UploadImagesViewerCallback
+                progress_thumbnail_refresh
+                progress_msg_refresh
+                progressbar_refresh
+                progress_endinfo_refresh
+                RescaleCallback
+                ResizeCallback
+                upload_rejects
+                pwg
+                upload_high
+                remove_uploaded_from_selection
+                wx_quality
+                th_quality
+                auto_rotate
+                interlace
+                create_resized
+                use_exif_preview
+                image_sums
+                sums
+                version
+                imagelist_version
+     /
+);
+
+
+sub Init {
+    my ( $self ) = @_;
+    
+    
+}
+
+
+
+# save exif preview image if available
+# otherwise create a preview image
+sub _write_preview_image {
+    my ( $self, $imagedata ) = @_;
+
+
+    # If PreviewImage is available, we use it
+    if(defined $imagedata ) {
+        print "_write_preview_image, use exif PreviewImage\n";
+    	eval {
+            open PREVIEW_FILE, ">", $self->current_image->preview_file ;
+            binmode PREVIEW_FILE;
+            print PREVIEW_FILE $$imagedata;
+            close PREVIEW_FILE;
+        };
+        $self->last_error_msg($@) if $@;
+    }
+    
+}
+
+
+sub _set_exif_tag {
+    my ( $self, $file, $tag, $newValue ) = @_;	
+
+  my $options = {};
+  # Create a new Image::ExifTool object
+  my $exifTool = new Image::ExifTool;
+
+  # Extract meta information from an image
+  $exifTool->ExtractInfo($file, $options);
+
+  # Set a new value for a tag
+  $exifTool->SetNewValue($tag, $newValue);
+
+  # Write new meta information to a file
+  $exifTool->WriteInfo($file);
+
+}
+
+sub _set_current_image_filepaths__ {
+    my ( $self ) = @_;
+
+    my ( $vol, $dir, $file ) = File::Spec->splitpath(
+        $self->current_image->file
+    );
+
+    my ( $filename, $ext ) = split /\./, $file ;
+    
+
+    $self->current_image->wx_thumb_file( 
+        File::Spec->catfile(
+            $self->wx_thumb_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+    $self->current_image->preview_file( 
+        File::Spec->catfile(
+            $self->preview_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+    $self->current_image->preview_file( 
+        encode('iso-8859-1', $self->current_image->preview_file)
+    );
+
+    $self->current_image->site_thumb_file( 
+        File::Spec->catfile(
+            $self->site_thumb_dir,
+            sprintf(
+                "%s.%s",
+                $filename,
+                $self->type,
+            )
+        )
+    );
+
+}
+
+sub _set_current_image_filepaths {
+    my ( $self ) = @_;
+
+    my $filename = sprintf(
+        "%s.%s",
+        $self->current_image->file_sum,
+        $self->type,
+    );
+
+
+    $self->current_image->wx_thumb_file( 
+        File::Spec->catfile(
+            $self->wx_thumb_dir,
+            $filename
+        )
+    );
+
+    $self->current_image->preview_file( 
+        File::Spec->catfile(
+            $self->preview_dir,
+            $filename
+        )
+    );
+    $self->current_image->preview_file( 
+        encode('iso-8859-1', $self->current_image->preview_file)
+    );
+
+    $self->current_image->site_thumb_file( 
+        File::Spec->catfile(
+            $self->site_thumb_dir,
+            $filename
+        )
+    );
+
+}
+
+
+sub SetCurrentImage {
+    my ( $self, $indx ) = @_;	
+
+    $self->current_image(
+        $self->GetImage($indx)
+    );
+}
+
+
+sub SetNewFiles {
+    my ( $self, $files ) = @_;
+
+    $self->new_files( $files );
+
+    # if some files have been previously selected 
+    my $i = scalar @{$self->sums};
+    my $count = 0;
+    $self->count($count);
+    my $errors = 0;
+
+    map {
+    	my $info = $self->_read_exif_metatdata($_);
+       	my $is_new_image = $self->_add_image($_, $info, $i);	
+        $self->SetCurrentImage($i);
+    	$self->_set_current_image_filepaths();
+
+        if($is_new_image){
+    	    my $use_wx_resize = $self->_create_gui_preview($info);
+    	    $self->_create_gui_thumbnail($use_wx_resize);
+
+            # ok
+            if(!$@){
+                $self->progress_msg("Thumbnail and preview created for %s");
+            }
+            else {
+                $self->progress_msg("An error has occured when processing %s\n$@");
+                # remove from list
+                splice @{$self->sums}, $i, 1;
+                $errors++;
+            }
+        
+            $self->SetNewFilesProgressCallback->();
+        }
+        $i++;
+        $count++;
+        $self->count($count);
+        $self->SetNewFilesViewerRefreshCallback->();
+    }
+    @{$files};
+    $self->SetNewFilesDisplayEndInfoCallback->(
+        sprintf(
+            "%s images added to the selection\n\n%s errors",
+            $self->count,
+            $errors
+            
+        )
+    );
+    
+    $self->Store;
+    
+}
+
+sub _read_exif_metatdata {
+    my ( $self, $file ) = @_;
+    
+    # read exif metadata
+    my $info;
+    eval {
+        $info = ImageInfo( $file );
+    };
+    $info = {} if($@);
+    
+    $info;
+}
+
+# key is file path
+sub _add_image {
+    my ( $self, $file, $info, $i ) = @_;	
+
+    my $is_new_image;
+
+    # for legacy imagelist that do not have image_sums property
+    $self->image_sums(
+        {}
+    ) if !$self->image_sums;
+
+    my $sum = file_md5_hex($file);
+
+    my $image;
+    if ( !exists $self->image_sums->{$sum} ){
+print "_add_image ", $file, "\n";
+        # append to image list
+        $image = Uploader::Image->new(
+        {
+                file              => $file,
+                file_sum          => $sum,
+                site_name         => $self->_default_photo_name($file, $info, $i),
+                site_author       => $self->author,
+                exif_metadata     => $self->_select_exif_data($info),
+                add_rank          => $i,
+                site_categories   => [],
+                site_tags         => [],
+                site_high_file    => $_,
+            }
+        );
+
+        $self->image_sums->{$sum} = $image ;
+        $is_new_image = 1;
+    } else {
+        $image = $self->image_sums->{$sum};
+    }
+
+        
+    $self->sums->[$i] = $sum ;
+
+    $is_new_image;
+}
+
+
+sub _default_photo_name {
+    my ( $self, $file, $info, $i ) = @_;
+    
+    $file = encode('iso-8859-1', $file);
+    
+    my $name;
+    my $create_date = $info->{CreateDate};
+    my $ext;
+    my ( $vol, $path, $filename ) = File::Spec->splitpath($file);
+    ( $filename, $ext ) = split /\.\w+$/, $filename;
+    
+    my ( $yyyy, $mm, $dd, $hh, $mi, $ss ) = split /[:\s]/, $create_date ;
+  
+    my $chrono = join('', $yyyy, $mm, $dd);
+    if(gettext('Prefix') eq $self->default_photo_name){
+    	$name = $self->default_name_prefix
+    }
+    elsif(gettext('File name') eq $self->default_photo_name){
+    	$name = $filename
+    }
+    elsif(gettext('File path and name') eq $self->default_photo_name){
+        $name = sprintf(
+            "%s", 
+            File::Spec->catfile($path, $filename), 
+        )    	
+    }	
+    elsif(gettext('Prefix + rank number') eq $self->default_photo_name){
+        $name = sprintf(
+            "%s%s", 
+            $self->default_name_prefix, 
+            1+$i,
+        )    	
+    }	
+    elsif(gettext('Rank number + prefix') eq $self->default_photo_name){
+        $name = sprintf(
+            "%s%s", 
+            1+$i,
+            $self->default_name_prefix, 
+        )    	
+    }	
+    elsif(gettext('Prefix + create date chrono') eq $self->default_photo_name){
+        $name = sprintf(
+            "%s%s", 
+            $self->default_name_prefix, 
+            $chrono,
+        )    	
+    }	
+    elsif(gettext('Create date chrono + prefix') eq $self->default_photo_name){
+        $name = sprintf(
+            "%s%s", 
+            $chrono,
+            $self->default_name_prefix, 
+        )    	
+    }	
+
+    $name;	
+}
+
+sub _create_gui_preview {
+    my ( $self, $info ) = @_;
+
+    my $create_gui_preview;
+    my $use_wx_resize;
+    if($self->use_exif_preview){        
+        # an exif preview is available. we try to use it
+        if(defined $info->{PreviewImage} ){
+            printf("use preview\n");
+            $self->_write_preview_image( $info->{PreviewImage} );
+            my $image = new Image::Magick;
+            eval {
+                $create_gui_preview = $image->ReadImage(
+                    $self->current_image->preview_file
+                );
+            };
+            unlink $self->current_image->preview_file if $create_gui_preview;
+        }
+        else {
+            $create_gui_preview = 1;
+        }
+    }
+    else {
+        $create_gui_preview = 1;
+    }
+    print "create gui preview", $create_gui_preview, "\n";
+    # have to create a preview file
+    if($create_gui_preview) {
+        eval {
+            if(!$self->CreateGUIPreview()){
+                # use method provided by the caller
+                # source, target, type, ratio
+                print "CreateGUIPreview failed, use callback\n";
+                $self->RescaleCallback->(
+                    $self->current_image->file,
+                    $self->current_image->preview_file,
+                    $self->type,
+                    $self->preview_ratio,
+                    undef,
+                    undef,
+                    $self->quality,
+                );
+                $use_wx_resize = 1;
+            }
+        };# create a preview file
+    }    
+
+    $self->RotateImage(
+        $self->current_image->preview_file,
+    ) if $self->auto_rotate;
+
+    $self->_set_exif_tag(
+        $self->current_image->preview_file,
+        'Orientation',
+        'Horizontal (normal)',
+    ) if $self->auto_rotate;
+    
+    $use_wx_resize;    	
+}
+
+sub _create_gui_thumbnail {
+    my ( $self, $use_wx_resize ) = @_;
+
+    # Now, we should have a valid preview image.
+    # try to thumbnail it
+     eval {
+        printf("create gui thumbnail\n");
+        # use the preview image to create a gui display thumbnail
+        if($use_wx_resize)
+        {
+                print "CreateGUIThumbnail failed, use callback\n";
+                $self->ResizeCallback->(
+                    $self->current_image->preview_file,
+                    $self->current_image->wx_thumb_file,
+                    $self->type,
+                    $self->wx_thumb_size,
+                    $self->wx_thumb_size,
+                    $self->wx_quality,
+                );
+        	
+        } else {
+            $self->CreateGUIThumbnail();            	
+        }
+     };
+}
+
+sub RemoveImageSelection {
+    my ( $self ) = @_;
+    
+    return if (! scalar @{$self->sums} );
+    return if (! defined $self->image_selection );
+    
+    # higher first, to keep same indexes during remove
+    my @images = reverse @{$self->image_selection};     
+    map {
+        my $image = $self->GetImage($_)->file;
+        splice @{$self->sums}, $_, 1 ;
+        $self->wx_thumb_imglist->Remove($_);
+        shift @images;
+    }
+    @images;
+    
+    # clear image selection
+    $self->image_selection([]);
+}
+
+# used for display in GUI. has to fit a square box ( wxImageList )
+sub CreateGUIThumbnail {
+    my ( $self ) = @_;
+
+    return 1 if( -e $self->current_image->wx_thumb_file );
+    my $rval = 0;
+    print "CreateGUIThumbnail ", $self->current_image->wx_thumb_file, "\n";
+    my $image = new Image::Magick;
+
+    my $size = $self->wx_thumb_size;
+
+    my $status = $image->Set(size=>sprintf("%sx%s", 3*$size, 3*$size));
+    warn "$status" if $status ;
+
+    $status = $image->ReadImage(
+        $self->current_image->preview_file
+    );
+    warn "$status" if $status;
+    return $rval if $status;
+
+    $self->current_image->preview_w(
+        $image->Get('width')
+    );
+    $self->current_image->preview_h(
+        $image->Get('height')
+    );
+
+
+    $status = $image->Thumbnail(
+        geometry=>sprintf("%s%s>", $size*$size, '@')
+    );
+    warn "$status" if $status;
+    return $rval if $status;
+
+#    causes strange behaviour with i18n -> yellow borders when local is other than EN
+#    $status = $image->Set(background=>"white");
+#    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    $image->Extent(
+        geometry=>sprintf("%sx%s", $size, $size),
+        gravity=>'center',
+    );
+
+    $image->Set(
+        quality=>$self->wx_quality
+    );
+
+    $status = $image->Strip();
+    warn "$status" if $status ;
+    
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            encode('iso-8859-1', $self->current_image->wx_thumb_file),
+        )
+    );
+
+    undef $image;
+    
+    $rval = 1;
+    
+    return $rval;
+}
+
+
+sub CreateGUIPreview {
+    my ( $self ) = @_;
+    printf("CreateGUIPreview %s\n", $self->current_image->preview_file );
+    return 1 if( -e $self->current_image->preview_file );
+    
+    my $rval = 1;
+
+    my $image = Image::Magick->new();
+
+    my $ratio = $self->preview_ratio;
+
+
+    my $status = $image->Read(
+        sprintf(
+            "%s",
+            $self->current_image->file,
+        )
+    );
+    warn "$status ", $self->current_image->file, "\n" if $status ;
+    return 0 if $status;
+
+    $status = $image->Thumbnail(
+        geometry=>sprintf(
+                              "%s%%x%s%%>", 
+                              $ratio, 
+                              $ratio
+                         )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+
+    $status = $image->Set(background=>"white");
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+
+    $image->Set(quality=>$self->wx_quality);
+
+
+    $status = $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            encode('iso-8859-1', $self->current_image->preview_file),
+        )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+    
+    undef $image;
+
+    return $rval;
+}
+
+
+sub CreateResized {
+    my ( $self ) = @_;
+    
+    my $rval = 1 ;
+    return $rval if( -e $self->current_image->site_resized_file );
+
+    printf(
+        "Create resized %s\n",
+        $self->current_image->file,
+    );     
+
+    my $image = new Image::Magick;
+
+    my $status = $image->ReadImage(
+        $self->current_image->file
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+    my $w = $image->Get('width');
+    my $h = $image->Get('height');
+        
+    # should calculate the aspect ratio
+    my $resize_w = $self->resize_w;
+    my $resize_h = $self->resize_h;
+        
+    if( $w < $h ){
+        my $resize_w_ = $resize_w;
+        $resize_w = $resize_h;
+        $resize_h = $resize_w_;
+    }
+    
+    $status = $image->Resize(
+        geometry => sprintf("%sx%s>", $resize_w, $resize_h), 
+        filter => sprintf("%s", $self->filter), 
+        blur => $self->blur
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    # exif from original image
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+        printf(
+            "Rotate %s\n",
+            $1
+        );
+    
+        $image->Rotate( degrees=>$1 );	
+    }
+
+    $status = $image->Set(quality=>$self->quality);
+    warn "$status" if $status ;
+
+    $status = $image->Set(interlace=>$self->interlace);
+    warn "$status" if $status ;
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            encode('iso-8859-1', $self->current_image->site_resized_file),
+        )
+    );
+    warn "$status" if $status ;
+    return 0 if $status;
+    
+    undef $image;
+
+   
+    $rval = 0 if $status;
+
+    return $rval;
+}
+
+sub CreateThumbnail {
+    my ( $self ) = @_;
+    
+    return 1 if( -e $self->current_image->site_thumb_file );
+    
+    my $rval = 1;
+
+    my $image = new Image::Magick;
+
+    my $status = $image->ReadImage(
+        encode('iso-8859-1', $self->current_image->site_resized_file)
+    );
+    warn "$status" if $status ;
+
+    
+    $status = $image->Resize(
+        geometry => sprintf(
+                                "%sx%s>", 
+                                $self->thumb_size, 
+                                $self->thumb_size
+                           ),
+    );
+    warn "$status" if $status ;
+
+    $status = $image->Set(Gravity=>"Center");
+    warn "$status" if $status ;
+
+    $status = $image->Set(quality=>$self->th_quality);
+    warn "$status" if $status ;
+
+    $status = $image->Strip();
+    warn "$status" if $status ;
+
+
+    $image->Write(
+        sprintf(
+            "%s:%s",
+            $self->type,
+            encode('iso-8859-1', $self->current_image->site_thumb_file),
+        )
+    );
+    
+    undef $image;
+
+
+    $rval = 0 if $status;
+
+    return $rval;
+}
+
+
+
+sub _select_exif_data {
+    my ( $self, $exif ) = @_;
+
+    return {
+        map {
+    	    $_ => $exif->{$_},
+        }
+        qw/
+            CreateDate
+            ImageWidth
+            ImageHeight
+            Orientation
+            DateTimeOriginal
+            ISO
+            ExposureTime
+            ApertureValue
+            FocalLength
+            Lens
+            Exposure
+            Make
+            Model
+        /
+    };    
+}
+
+sub Store {
+    my ( $self ) = @_;
+    
+    my $data = $self->get_storable(
+        [ 
+            qw/
+                images
+       	        thumb_size
+                preview_ratio
+      	        type
+      	        filter
+      	        blur
+      	        quality
+      	        wx_quality
+      	        th_quality
+      	        prefix
+      	        author
+      	        count
+                resize_w
+                resize_h
+                new_files
+                storable_file
+       	        wx_thumb_size
+                current_image
+                exif_metadata
+                wx_thumb_dir
+                preview_dir
+                site_resized_dir
+                site_thumb_dir
+                userdata_dir
+                progress_msg
+                default_photo_name
+            	default_name_prefix
+            	upload_high
+            	remove_uploaded_from_selection
+            	auto_rotate
+            	interlace
+            	create_resized
+            	use_exif_preview
+            	image_sums
+            	sums
+                version
+                imagelist_version
+            /
+        ] 
+    
+    );
+    eval {
+        store $data, $self->storable_file;
+    };
+    if($@){
+        print $@, "\n";	
+    }
+}
+
+
+
+sub UploadSelection {
+    my ( $self ) = @_;	
+
+    my $viewer_callback = $self->UploadImagesViewerCallback ;
+
+
+    $self->upload_rejects(
+        []
+    );
+
+    my $count = 1;
+    my $msg;
+    $self->count(
+        $count
+    );
+    my $uploaded = 0;
+    my $rejected = 0;
+    my $time_begin = time;
+    my $last_error;
+    map {
+        # current image object    	
+    	$self->current_image(
+    	    $self->GetImage($_)
+    	);
+
+        my ( $vol, $dir, $file ) = File::Spec->splitpath(
+            $self->current_image->file
+        );
+        
+        my $site_name = $self->current_image->site_name;
+    
+#        my ( $filename, $ext ) = split /\./, $file ;
+        my $filename = $self->current_image->file_sum ;
+
+        # lately defined to make sure we have the last global properties ( resize_w, resize_h )
+        $self->current_image->site_resized_file( 
+            File::Spec->catfile(
+                $self->site_resized_dir,
+                sprintf(
+                    "%s_%sx%s.%s",
+                    $filename,
+                    $self->resize_w,
+                    $self->resize_h,
+                    $self->type,
+                )
+            )
+        );
+        
+        $msg = sprintf(
+            "Preparing resized image for %s - %s",
+            $site_name,
+            $file,
+        ); 
+
+    	eval {
+            # set current image thumbnail
+            $self->progress_thumbnail_refresh->();
+
+            $self->progress_msg_refresh->($msg);
+    
+      	    # update upload progress dialog
+            $self->progressbar_refresh->(0.25);
+        };
+        # user cancelled : dialog box is destroyed
+        croak "Upload cancelled. ", $@ if $@ ;
+
+        if( $self->create_resized ){
+            eval {
+                if(!$self->CreateResized()){
+                    printf("CreateResized failed %s. Use ResizeCallback\n", $@);
+                    # use method provided by the caller
+                    # source, target, type, ratio, width, $height
+                    $self->ResizeCallback->(
+                        $self->current_image->file,
+                        $self->current_image->site_resized_file,
+                        $self->type,
+                        undef,
+                        $self->resize_w,
+                        $self->resize_h,
+                        $self->quality,
+                    );
+                
+                    $self->RotateImage(
+                        $self->current_image->site_resized_file,
+                    ) if $self->auto_rotate;
+                }
+            };
+            $self->_set_exif_tag(
+                $self->current_image->site_resized_file,
+                'Orientation',
+                'Horizontal (normal)',
+            ) if $self->auto_rotate;
+        }
+        # the original is at the right size, no need to create a resize
+        else {
+            $self->current_image->site_resized_file(
+                $self->current_image->file,
+            );
+        }
+
+
+
+        # if upload high, rotate a copy of original file
+        if($self->upload_high){
+            $self->CreateHigh();
+        }
+
+        $msg = sprintf(
+            "Preparing thumbnail for %s - %s",
+            $site_name,
+            $file,
+        );
+
+    	eval {
+            $self->progress_msg_refresh->($msg);
+        };
+        croak "Upload cancelled. ", $@ if $@ ;
+
+    	eval {
+            $self->CreateThumbnail();
+        };
+
+        if($@){
+            $msg = sprintf(
+                "An error has occured %s - %s\n$@",
+                $site_name,
+                $file
+            );
+        }
+        else{
+            $msg = sprintf(
+                "Uploading %s - %s",
+                $site_name,
+                $file
+            );
+        }
+    	eval {
+            $self->progress_msg_refresh->($msg);
+       	    $self->progressbar_refresh->(0.50);
+        };
+        croak "Upload cancelled. ", $@ if $@ ;
+
+        # photo metadata
+        $self->_prepare_upload_properties();    	
+        my ( $status, $status_msg ) = $self->pwg->UploadImage();
+
+        if ( $status ){
+            $msg = sprintf(
+                "%s : %s upload succcessful.",
+                $site_name,
+                $file
+            );
+
+            $uploaded++;
+        } else {
+            $msg = sprintf(
+                "An error has occured.\n%s : %s upload is cancelled.\n$status_msg",
+                $site_name,
+                $file
+            );
+            $rejected++;
+            $last_error = $status_msg;
+        }	
+        
+        $count++;
+        $self->count(
+            $count
+        );
+    	# update upload progress dialog
+    	eval {
+            $self->progress_msg_refresh->($msg);
+       	    $self->progressbar_refresh->(1);
+        };
+        croak "Upload cancelled. ", $@ if $@ ;
+        
+    }
+    @{$self->image_selection} if defined 
+        $self->image_selection;
+
+    my $time_end = time;
+    my $duration = $time_end - $time_begin;
+    $msg = sprintf(
+        "%s images processed\n\n%s images uploaded\n\n%s images in errors and not uploaded - $last_error\n\nDuration : %s seconds",
+        $self->count - 1,
+        $uploaded,
+        $rejected,
+        $duration,
+    );
+    $self->progress_endinfo_refresh->($msg);
+}
+
+# if we need to rotate
+sub CreateHigh {
+    my ( $self ) = @_;
+
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $self->auto_rotate and $orientation =~ m/Rotate (\d+)/ ){
+
+        my ( $vol, $dir, $file ) = File::Spec->splitpath(
+            $self->current_image->file
+        );
+    
+        my ( $filename, $ext ) = split /\./, $file ;
+    
+        # high_file is a copy of original
+        $self->current_image->site_high_file( 
+            File::Spec->catfile(
+                $self->site_resized_dir,
+                sprintf(
+                    "%s_high.%s",
+                    $filename,
+                    $self->type,
+                )
+            )
+        );
+
+        my $image = Image::Magick->new();
+        # we read original
+        my $status = $image->Read(
+            $self->current_image->file
+        );
+        warn "$status ", $self->current_image->file, "\n" if $status ;
+        return 0 if $status;
+
+        $image->Rotate( degrees=>$1 );	
+        
+        $image->Write(
+            filename=>encode('iso-8859-1', $self->current_image->site_high_file)
+        );
+        warn "$status ", $self->current_image->site_high_file, "\n" if $status ;
+        return 0 if $status;
+        
+        undef $image;
+
+        $self->_set_exif_tag(
+            $self->current_image->site_high_file,
+            'Orientation',
+            'Horizontal (normal)',
+        );
+
+        # Now all images that need to be rotated are done. Update exif
+        $self->current_image->exif_metadata->{Orientation} = 'Horizontal (normal)';
+    }
+    else{
+        # high file is the original file
+        $self->current_image->site_high_file(
+            $self->current_image->file
+        );
+    }
+
+    return 1;
+}
+
+sub _prepare_upload_properties {
+    my ( $self ) = @_;
+    
+    $self->pwg->upload_high(
+        $self->upload_high
+    );
+
+    $self->pwg->site_high_file(
+        $self->current_image->site_high_file
+    );
+
+    $self->pwg->site_resized_file(
+        $self->current_image->site_resized_file
+    );
+
+    $self->pwg->site_thumb_file(
+        $self->current_image->site_thumb_file
+    );
+
+    $self->pwg->site_author(
+        $self->current_image->site_author
+    );
+
+    $self->pwg->site_comment(
+        $self->current_image->site_comment
+    );
+
+    $self->pwg->site_image_name(
+        $self->current_image->site_name
+    );
+
+    $self->pwg->site_img_date_creation(
+        $self->current_image->create_date
+    );
+
+    $self->current_image->site_categories(
+        $self->categories
+    );
+
+    $self->pwg->categories(
+        sprintf(
+            "%s",
+            join(';', @{$self->categories})
+        )
+    );
+
+    $self->pwg->tags(
+        #join(',', @{$self->current_image->site_tags})
+    );
+	
+}
+
+# read Orientation exif tag from original image
+# apply rotation to image ( preview or resize )
+sub RotateImage {
+    my ( $self, $file ) = @_;
+    
+    # exif from original image
+    my $orientation = $self->current_image->exif_metadata->{Orientation};
+    
+    # Valid for Rotate 180, Rotate 90 CW, Rotate 270 CW
+    if( $orientation =~ m/Rotate (\d+)/ ){
+        printf(
+            "Rotate %s\n",
+            $1
+        );
+
+        my $image = Image::Magick->new();
+        
+        # read resized file
+        my $status = $image->Read(
+            $file
+        );
+        warn "$status ", $file, "\n" if $status ;
+        return 0 if $status;
+    
+        $image->Rotate( degrees=>$1 );	
+        
+        # write resizd file
+        $image->Write(
+            filename=>encode('iso-8859-1', $file)
+        );
+        warn "$status ", $file, "\n" if $status ;
+        return 0 if $status;
+        
+        undef $image;
+    
+    }	
+    return 1;
+}
+
+sub GetImage {
+    my ( $self, $indx ) = @_;
+    
+    my $sum = $self->sums->[$indx];
+
+    $self->image_sums->{$sum};
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/Object.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/Object.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/Object.pm	(revision 3291)
@@ -0,0 +1,142 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Object;
+use strict;
+use Data::Dumper;
+use Storable;
+use File::Slurp ; 
+use Data::Dumper;
+use base qw/
+               Class::Accessor::Fast
+           /; 
+
+# $param is a hash with :
+# key : member name
+sub new {
+    my ( $class, $params ) = @_;
+    
+    $params ||= {};
+    
+    my $self = bless $params, $class ;
+
+    # create member accessors
+    #__PACKAGE__->mk_accessors(     
+    #    keys %$params
+    #);
+    
+    
+    if(defined $self->{plugin_file}){
+    	die "Plugin file is missing." unless -e $self->{plugin_file};
+        $self->InitPlugins();
+    }
+
+    # member accessors initialization
+    eval {
+        map {
+        	$self->$_(
+        	    $params->{$_}
+        	);
+        }
+        keys %$params;
+    };
+    if($@){
+        warn $@;	
+    }
+
+    # must be defined in child class
+    $self->Init();
+
+    
+    return $self;
+}
+
+
+sub InitPlugins {
+    my ( $self ) = @_;
+    
+    my $data;
+    eval { $data = read_file( $self->{plugin_file} ); } ;
+
+    my $plugins = [] ;
+    if( defined $data){
+        my $expr = '$plugins = ' ;
+        $expr .=  "$data  " ;
+        eval $expr ;
+    }
+    # load plugins
+    
+    my $hplugins = $plugins->[0] if scalar @$plugins;
+    while( my ( $key, $value ) = each %$hplugins ) {
+    	$self->ReadParams( $value, $key);
+    }
+    
+}
+
+sub ReadParams {
+	my( $self, $file, $key ) = @_ ;
+
+	my $expr_params ;
+	eval { $expr_params = read_file( $file ); } ;
+	
+	my $paramValues = [] ;
+	if($expr_params){
+		my $expr = '$paramValues = ' ;
+		$expr .=  "$expr_params  " ;
+		eval $expr ;
+	}
+	return unless 'ARRAY' eq ref $paramValues ;
+        if($@){
+            die "Cannot load data $@";	
+        }
+	if(scalar(@$paramValues )){
+	    my $params = $paramValues->[0] ;
+	    $self->SetKeyValues($params, $key);
+	}
+}
+
+sub SetKeyValues {
+    my ( $self, $params, $key )= @_;
+    if (defined $key) {	
+        foreach( keys %$params ) {
+            $self->{$key}->{$_} = $params->{$_} ;
+        }
+    }
+    else {
+        foreach( keys %$params ) {
+            $self->{$_} = $params->{$_} ;
+        }
+    }
+}
+
+
+sub get_storable {
+    my ( $self, $keys ) = @_;	
+
+    my $data = {
+        map {
+    	    $_ => $self->{$_},
+          }
+          @$keys
+    };
+    
+    $data;
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/Object2.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/Object2.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/Object2.pm	(revision 3291)
@@ -0,0 +1,128 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::Object2;
+use strict;
+
+use Data::Dumper;
+use base qw/
+               Class::Accessor::Fast
+           /; 
+
+__PACKAGE__->mk_accessors(     
+    qw/
+        accessors
+        frame_callbacks
+      /
+);
+
+
+
+
+
+
+# Set control values with accessor
+sub SetControlValues {
+    my ( $self ) = @_;
+    
+    my $accessors = $self->accessors;
+    
+    # accessor_name => [ sub {}, control_id ]
+    map {
+    	my $control_id = $_;
+        $self->SetControlValue($control_id);
+   }
+    keys %$accessors;
+}
+
+
+
+sub GetControlValue {
+    my( $self, $control_id ) = @_;
+
+    my $ctrl = $self->FindWindow($control_id) ;
+    my $accessor = $self->accessors->{$control_id};
+
+    # to execute the right method
+    my $method = {
+        'Wx::TextCtrl' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetValue()
+        	              );
+                          },	
+        'Wx::StaticText' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetLabel()
+        	              );
+                          },	
+        'Wx::StaticBitmap' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetBitmap()
+        	              );
+                          },	
+        'Wx::RadioBox' => sub { 
+        	              $accessor->(
+        	                  $ctrl->GetSelection()
+        	              );
+                          },	
+    };
+
+
+    eval {
+        $method->{ref $ctrl }->();
+    };
+}
+
+
+
+sub SetControlValue {
+    my( $self, $control_id ) = @_;
+
+    my $ctrl = $self->FindWindow($control_id) ;
+    my $accessor = $self->accessors->{$control_id};
+
+
+    # to execute the right method
+    my $method = {
+        'Wx::TextCtrl' => sub { 
+        	              $ctrl->ChangeValue(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::StaticText' => sub { 
+        	              $ctrl->SetLabel(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::StaticBitmap' => sub { 
+        	              $ctrl->SetBitmap(
+        	                  $accessor->()
+        	              );
+                          },	
+        'Wx::RadioBox' => sub { 
+        	              $ctrl->SetSelection(
+        	                  $accessor->()
+        	              );
+                          },	
+    };
+    eval {
+        $method->{ref $ctrl }->();
+    };
+}
+1;
Index: /extensions/pLoader/trunk/src/Uploader/PWG.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/PWG.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/PWG.pm	(revision 3291)
@@ -0,0 +1,67 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG;
+use strict;
+use Data::Dumper;
+use Uploader::PWG::WebServices;
+use Uploader::PWG::Categories;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           Uploader::PWG::WebServices
+           Uploader::PWG::Categories
+           /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           site_url
+           site_username
+           site_password
+           http_username
+           http_password
+           branding
+      / 
+);
+
+$|=1;
+
+
+sub Init {
+    my ( $self ) = @_;
+
+    # for web services    
+    $self->SUPER::Init();
+    
+    $self->RefreshCategories;	
+
+}
+
+sub RefreshCategories {
+    my ( $self ) = @_;
+
+    $self->categories(
+        $self->prepare_items(
+            $self->GetCategories
+        )
+    );
+}
+
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/PWG/Categories.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/PWG/Categories.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/PWG/Categories.pm	(revision 3291)
@@ -0,0 +1,123 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG::Categories;
+use strict;
+use Data::Dumper;
+use Wx::Locale qw/:default/;
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           /;
+
+# create a list of tree items
+sub prepare_items {
+    my ( $self, $categories ) = @_;
+
+
+    my $records = {};    
+
+    # lookup by id
+    # every node is a parent
+    map {
+        $records->{$_->{id}} = _record( $_ );
+    }
+    @$categories;
+
+    # find the parent
+    map {
+    	my $child = $records->{$_};
+    	my $parentid = _parentid($child);
+        if(defined $parentid){
+            _addchild( 
+                $records->{$parentid}, 
+                $child
+            );
+            delete $records->{$_};	
+        }
+    }
+    sort { $b <=> $a }
+    keys %$records;
+
+    return [
+        [
+            $self->branding->{Categories},
+            undef,
+            -1,
+            0,
+            -1,
+            
+        ],
+        sort { $a->[6] <=> $b->[6] } values %$records,
+    ];
+}
+
+sub _parentid {
+    my ( $record ) = @_;
+    
+    $record->[5];
+}
+
+
+sub _addchild {
+    my ( $record, $child ) = @_;
+    
+    $record->[1] ||= [];
+    
+    my $children = $record->[1];
+    
+    push @$children, $child;
+    
+    # sort by rank 	
+    @$children = sort { $a->[6] <=> $b->[6] } @$children;
+}
+
+sub _parent_rank {
+   my ( $category ) = @_;
+
+   my @rank = split /\./, $category->{global_rank} ;
+   my @ucats = split /,/, $category->{uppercats} ;
+
+   my $parent;
+   if( 1 < scalar @ucats ){
+   	$parent = $ucats[scalar @rank - 2 ];
+   }
+   my $rank = $rank[scalar @rank - 1 ];
+   
+   return ($parent, $rank);
+}
+
+
+
+sub _record {
+    my ( $category ) = @_;
+
+    my ( $parent, $rank ) = _parent_rank($category);
+    return [
+        $category->{name},
+        undef,
+        $category,
+        1,
+        -1,
+        $parent,
+        $rank,
+    ];   
+}
+
+1;
Index: /extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm	(revision 3291)
+++ /extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm	(revision 3291)
@@ -0,0 +1,346 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+package Uploader::PWG::WebServices;
+ 
+use strict;
+use warnings;
+use MIME::Base64 qw(encode_base64); 
+use JSON;
+use LWP::UserAgent;
+use Data::Dumper;
+use Digest::MD5::File qw/file_md5_hex md5_hex/;
+use File::Slurp;
+use Encode qw/encode decode is_utf8/;
+use POSIX qw(ceil floor);
+use base qw/
+           Uploader::Object
+           Class::Accessor::Fast
+           /;
+
+__PACKAGE__->mk_accessors( 
+    qw/
+           uagent
+           urlbase
+           username
+           password
+           qry_list_categories
+           qry_add_categories
+           items
+           tags
+           categories
+           site_high_file
+           site_resized_file
+           site_thumb_file
+           site_image_name
+           rank
+           site_author
+           site_comment
+           site_img_date_creation
+           uagent_response
+           login_result
+           action_result
+           upload_high
+           chunk_size
+      / 
+);
+
+$|=1;
+
+sub Init {
+    my ( $self ) = @_ ;
+ 
+    $self->uagent(
+        LWP::UserAgent->new
+    );
+    
+    
+    $self->uagent->cookie_jar({});	
+
+    $self->urlbase(
+        $self->{site_url}
+    );
+    
+    $self->username(
+        $self->{site_username}
+    );
+    
+    $self->password(
+        $self->{site_password}
+    );
+
+    
+    $self->uagent->default_headers->authorization_basic(
+        $self->{http_username}||$self->username, 
+        $self->{http_password}||$self->password
+    );
+    
+    $self->chunk_size(
+        $self->{chunk_size}||500_000
+    );
+    
+    $self->qry_list_categories( sprintf
+        "%s/ws.php?format=json&method=%s&recursive=%s",
+        $self->urlbase,
+#        'pwg.categories.getAdminList',
+        'pwg.categories.getList',
+        'true',
+    );
+
+    my $form = {
+        method => 'pwg.session.login',
+        username => $self->username,
+        password => $self->password,
+    };
+ 
+    $self->uagent_response(
+        $self->uagent->post(
+            $self->urlbase.'/ws.php?format=json',
+            $form
+        )
+    );
+    
+    my $hresult = {} ;
+
+    if($self->uagent_response->is_success){
+        eval {
+            $hresult = from_json(
+                $self->uagent_response->content
+            );
+        };
+    }
+    else{
+        $hresult = {
+            'message' => $self->uagent_response->message,
+            'stat'    => 'fail',
+        };
+    }
+
+    $self->login_result(
+        $hresult
+    );
+
+}
+
+sub GetCategories {
+    my ( $self ) = @_;
+
+    my $result;
+    eval {
+        $result = $self->uagent->get(
+            $self->qry_list_categories
+        );
+    };
+
+    if($@){
+        printf("An error occured in query execution %s\n%s",
+            $self->qry_list_categories,
+            $@,
+        );	
+    }
+    my $hresult;
+    
+    eval {
+    	$hresult = from_json(
+            $result->content
+        );
+    };
+    
+    $hresult ||= {};
+    my $categories = $hresult->{result}{categories};
+
+
+    $categories;	
+}
+
+sub UploadImage {
+    my ( $self ) = @_;
+
+    my $file_sum;
+
+    eval {
+        $file_sum = file_md5_hex(
+            encode('iso-8859-1', $self->site_resized_file)
+        );
+    };
+ 
+
+    my $thumbnail_sum = file_md5_hex(
+        encode('iso-8859-1', $self->site_thumb_file),
+    );
+
+    my $original_sum = file_md5_hex(
+        encode('iso-8859-1', $self->site_high_file)
+    );
+
+    my $form = {
+        method            => 'pwg.images.exist',
+        md5sum_list       => $original_sum,
+    };
+
+    my $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    my $hresult = {};
+        eval {
+            $hresult = from_json(
+                $result->{_content}
+            );
+        };
+
+    my $image_id = $hresult->{result}{$original_sum};
+    if(!defined($image_id)){
+    	$self->send_chunks(
+    	    {
+                filepath => encode('iso-8859-1', $self->site_resized_file),
+                type => 'file',
+                original_sum => $original_sum,
+    	    }
+    	);
+
+    	$self->send_chunks(
+    	    {
+                filepath => encode('iso-8859-1', $self->site_thumb_file),
+                type => 'thumb',
+                original_sum => $original_sum,
+    	    }
+    	);
+    	
+    	
+        $form = {
+            method            => 'pwg.images.add',
+            original_sum      => $original_sum,
+            file_sum          => $file_sum,
+            thumbnail_sum     => $thumbnail_sum,
+            categories        => $self->categories,
+            name              => $self->site_image_name,
+            rank              => $self->rank,
+            author            => $self->site_author,
+            comment           => $self->site_comment,
+            date_creation     => $self->site_img_date_creation,
+            
+        };
+    
+        if($self->upload_high){
+            $self->send_chunks(
+    	        {
+                    filepath => encode('iso-8859-1', $self->site_high_file),
+                    type => 'high',
+                    original_sum => $original_sum,
+    	        }
+    	    );
+
+            $form->{high_sum}     = $original_sum;
+        }
+    }
+    else {
+        $form = {
+            method            => 'pwg.images.setInfo',
+            image_id          => $image_id,
+            categories        => $self->categories,
+            name              => $self->site_image_name,
+            rank              => $self->rank,
+            author            => $self->site_author,
+            comment           => $self->site_comment,
+            date_creation     => $self->site_img_date_creation,
+        };
+    }
+
+    $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    return ( $result->is_success, $result->status_line );
+}
+ 
+
+sub AddCategories{
+    my ( $self, $name, $parentid ) = @_;
+
+    my $form = {
+        method            => 'pwg.categories.add',
+        name              => $name,
+        parent            => $parentid,
+        
+    };
+
+    my $result = $self->uagent->post(
+        $self->urlbase.'/ws.php?format=json',
+        $form
+    );
+
+    return ( $result->is_success, $result->status_line );
+	
+}
+
+
+sub send_chunks {
+    my ( $self, $params ) = @_;
+
+    my $content = read_file(
+        $params->{filepath},
+        binmode => ':raw',
+    );
+
+    my $content_length = length($content);
+    my $nb_chunks = ceil($content_length / $self->chunk_size);
+
+    my $chunk_pos = 0;
+    my $chunk_id = 1;
+    while ($chunk_pos < $content_length) {
+        my $chunk = substr(
+            $content,
+            $chunk_pos,
+            $self->chunk_size
+        );
+        $chunk_pos += $self->chunk_size;
+
+        my $response = $self->uagent->post(
+            $self->urlbase.'/ws.php?format=json',
+            {
+                method       => 'pwg.images.addChunk',
+                data         => encode_base64($chunk),
+                original_sum => $params->{original_sum},
+                position     => $chunk_id,
+                type         => $params->{type},
+            }
+        );
+
+        #printf(
+        #    'chunk %05u of %05u for %s "%s"'."\n",
+        #    $chunk_id,
+        #    $nb_chunks,
+        #    $params->{type},
+        #    $params->{filepath}
+        #);
+        if ($response->code != 200) {
+            printf("response code    : %u\n", $response->code);
+            printf("response message : %s\n", $response->message);
+        }
+
+        $chunk_id++;
+    }
+}
+
+ 
+1;
+    
Index: /extensions/pLoader/trunk/src/pLoader.exe.manifest
===================================================================
--- /extensions/pLoader/trunk/src/pLoader.exe.manifest	(revision 3291)
+++ /extensions/pLoader/trunk/src/pLoader.exe.manifest	(revision 3291)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+     <assemblyIdentity
+         processorArchitecture="x86"
+         version="5.1.0.0"
+         type="win32"
+         name="Controls"
+     />
+     <description>pLoader</description>
+     <dependency>
+         <dependentAssembly>
+             <assemblyIdentity
+                 type="win32"
+                 name="Microsoft.Windows.Common-Controls"        
+                 version="6.0.0.0"
+                 publicKeyToken="6595b64144ccf1df"
+                 language="*"
+                 processorArchitecture="x86"
+         />
+     </dependentAssembly>
+     </dependency>
+ </assembly>
Index: /extensions/pLoader/trunk/src/pLoader.ini
===================================================================
--- /extensions/pLoader/trunk/src/pLoader.ini	(revision 3291)
+++ /extensions/pLoader/trunk/src/pLoader.ini	(revision 3291)
@@ -0,0 +1,7 @@
+[
+    {
+        site_url      => 'http://localhost',
+        site_username => 'username',
+        site_password => 'password',
+    }
+]
Index: /extensions/pLoader/trunk/src/ploader.pl
===================================================================
--- /extensions/pLoader/trunk/src/ploader.pl	(revision 3291)
+++ /extensions/pLoader/trunk/src/ploader.pl	(revision 3291)
@@ -0,0 +1,38 @@
+# +-----------------------------------------------------------------------+
+# | pLoader - a Perl photo uploader for Piwigo                            |
+# +-----------------------------------------------------------------------+
+# | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+# +-----------------------------------------------------------------------+
+# | This program is free software; you can redistribute it and/or modify  |
+# | it under the terms of the GNU General Public License as published by  |
+# | the Free Software Foundation                                          |
+# |                                                                       |
+# | This program is distributed in the hope that it will be useful, but   |
+# | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+# | General Public License for more details.                              |
+# |                                                                       |
+# | You should have received a copy of the GNU General Public License     |
+# | along with this program; if not, write to the Free Software           |
+# | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+# | USA.                                                                  |
+# +-----------------------------------------------------------------------+
+
+use strict;
+use Wx;
+use Class::Accessor::Fast;
+use Uploader::GUI::wxApp;
+use JSON;
+use Wx::Locale qw/:default/;
+
+
+
+require '../res/progress_wdr.pl'; 
+require '../res/login_wdr.pl'; 
+
+my $app = Uploader::GUI::wxApp->new(@_);
+$app->MainLoop();
+
+1;
+
+
