From f57254320e73a0c613f35076d17fd2f1e23a9dde Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Feb 2009 11:39:48 +0000 Subject: [PATCH] don't always disable new events code; leave it enabled for MSVC8+ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 5 ----- include/wx/motif/setup0.h | 6 ++++-- include/wx/msw/chkconf.h | 9 +++------ include/wx/msw/setup0.h | 6 ++++-- include/wx/msw/wince/setup.h | 6 ++++-- include/wx/os2/setup0.h | 6 ++++-- include/wx/osx/setup0.h | 6 ++++-- include/wx/palmos/setup0.h | 6 ++++-- include/wx/setup_inc.h | 6 ++++-- include/wx/univ/setup0.h | 6 ++++-- 10 files changed, 35 insertions(+), 27 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index a8288bb155..8bea624513 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -95,11 +95,6 @@ typedef int wxEventType; // generate a new unique event type extern WXDLLIMPEXP_BASE wxEventType wxNewEventType(); -// FIXME: currently the new events code is disabled because it creates too -// many problems, it should be reenabled a.s.a.p. or removed -#undef wxEVENTS_COMPATIBILITY_2_8 -#define wxEVENTS_COMPATIBILITY_2_8 1 - // New macros to create templatized event types: #if wxEVENTS_COMPATIBILITY_2_8 diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 80255f9b66..f8ec92283a 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -53,9 +53,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h index 375f080b71..356cb0160b 100644 --- a/include/wx/msw/chkconf.h +++ b/include/wx/msw/chkconf.h @@ -402,14 +402,11 @@ #endif /* - Currently MSVC can't build the library with new-style events: - - VC6 simply doesn't have good enough templates support - - VC7 always seems to choos the Connect() overload using Functor, even when - the argument is a class method - - VC9 compiles the code fine but fails at linking stage in DLL build + Currently only recent MSVC compilers can build the new events code under + Windows. */ #if !wxEVENTS_COMPATIBILITY_2_8 -# if defined(__VISUALC__) +# if !wxCHECK_VISUALC_VERSION(8) # undef wxEVENTS_COMPATIBILITY_2_8 # define wxEVENTS_COMPATIBILITY_2_8 1 # endif diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 365441afa6..a598891110 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -53,9 +53,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index 181134e720..9ff4a0dccf 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -53,9 +53,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 80c530c8dd..2eebe1a1bb 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -53,9 +53,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 573e6639cf..d1a4b07b59 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -54,9 +54,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index bb985e534d..f63d06e9df 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -53,9 +53,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 640362e5dc..1112262abc 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -49,9 +49,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 25878fae7e..e82d8e4c04 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -52,9 +52,11 @@ // especially, to still allow building if the compiler template support is too // bad to compile the new code. // -// Default is 0 for all compilers except VC6 currently. +// Default is 0 but this is set to 1 automatically in wx/chkconf.h for the +// compilers which can't build the new code (currently only g++ and MSVC >= 8 +// can) // -// Recommended setting: 0 (please upgrade your compiler instead of changing it) +// Recommended setting: 0 #define wxEVENTS_COMPATIBILITY_2_8 0 // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when -- 2.45.2