1 --- a/audacity-2.0.5/lib-src/FileDialog/generic/FileDialogPrivate.cpp 2013-10-19 20:31:33.000000000 +1300
2 +++ b/audacity-2.0.5/lib-src/FileDialog/generic/FileDialogPrivate.cpp 2014-06-01 20:38:47.890251794 +1200
4 #include "wx/settings.h"
6 #include "wx/file.h" // for wxS_IXXX constants only
7 -#include "wx/filedlg.h" // wxOPEN, wxSAVE...
8 +#include "wx/filedlg.h" // wxFD_OPEN, wxFD_SAVE...
9 #include "wx/generic/filedlgg.h"
10 #include "wx/generic/dirctrlg.h" // for wxFileIconsTable
15 if (m_dialogStyle == 0)
16 - m_dialogStyle = wxOPEN;
17 - if ((m_dialogStyle & wxMULTIPLE ) && !(m_dialogStyle & wxOPEN))
18 - m_dialogStyle |= wxOPEN;
19 + m_dialogStyle = wxFD_OPEN;
20 + if ((m_dialogStyle & wxMULTIPLE ) && !(m_dialogStyle & wxFD_OPEN))
21 + m_dialogStyle |= wxFD_OPEN;
23 if ((m_dir.empty()) || (m_dir == wxT(".")))
29 - if (!(m_dialogStyle & wxSAVE))
30 + if (!(m_dialogStyle & wxFD_SAVE))
32 if ((filename.Find(wxT('*')) != wxNOT_FOUND) ||
33 (filename.Find(wxT('?')) != wxNOT_FOUND))
34 @@ -1413,14 +1413,14 @@
35 // VZ: the logic of testing for !wxFileExists() only for the open file
36 // dialog is not entirely clear to me, why don't we allow saving to a
37 // file without extension as well?
38 - if ( !(m_dialogStyle & wxOPEN) || !wxFileExists(filename) )
39 + if ( !(m_dialogStyle & wxFD_OPEN) || !wxFileExists(filename) )
41 filename = AppendExtension(filename, m_filterExtension);
44 // check that the file [doesn't] exist if necessary
45 - if ( (m_dialogStyle & wxSAVE) &&
46 - (m_dialogStyle & wxOVERWRITE_PROMPT) &&
47 + if ( (m_dialogStyle & wxFD_SAVE) &&
48 + (m_dialogStyle & wxFD_OVERWRITE_PROMPT) &&
49 wxFileExists( filename ) )
53 if (wxMessageBox(msg, _("Confirm"), wxYES_NO) != wxYES)
56 - else if ( (m_dialogStyle & wxOPEN) &&
57 - (m_dialogStyle & wxFILE_MUST_EXIST) &&
58 + else if ( (m_dialogStyle & wxFD_OPEN) &&
59 + (m_dialogStyle & wxFD_FILE_MUST_EXIST) &&
60 !wxFileExists(filename) )
62 wxMessageBox(_("Please choose an existing file."), _("Error"),
63 --- a/audacity-2.0.5/lib-src/FileDialog/win/FileDialogPrivate.cpp 2013-10-19 20:31:33.000000000 +1300
64 +++ b/audacity-2.0.5/lib-src/FileDialog/win/FileDialogPrivate.cpp 2014-06-01 20:36:58.222264699 +1200
66 of.nMaxFile = wxMAXPATH;
68 // we must set the default extension because otherwise Windows would check
69 - // for the existing of a wrong file with wxOVERWRITE_PROMPT (i.e. if the
70 + // for the existing of a wrong file with wxFD_OVERWRITE_PROMPT (i.e. if the
71 // user types "foo" and the default extension is ".bar" we should force it
72 // to check for "foo.bar" existence and not "foo")
73 wxString defextBuffer; // we need it to be alive until GetSaveFileName()!