X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5dd66e9d26b7b5a0183a20b78a703ece2e57540..883ea3bf80503de1f2aa797ce91acda654d88d74:/src/generic/filedlgg.cpp?ds=inline diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index e0525766a1..066131180f 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -198,9 +198,6 @@ bool wxGenericFileDialog::Create( wxWindow *parent, if ((len > 1) && (wxEndsWithPathSeparator(m_dir))) m_dir.Remove( len-1, 1 ); - m_path = m_dir; - m_path += wxFILE_SEP_PATH; - m_path += defaultFile; m_filterExtension = wxEmptyString; // layout @@ -350,16 +347,6 @@ bool wxGenericFileDialog::Show( bool show ) return wxDialog::Show( show ); } -void wxGenericFileDialog::SetWildcard(const wxString& wildCard) -{ - m_filectrl->SetWildcard(wildCard); -} - -void wxGenericFileDialog::SetFilterIndex( int filterindex ) -{ - m_filectrl->SetFilterIndex(filterindex); -} - void wxGenericFileDialog::OnOk( wxCommandEvent &WXUNUSED(event) ) { wxArrayString selectedFiles; @@ -413,27 +400,12 @@ void wxGenericFileDialog::OnFileActivated( wxFileCtrlEvent &WXUNUSED(event) ) OnOk( dummy ); } -void wxGenericFileDialog::SetPath( const wxString& path ) -{ - // not only set the full path but also update filename and dir - m_path = path; - - m_filectrl->SetPath(path); -} - -void wxGenericFileDialog::GetPaths( wxArrayString& paths ) const -{ - m_filectrl->GetPaths(paths); -} - -void wxGenericFileDialog::GetFilenames(wxArrayString& files) const -{ - m_filectrl->GetFilenames(files); -} - void wxGenericFileDialog::OnUpdateButtonsUI(wxUpdateUIEvent& event) { - event.Enable( !IsTopMostDir(m_filectrl->GetDirectory()) ); + // surprisingly, we can be called before m_filectrl is set in Create() as + // wxFileCtrl ctor itself can generate idle events, so we need this test + if ( m_filectrl ) + event.Enable( !IsTopMostDir(m_filectrl->GetShownDirectory()) ); } #ifdef wxHAS_GENERIC_FILEDIALOG