X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a305cfbc85bedfc59ccb1b6b9619f4aeb790b31..a2db25a1436b8363e4ccf98e3d43eee3a01b9cd7:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 2f493b2e32..6dcbdfacc4 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -996,6 +996,8 @@ bool wxGenericFileDialog::Create( wxWindow *parent, { m_bypassGenericImpl = bypassGenericImpl; + parent = GetParentForModalDialog(parent); + if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile, wildCard, style, pos, sz, name)) { @@ -1014,6 +1016,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent, ignoreChanges = true; +#if wxUSE_CONFIG if (wxConfig::Get(false)) { wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ViewStyle"), @@ -1021,6 +1024,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent, wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ShowHidden"), &ms_lastShowHidden); } +#endif if ((m_dir.empty()) || (m_dir == wxT("."))) { @@ -1188,6 +1192,7 @@ wxGenericFileDialog::~wxGenericFileDialog() if (!m_bypassGenericImpl) { +#if wxUSE_CONFIG if (wxConfig::Get(false)) { wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"), @@ -1195,6 +1200,7 @@ wxGenericFileDialog::~wxGenericFileDialog() wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"), ms_lastShowHidden); } +#endif const int count = m_choice->GetCount(); for ( int i = 0; i < count; i++ ) @@ -1471,6 +1477,8 @@ void wxGenericFileDialog::HandleAction( const wxString &fn ) { wxMessageBox(_("Please choose an existing file."), _("Error"), wxOK | wxICON_ERROR ); + + return; } SetPath( filename );