]>
Commit | Line | Data |
---|---|---|
53947ced AM |
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 | |
3 | @@ -40,7 +40,7 @@ | |
4 | #include "wx/settings.h" | |
5 | #include "wx/filefn.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 | |
11 | ||
12 | @@ -991,9 +991,9 @@ | |
13 | } | |
14 | ||
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; | |
22 | ||
23 | if ((m_dir.empty()) || (m_dir == wxT("."))) | |
24 | { | |
25 | @@ -1368,7 +1368,7 @@ | |
26 | } | |
27 | #endif // __UNIX__ | |
28 | ||
29 | - if (!(m_dialogStyle & wxSAVE)) | |
30 | + if (!(m_dialogStyle & wxFD_SAVE)) | |
31 | { | |
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) ) | |
40 | { | |
41 | filename = AppendExtension(filename, m_filterExtension); | |
42 | } | |
43 | ||
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 ) ) | |
50 | { | |
51 | wxString msg; | |
52 | @@ -1429,8 +1429,8 @@ | |
53 | if (wxMessageBox(msg, _("Confirm"), wxYES_NO) != wxYES) | |
54 | return; | |
55 | } | |
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) ) | |
61 | { | |
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 | |
65 | @@ -731,7 +731,7 @@ | |
66 | of.nMaxFile = wxMAXPATH; | |
67 | ||
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()! |