- buttonsizer->Add( new wxButton( this, ID_UP_DIR, "Up" ), 0, wxALL, 5 );
- buttonsizer->Add( new wxBitmapButton( this, ID_PARENT_DIR, wxBitmap(home_xpm) ), 0, wxALL, 5 );
- buttonsizer->Add( new wxButton( this, ID_NEW_DIR, "New..." ), 0, wxALL, 5 );
- mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
-
- m_list = new wxFileCtrl( this, ID_LIST_CTRL, m_dir, "*", wxDefaultPosition, wxSize(450,180),
- wxLC_LIST | wxSUNKEN_BORDER | wxLC_SINGLE_SEL );
- mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
-
- wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
- m_text = new wxTextCtrl( this, -1, m_fileName );
- textsizer->Add( m_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
- textsizer->Add( new wxButton( this, wxID_OK, _("OK") ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
- mainsizer->Add( textsizer, 0, wxEXPAND );
-
- wxBoxSizer *choicesizer = new wxBoxSizer( wxHORIZONTAL );
- m_choice = new wxChoice( this, -1 );
- m_choice->Append( "*.txt" );
- choicesizer->Add( m_choice, 1, wxCENTER|wxALL, 10 );
- choicesizer->Add( new wxButton( this, wxID_CANCEL, _("Cancel") ), 0, wxCENTER | wxALL, 10 );
- mainsizer->Add( choicesizer, 0, wxEXPAND );
+
+ m_upDirButton = new wxBitmapButton(this, ID_UP_DIR,
+ wxArtProvider::GetBitmap(wxART_GO_DIR_UP, wxART_CMN_DIALOG));
+#if wxUSE_TOOLTIPS
+ m_upDirButton->SetToolTip( _("Go to parent directory") );
+#endif
+ buttonsizer->Add( m_upDirButton, 0, wxALL, 5 );
+
+#ifndef __DOS__ // VS: Home directory is meaningless in MS-DOS...
+ but = new wxBitmapButton(this, ID_PARENT_DIR,
+ wxArtProvider::GetBitmap(wxART_GO_HOME, wxART_CMN_DIALOG));
+#if wxUSE_TOOLTIPS
+ but->SetToolTip( _("Go to home directory") );
+#endif
+ buttonsizer->Add( but, 0, wxALL, 5);
+
+ buttonsizer->Add( 20, 20 );
+#endif //!__DOS__
+
+ m_newDirButton = new wxBitmapButton(this, ID_NEW_DIR,
+ wxArtProvider::GetBitmap(wxART_NEW_DIR, wxART_CMN_DIALOG));
+#if wxUSE_TOOLTIPS
+ m_newDirButton->SetToolTip( _("Create new directory") );
+#endif
+ buttonsizer->Add( m_newDirButton, 0, wxALL, 5 );
+
+ if (is_pda)
+ mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 0 );
+ else
+ mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
+
+ wxBoxSizer *staticsizer = new wxBoxSizer( wxHORIZONTAL );
+ if (is_pda)
+ staticsizer->Add( new wxStaticText( this, -1, _("Current directory:") ), 0, wxRIGHT, 10 );
+ m_static = new wxStaticText( this, -1, m_dir );
+ staticsizer->Add( m_static, 1 );
+ mainsizer->Add( staticsizer, 0, wxEXPAND | wxLEFT|wxRIGHT|wxBOTTOM, 10 );
+
+ long style2 = ms_lastViewStyle | wxSUNKEN_BORDER;
+ if ( !(m_dialogStyle & wxMULTIPLE) )
+ style2 |= wxLC_SINGLE_SEL;
+
+ m_list = new wxFileCtrl( this, ID_LIST_CTRL,
+ wildFilters[0], ms_lastShowHidden,
+ wxDefaultPosition, wxSize(540,200),
+ style2);
+
+ if (is_pda)
+ {
+ // PDAs have a different screen layout
+ mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
+
+ wxBoxSizer *choicesizer = new wxBoxSizer( wxHORIZONTAL );
+ m_choice = new wxChoice( this, ID_CHOICE );
+ choicesizer->Add( m_choice, 1, wxCENTER|wxALL, 5 );
+ mainsizer->Add( choicesizer, 0, wxEXPAND );
+
+ wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
+ m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER );
+ textsizer->Add( m_text, 1, wxCENTER | wxALL, 5 );
+ mainsizer->Add( textsizer, 0, wxEXPAND );
+
+ m_check = new wxCheckBox( this, ID_CHECK, _("Show hidden files") );
+ m_check->SetValue( ms_lastShowHidden );
+ textsizer->Add( m_check, 0, wxCENTER|wxALL, 5 );
+
+ buttonsizer = new wxBoxSizer( wxHORIZONTAL );
+ buttonsizer->Add( new wxButton( this, wxID_OK, _("OK") ), 0, wxCENTER | wxALL, 5 );
+ buttonsizer->Add( new wxButton( this, wxID_CANCEL, _("Cancel") ), 0, wxCENTER | wxALL, 5 );
+ mainsizer->Add( buttonsizer, 0, wxALIGN_RIGHT );
+ }
+ else
+ {
+ mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
+
+ wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL );
+ m_text = new wxTextCtrl( this, ID_TEXT, m_fileName, wxDefaultPosition, wxDefaultSize, wxPROCESS_ENTER );
+ textsizer->Add( m_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
+ textsizer->Add( new wxButton( this, wxID_OK, _("OK") ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
+ mainsizer->Add( textsizer, 0, wxEXPAND );
+
+ wxBoxSizer *choicesizer = new wxBoxSizer( wxHORIZONTAL );
+ m_choice = new wxChoice( this, ID_CHOICE );
+ choicesizer->Add( m_choice, 1, wxCENTER|wxALL, 10 );
+ m_check = new wxCheckBox( this, ID_CHECK, _("Show hidden files") );
+ m_check->SetValue( ms_lastShowHidden );
+ choicesizer->Add( m_check, 0, wxCENTER|wxALL, 10 );
+ choicesizer->Add( new wxButton( this, wxID_CANCEL, _("Cancel") ), 0, wxCENTER | wxALL, 10 );
+ mainsizer->Add( choicesizer, 0, wxEXPAND );
+ }
+
+ for (size_t n=0; n<wildFilters.GetCount(); n++)
+ {
+ m_choice->Append( wildDescriptions[n], (void*) new wxString( wildFilters[n] ) );
+ }
+ SetFilterIndex( 0 );