Index: /extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm	(revision 4567)
+++ /extensions/pLoader/trunk/src/Uploader/GUI/wxImageListCtrl.pm	(revision 4568)
@@ -30,5 +30,5 @@
              wxLC_EDIT_LABELS
              wxLC_ICON
-			 wxLC_REPORT
+             wxLC_REPORT
              wxLC_SMALL_ICON
              wxIMAGE_LIST_NORMAL
@@ -38,5 +38,5 @@
              wxLC_VIRTUAL
              wxLC_REPORT
-			 wxLC_AUTOARRANGE
+             wxLC_AUTOARRANGE
              wxBORDER_THEME
              wxLIST_HITTEST_ONITEM
@@ -45,10 +45,10 @@
              wxLIST_STATE_DONTCARE
              wxLIST_STATE_FOCUSED 
-			 wxIMAGE_LIST_SMALL
+             wxIMAGE_LIST_SMALL
          /;
 use Wx::Event qw/
                     EVT_LIST_BEGIN_DRAG
                     EVT_LIST_ITEM_SELECTED
-					EVT_SIZE
+                    EVT_SIZE
                 /;
          
@@ -60,13 +60,13 @@
           imagelist
           wx_imagelist
-		  image_size
-		  arrange_items
-		  styles
-		  insert_items
-		  initialize
-		  columns
-		  change_display_mode
-		  wx_img
-		  item_refresh
+          image_size
+          arrange_items
+          styles
+          insert_items
+          initialize
+          columns
+          change_display_mode
+          wx_img
+          item_refresh
       / 
 );
@@ -83,13 +83,13 @@
         wxDefaultPosition,
         wxDefaultSize,
-		wxNO_BORDER
-    );
-	
-	$self->wx_img(
+        wxNO_BORDER
+    );
+    
+    $self->wx_img(
         Wx::ImageList->new( 16, 16, 1 )
-	);
-	$self->wx_img->Add(
-        Wx::Bitmap->new( '../res/image.png', wxBITMAP_TYPE_PNG )	
-	);
+    );
+    $self->wx_img->Add(
+        Wx::Bitmap->new( '../res/image.png', wxBITMAP_TYPE_PNG )    
+    );
 
     $self->imagelist(
@@ -105,8 +105,8 @@
     );
 
-	$self->columns(
-	    $params->{columns}
-	);
-	print Dumper $self->columns;
+    $self->columns(
+        $params->{columns}
+    );
+    print Dumper $self->columns;
     $self->prevItemCount(-1);
 
@@ -116,74 +116,75 @@
             my ( $this, $event ) = @_;
     
-			$this->arrange_items(1);
+            $this->arrange_items(1);
             $event->Skip();
         }
     );
-	
-	Wx::Event::EVT_IDLE(
-	    $self,
-		sub {
-		    my ($self, $event)=@_;
-
-			if($self->arrange_items){
-			    $self->Refresh; 
-			    $self->arrange_items(0);
-			}
-			if($self->change_display_mode){
-			    my $dm = $self->imagelist->display_mode;
-           	    $self->initialize->{$dm}->($self) if exists $self->initialize->{$dm};
-			    $self->Refresh; 
+    
+    Wx::Event::EVT_IDLE(
+        $self,
+        sub {
+            my ($self, $event)=@_;
+
+            if($self->arrange_items){
+                $self->Refresh; 
+                $self->arrange_items(0);
+            }
+            if($self->change_display_mode){
+                my $dm = $self->imagelist->display_mode;
+                   $self->initialize->{$dm}->($self) if exists $self->initialize->{$dm};
+                $self->Refresh; 
                 $self->change_display_mode(0);
-			}
-		}
-	);
-	
-	$self->initialize(
-	    {
+        }
+        $event->Skip;
+        }
+    );
+    
+    $self->initialize(
+        {
 
             'Thumbnail' => sub {  my ( $self ) = @_;
-								$self->Freeze;
-								$self->ClearAll;
-								$self->SetSingleStyle(wxLC_ICON);
-								$self->SetSingleStyle(wxLC_EDIT_LABELS, 0);
+                                $self->Freeze;
+                                $self->ClearAll;
+                                $self->SetSingleStyle(wxLC_ICON);
+                                $self->SetSingleStyle(wxLC_EDIT_LABELS, 0);
                                 $self->SetImageList( $self->wx_imagelist, wxIMAGE_LIST_NORMAL ) ;
-								$self->Thaw;
-                     },			
+                                $self->Thaw;
+                     },            
             'Thumbnail and caption' => sub {  my ( $self ) = @_;
-								$self->Freeze;
-								$self->ClearAll;
-								$self->SetSingleStyle(wxLC_ICON);
-								$self->SetSingleStyle(wxLC_EDIT_LABELS);
+                                $self->Freeze;
+                                $self->ClearAll;
+                                $self->SetSingleStyle(wxLC_ICON);
+                                $self->SetSingleStyle(wxLC_EDIT_LABELS);
                                 $self->SetImageList( $self->wx_imagelist, wxIMAGE_LIST_NORMAL ) ;
-								$self->Thaw;
-                     },			
- 	        'Property list' => sub { my ( $self ) = @_;
-			                    my $i=0;
-								
-								$self->Freeze;
-								$self->ClearAll;
-								$self->SetSingleStyle(wxLC_REPORT);
-								$self->SetSingleStyle(wxLC_EDIT_LABELS);
+                                $self->Thaw;
+                     },            
+             'Property list' => sub { my ( $self ) = @_;
+                                my $i=0;
+                                
+                                $self->Freeze;
+                                $self->ClearAll;
+                                $self->SetSingleStyle(wxLC_REPORT);
+                                $self->SetSingleStyle(wxLC_EDIT_LABELS);
                                 $self->SetImageList( $self->wx_img, wxIMAGE_LIST_SMALL ) ;
-                                map	{
-								    $self->InsertColumn($i, $_->{label});
-									$i++;
-                                }@{$self->columns};								
-								$self->Thaw;
-			                },
-		}
-	);
-
-	$self->item_refresh(
-	    {
-		    'Thumbnail' => sub {},
-		    'Thumbnail and caption' => sub { my ( $self, $index ) = @_;
+                                map    {
+                                    $self->InsertColumn($i, $_->{label});
+                                    $i++;
+                                }@{$self->columns};                                
+                                $self->Thaw;
+                            },
+        }
+    );
+
+    $self->item_refresh(
+        {
+            'Thumbnail' => sub {},
+            'Thumbnail and caption' => sub { my ( $self, $index ) = @_;
                                         my $image = $self->imagelist->GetImage($index);
-                            	        $self->SetItem(
-		                                    $index,
-			                                0,
-			                                $image->site_name,
+                                        $self->SetItem(
+                                            $index,
+                                            0,
+                                            $image->site_name,
                                         ) if defined $image;
-			                        },
+                                    },
             'Property list' => sub { my ( $self, $index ) = @_;
                                 my $col = 0;
@@ -199,12 +200,12 @@
                                 qw/site_name site_comment site_author file create_date/;
                             },
-		}
-	);
-	
-	$self->insert_items(
-	    {
-		    'Thumbnail' => sub { my ( $self, $index ) = @_; $self->InsertImageItem($index, $index);},
-		    'Thumbnail and caption' => sub { my ( $self, $index ) = @_;
-			                               $self->InsertImageStringItem(
+        }
+    );
+    
+    $self->insert_items(
+        {
+            'Thumbnail' => sub { my ( $self, $index ) = @_; $self->InsertImageItem($index, $index);},
+            'Thumbnail and caption' => sub { my ( $self, $index ) = @_;
+                                           $self->InsertImageStringItem(
                                                $index,
                                                $self->imagelist->GetImage($index)->site_name,
@@ -213,18 +214,18 @@
                                      },
             'Property list' => sub { my ( $self, $index ) = @_;
-			                           
-							    $self->InsertImageStringItem(
+                                       
+                                $self->InsertImageStringItem(
                                     $index,
                                     "",
-									0
-								);
-								$self->ItemRefresh($index);
-
-			                },
-		}
-	);
-
-	
-	$self->initialize->{$self->imagelist->display_mode}->($self) if exists $self->initialize->{$self->imagelist->display_mode};
+                                    0
+                                );
+                                $self->ItemRefresh($index);
+
+                            },
+        }
+    );
+
+    
+    $self->initialize->{$self->imagelist->display_mode}->($self) if exists $self->initialize->{$self->imagelist->display_mode};
 
     $self;
@@ -233,6 +234,6 @@
 sub ItemRefresh {
     my ( $self, $index ) = @_;
-	
-	$self->item_refresh->{$self->imagelist->display_mode}->($self, $index) if exists $self->item_refresh->{$self->imagelist->display_mode};
+    
+    $self->item_refresh->{$self->imagelist->display_mode}->($self, $index) if exists $self->item_refresh->{$self->imagelist->display_mode};
 }
 
@@ -252,5 +253,5 @@
 
 sub GetSelectedItems {
-    my ( $self ) = @_;	
+    my ( $self ) = @_;    
 
   # find selected items
@@ -265,5 +266,5 @@
       last if(-1 == $item);
       
-      # item is selected	
+      # item is selected    
       push @$items, $item
   }
@@ -273,5 +274,5 @@
 
 sub GetAllItems {
-    my ( $self ) = @_;	
+    my ( $self ) = @_;    
 
   # find selected items
@@ -286,15 +287,15 @@
       last if(-1 == $item);
       
-      # item is selected	
+      # item is selected    
       push @$items, $item
   }
   
   $items;
-	
+    
 }
 
 
 sub Refresh {
-    my ( $self ) = @_;	
+    my ( $self ) = @_;    
 
    $self->Freeze();
@@ -308,7 +309,7 @@
        my $ipr = floor(($self->GetClientSize->GetWidth - 0.20*$x_spacing)/$x_spacing)||1;
        for( my $i = 0 ; $i < $self->wx_imagelist->GetImageCount ; $i++){
-	        # call the method corresponding to the display mode
+            # call the method corresponding to the display mode
             my $indx = $self->insert_items->{$self->imagelist->display_mode}->($self, $i);
-			if( 'Thumbnail' eq $self->imagelist->display_mode){
+            if( 'Thumbnail' eq $self->imagelist->display_mode){
                 my $row = floor($i/$ipr);
                 my $col = $i%$ipr;
@@ -320,5 +321,5 @@
                     ),
                 );
-			}
+            }
        }   
    };
@@ -328,6 +329,6 @@
            $_
        );
-	   
-	   $self->EnsureVisible($_);
+       
+       $self->EnsureVisible($_);
    } @{$self->imagelist->image_selection||[]};
 
@@ -343,5 +344,5 @@
         wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED,
         wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED
-    );	
+    );    
 }
 
Index: /extensions/pLoader/trunk/src/Uploader/ImageList.pm
===================================================================
--- /extensions/pLoader/trunk/src/Uploader/ImageList.pm	(revision 4567)
+++ /extensions/pLoader/trunk/src/Uploader/ImageList.pm	(revision 4568)
@@ -36,25 +36,25 @@
 __PACKAGE__->mk_accessors( 
     qw/
-       	        thumb_size
+                thumb_size
                 preview_ratio
                 categories
-      	        type
-      	        filter
-      	        blur
-      	        quality
+                type
+                filter
+                blur
+                quality
                 resize_w
                 resize_h
-      	        hd_filter
-      	        hd_blur
-      	        hd_quality
+                hd_filter
+                hd_blur
+                hd_quality
                 hd_w
                 hd_h
-				hd_interlace
-      	        prefix
-      	        author
-      	        count
+                hd_interlace
+                prefix
+                author
+                count
                 new_files
                 storable_file
-       	        wx_thumb_size
+                wx_thumb_size
                 current_image
                 images
@@ -70,5 +70,5 @@
                 default_photo_name
                 default_photo_name_method
-            	default_name_prefix
+                default_name_prefix
                 SetNewFilesViewerRefreshCallback
                 SetNewFilesProgressCallback
@@ -86,5 +86,5 @@
                 pwg
                 upload_high
-				upload_hd
+                upload_hd
                 remove_uploaded_from_selection
                 wx_quality
@@ -95,5 +95,5 @@
                 use_exif_preview
                 image_sums
-				upload_image_sums
+                upload_image_sums
                 sums
                 version
@@ -121,10 +121,10 @@
                 upload_file
                 upload_name
-				ReuploadCallback
-				reupload_action_files
-				reupload_action_properties
-				reupload_action_properties_m
-				reupload_not_ask
-				display_mode
+                ReuploadCallback
+                reupload_action_files
+                reupload_action_properties
+                reupload_action_properties_m
+                reupload_not_ask
+                display_mode
      /
 );
@@ -329,4 +329,5 @@
     my ( $self, $file, $info, $i ) = @_;
     
+printf("_default_photo_name %s\n", $self->default_photo_name);
     
     my $name;
@@ -378,7 +379,8 @@
             $self->default_name_prefix, 
         )    	
-    }	
-
-    $name;	
+    }
+
+printf("_default_photo_name %s\n", $name);
+    $name;
 }
 
