wxFileCtrl::~wxFileCtrl()
{
+ // Normally the data are freed via an EVT_LIST_DELETE_ALL_ITEMS event and
+ // wxFileCtrl::OnListDeleteAllItems. But if the event is generated after
+ // the destruction of the wxFileCtrl we need to free any data here:
+ FreeAllItemsData();
}
//-----------------------------------------------------------------------------
wxBitmapButton *but;
but = new wxBitmapButton(this, ID_LIST_MODE,
- wxArtProvider::GetBitmap(wxART_LIST_VIEW, wxART_CMN_DIALOG));
+ wxArtProvider::GetBitmap(wxART_LIST_VIEW, wxART_BUTTON));
#if wxUSE_TOOLTIPS
but->SetToolTip( _("View files as a list view") );
#endif
buttonsizer->Add( but, 0, wxALL, 5 );
but = new wxBitmapButton(this, ID_REPORT_MODE,
- wxArtProvider::GetBitmap(wxART_REPORT_VIEW, wxART_CMN_DIALOG));
+ wxArtProvider::GetBitmap(wxART_REPORT_VIEW, wxART_BUTTON));
#if wxUSE_TOOLTIPS
but->SetToolTip( _("View files as a detailed view") );
#endif
buttonsizer->Add( 30, 5, 1 );
m_upDirButton = new wxBitmapButton(this, ID_UP_DIR,
- wxArtProvider::GetBitmap(wxART_GO_DIR_UP, wxART_CMN_DIALOG));
+ wxArtProvider::GetBitmap(wxART_GO_DIR_UP, wxART_BUTTON));
#if wxUSE_TOOLTIPS
m_upDirButton->SetToolTip( _("Go to parent directory") );
#endif
#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));
+ wxArtProvider::GetBitmap(wxART_GO_HOME, wxART_BUTTON));
#if wxUSE_TOOLTIPS
but->SetToolTip( _("Go to home directory") );
#endif
#endif //!__DOS__
m_newDirButton = new wxBitmapButton(this, ID_NEW_DIR,
- wxArtProvider::GetBitmap(wxART_NEW_DIR, wxART_CMN_DIALOG));
+ wxArtProvider::GetBitmap(wxART_NEW_DIR, wxART_BUTTON));
#if wxUSE_TOOLTIPS
m_newDirButton->SetToolTip( _("Create new directory") );
#endif
textsizer->Add( m_choice, 1, wxCENTER|wxALL, 5 );
buttonsizer = new wxBoxSizer( wxHORIZONTAL );
- buttonsizer->Add( new wxButton( this, wxID_OK, wxSTOCK_OK ), 0, wxCENTER | wxALL, 5 );
- buttonsizer->Add( new wxButton( this, wxID_CANCEL, wxSTOCK_CANCEL ), 0, wxCENTER | wxALL, 5 );
+ buttonsizer->Add( new wxButton( this, wxID_OK ), 0, wxCENTER | wxALL, 5 );
+ buttonsizer->Add( new wxButton( this, wxID_CANCEL ), 0, wxCENTER | wxALL, 5 );
mainsizer->Add( buttonsizer, 0, wxALIGN_RIGHT );
}
else
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, wxSTOCK_OK ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
+ textsizer->Add( new wxButton( this, wxID_OK ), 0, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
mainsizer->Add( textsizer, 0, wxEXPAND );
wxBoxSizer *choicesizer = new wxBoxSizer( wxHORIZONTAL );
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, wxSTOCK_CANCEL ), 0, wxCENTER | wxALL, 10 );
+ choicesizer->Add( new wxButton( this, wxID_CANCEL ), 0, wxCENTER | wxALL, 10 );
mainsizer->Add( choicesizer, 0, wxEXPAND );
}