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

2
configure vendored
View File

@ -36492,6 +36492,8 @@ fi
if test "$wxUSE_PROGRESSDLG" = "yes"; then
$as_echo "#define wxUSE_PROGRESSDLG 1" >>confdefs.h
$as_echo "#define wxUSE_NATIVE_PROGRESSDLG 1" >>confdefs.h
fi
if test "$wxUSE_SPLASH" = "yes"; then

View File

@ -7079,6 +7079,9 @@ fi
if test "$wxUSE_PROGRESSDLG" = "yes"; then
AC_DEFINE(wxUSE_PROGRESSDLG)
dnl No special option for this one yet as it's supposed to be temporary and
dnl disappear later anyhow.
AC_DEFINE(wxUSE_NATIVE_PROGRESSDLG)
fi
if test "$wxUSE_SPLASH" = "yes"; then

View File

@ -1214,6 +1214,10 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)
#define wxUSE_STARTUP_TIPS 1

View File

@ -1215,6 +1215,10 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)
#define wxUSE_STARTUP_TIPS 1

View File

@ -1215,6 +1215,10 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)
#define wxUSE_STARTUP_TIPS 1

View File

@ -1215,7 +1215,8 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// native MSW progress dialog class, flickering not yet debugged
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)

View File

@ -1216,6 +1216,10 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)
#define wxUSE_STARTUP_TIPS 1

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

View File

@ -1211,6 +1211,10 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)
#define wxUSE_STARTUP_TIPS 1

View File

@ -1214,6 +1214,10 @@
// progress dialog class for lengthy operations
#define wxUSE_PROGRESSDLG 1
// Set to 0 to disable the use of the native progress dialog (currently only
// available under MSW and suffering from some bugs there, hence this option).
#define wxUSE_NATIVE_PROGRESSDLG 1
// support for startup tips (wxShowTip &c)
#define wxUSE_STARTUP_TIPS 1

View File

@ -500,6 +500,8 @@
#define wxUSE_PROGRESSDLG 0
#define wxUSE_NATIVE_PROGRESSDLG 0
#define wxUSE_STARTUP_TIPS 0
#define wxUSE_TEXTDLG 0