Changeset 6087


Ignore:
Timestamp:
May 6, 2010, 7:42:14 AM (10 years ago)
Author:
ronosman
Message:

Bug 1646 fixed : use previously chosen image directory when opening file dialog.

Location:
extensions/pLoader/trunk/src/Uploader/GUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/Frame.pm

    r5977 r6087  
    11151115
    11161116{
     1117  my $prevfile;
    11171118  my $prevdir;
    1118   my $prevfile;
    11191119
    11201120  sub OnAddImages {
    11211121    my( $self, $event ) = @_;
     1122
     1123    $prevdir = wxTheApp->default_openfile_dir if ( -d wxTheApp->default_openfile_dir);
    11221124    my $dialog = Wx::FileDialog->new
    1123       ( $self, gettext("Select photos for upload"), $prevfile, $prevdir,
     1125      ( $self, gettext("Select photos for upload"), $prevdir, $prevfile,
    11241126        sprintf("%s (*.JPG;*.jpg)|*.JPG;*.jpg|%s (*.*)|*.*", gettext("JPEG files"), gettext("All")),
    11251127        wxFD_OPEN|wxFD_MULTIPLE );
     
    11301132        $self->SetNewFiles($file_paths) ;
    11311133    }
     1134    wxTheApp->default_openfile_dir(
     1135        $dialog->GetDirectory
     1136    );
    11321137    $dialog->Destroy;
    11331138  }
  • extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm

    r5977 r6087  
    116116          locale_dir
    117117          argv
     118          default_openfile_dir
    118119      /
    119120);
     
    506507                    chunk_size
    507508                    layout_clean
     509                    default_openfile_dir
    508510                /
    509511            },
     
    909911}
    910912
    911 sub SaveConfig {
    912     my ( $self, $params ) = @_;
    913 
    914    my $config = Wx::ConfigBase::Get;
    915 
    916    map {
    917        $config->WriteInt( $_, $params->{$_} )
    918    } keys %$params;
    919 
    920        
    921 }
    922 
    923913
    924914sub SetFrame {
Note: See TracChangeset for help on using the changeset viewer.