diff --git a/configure b/configure index 4d6c2d2266..ff623d0c88 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.in b/configure.in index 8f204da5d4..2772441e8f 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index 5dd25b57be..5bf57497a3 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -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 diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index a274060eb0..d189fb3e32 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -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 diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index ff8a102a8a..75426b39b5 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -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 diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index c8b45d69e2..f0c15456d5 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -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) diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 48d7bd9f2e..47046eb9a9 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -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 diff --git a/include/wx/progdlg.h b/include/wx/progdlg.h index 00e20b3639..087c75a3d1 100644 --- a/include/wx/progdlg.h +++ b/include/wx/progdlg.h @@ -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 diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 31bdeea713..4b404fbed1 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -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 diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 5b8c89be69..10fa48f47e 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -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 diff --git a/setup.h.in b/setup.h.in index f1377460d5..ded9e5fd7c 100644 --- a/setup.h.in +++ b/setup.h.in @@ -500,6 +500,8 @@ #define wxUSE_PROGRESSDLG 0 +#define wxUSE_NATIVE_PROGRESSDLG 0 + #define wxUSE_STARTUP_TIPS 0 #define wxUSE_TEXTDLG 0