Add proper support for wxUSE_NATIVE_PROGRESSDLG

This symbol was wrongly added to include/wx/msw/setup0.h directly in
075ef6551e, so it didn't work when
cross-compiling from Unix (which doesn't use this file) and would have been
lost after any future modification of include/wx/setup_inc.h where it should
have been added in the first place.

Do this now and also make the check for this symbol in wx/progdlg.h a bit more
readable.
This commit is contained in:
Vadim Zeitlin
2015-12-30 18:51:48 +01:00
parent ed0b899fe5
commit 52a4fac626
11 changed files with 45 additions and 5 deletions

View File

@@ -30,9 +30,17 @@
#include "wx/generic/progdlgg.h"
#if defined(__WXMSW__) && wxUSE_THREADS && !defined(__WXUNIVERSAL__) && wxUSE_NATIVE_PROGRESSDLG
#include "wx/msw/progdlg.h"
#else
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
// The native implementation requires the use of threads and still has some
// problems, so it can be explicitly disabled.
#if wxUSE_THREADS && wxUSE_NATIVE_PROGRESSDLG
#define wxHAS_NATIVE_PROGRESSDIALOG
#include "wx/msw/progdlg.h"
#endif
#endif
// If there is no native one, just use the generic version.
#ifndef wxHAS_NATIVE_PROGRESSDIALOG
class WXDLLIMPEXP_CORE wxProgressDialog
: public wxGenericProgressDialog
{
@@ -48,7 +56,7 @@
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxProgressDialog );
};
#endif // defined(__WXMSW__) && wxUSE_THREADS
#endif // !wxHAS_NATIVE_PROGRESSDIALOG
#endif // wxUSE_PROGRESSDLG