Update of /cvsroot/audacity/lib-src/FileDialog/win
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10472
Modified Files:
FileDialogPrivate.cpp
Log Message:
Use new wxWidgets 2.8 names for file dialog constants
Index: FileDialogPrivate.cpp
===================================================================
RCS file: /cvsroot/audacity/lib-src/FileDialog/win/FileDialogPrivate.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- FileDialogPrivate.cpp 8 Nov 2008 21:00:26 -0000 1.14
+++ FileDialogPrivate.cpp 1 Mar 2009 19:13:25 -0000 1.15
@@ -419,8 +419,8 @@
{
m_dialogStyle = style;
- if ( ( m_dialogStyle & wxMULTIPLE ) && ( m_dialogStyle & wxSAVE ) )
- m_dialogStyle &= ~wxMULTIPLE;
+ if ( ( m_dialogStyle & wxFD_MULTIPLE ) && ( m_dialogStyle & wxFD_SAVE ) )
+ m_dialogStyle &= ~wxFD_MULTIPLE;
m_bMovedWindow = false;
@@ -514,7 +514,7 @@
long msw_flags = OFN_HIDEREADONLY;
#endif
- if ( m_dialogStyle & wxFILE_MUST_EXIST )
+ if ( m_dialogStyle & wxFD_FILE_MUST_EXIST )
msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
/*
If the window has been moved the programmer is probably
@@ -537,7 +537,7 @@
#endif
}
- if (m_dialogStyle & wxMULTIPLE )
+ if (m_dialogStyle & wxFD_MULTIPLE )
{
// OFN_EXPLORER must always be specified with OFN_ALLOWMULTISELECT
msw_flags |= OFN_EXPLORER | OFN_ALLOWMULTISELECT;
@@ -546,12 +546,12 @@
// if wxCHANGE_DIR flag is not given we shouldn't change the CWD which the
// standard dialog does by default (notice that under NT it does it anyhow,
// OFN_NOCHANGEDIR or not, see below)
- if ( !(m_dialogStyle & wxCHANGE_DIR) )
+ if ( !(m_dialogStyle & wxFD_CHANGE_DIR) )
{
msw_flags |= OFN_NOCHANGEDIR;
}
- if ( m_dialogStyle & wxOVERWRITE_PROMPT )
+ if ( m_dialogStyle & wxFD_OVERWRITE_PROMPT )
{
msw_flags |= OFN_OVERWRITEPROMPT;
}
@@ -573,7 +573,7 @@
wxZeroMemory(of);
// Allow Places bar to show on supported platforms
- if ( wxGetOsVersion() == wxWINDOWS_NT )
+ if ( wxGetOsVersion() == wxOS_WINDOWS_NT )
{
of.lStructSize = sizeof(OPENFILENAME);
}
@@ -675,7 +675,7 @@
// user types "foo" and the default extension is ".bar" we should force it
// to check for "foo.bar" existence and not "foo")
wxString defextBuffer; // we need it to be alive until GetSaveFileName()!
- if (m_dialogStyle & wxSAVE && m_dialogStyle & wxOVERWRITE_PROMPT)
+ if (m_dialogStyle & wxFD_SAVE && m_dialogStyle & wxFD_OVERWRITE_PROMPT)
{
const wxChar* extension = filterBuffer;
int maxFilter = (int)(of.nFilterIndex*2L) - 1;
@@ -697,7 +697,7 @@
//== Execute FileDialog >>=================================================
- bool success = (m_dialogStyle & wxSAVE ? GetSaveFileName(&of)
+ bool success = (m_dialogStyle & wxFD_SAVE ? GetSaveFileName(&of)
: GetOpenFileName(&of)) != 0;
#ifdef __WXWINCE__
@@ -713,7 +713,7 @@
// seems safe).
if ( success &&
(msw_flags & OFN_NOCHANGEDIR) &&
- wxGetOsVersion() == wxWINDOWS_NT )
+ wxGetOsVersion() == wxOS_WINDOWS_NT )
{
wxSetWorkingDirectory(cwdOrig);
}
@@ -725,14 +725,14 @@
int oldStructSize = of.lStructSize;
of.lStructSize = oldStructSize - (sizeof(void *) +
2*sizeof(DWORD));
- success = (m_dialogStyle & wxSAVE) ? (GetSaveFileName(&of) != 0)
+ success = (m_dialogStyle & wxFD_SAVE) ? (GetSaveFileName(&of) != 0)
: (GetOpenFileName(&of) != 0);
errCode = CommDlgExtendedError();
if (!success && (errCode == CDERR_STRUCTSIZE))
{
of.lStructSize = oldStructSize + (sizeof(void *) +
2*sizeof(DWORD));
- success = (m_dialogStyle & wxSAVE) ? (GetSaveFileName(&of) != 0)
+ success = (m_dialogStyle & wxFD_SAVE) ? (GetSaveFileName(&of) != 0)
: (GetOpenFileName(&of) != 0);
}
}
@@ -743,7 +743,7 @@
{
m_fileNames.Empty();
- if ( ( m_dialogStyle & wxMULTIPLE ) &&
+ if ( ( m_dialogStyle & wxFD_MULTIPLE ) &&
#if defined(OFN_EXPLORER)
( fileNameBuffer[of.nFileOffset-1] == wxT('\0') )
#else
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs