Patch #1985 2007-05-08 20:41

stahta01

wx261 does not build CB under windows
Download
1985-wx261_does_not.patch (1.2 KB)
Category
Application::Bugfix
Status
Closed
Close date
2007-07-29 15:16
Assigned to
 
Index: src/sdk/propgrid/src/propgrid/odcombo.cpp
===================================================================
--- src/sdk/propgrid/src/propgrid/odcombo.cpp    (revision 4091)
+++ src/sdk/propgrid/src/propgrid/odcombo.cpp    (working copy)
@@ -30,6 +30,7 @@
 #if wxUSE_COMBOBOX
 
 #ifndef WX_PRECOMP
+    #include "wx/app.h"
     #include "wx/log.h"
 
     #include "wx/button.h"
@@ -3091,7 +3092,13 @@
 
     if ( theme )
     {
+#if wxCHECK_VERSION(2, 8, 0)
         const bool isVista = (::wxGetWinVersion() >= wxWinVersion_6);
+#else
+        int Major = 0;
+        int family = wxGetOsVersion(&Major, NULL);
+        const bool isVista = ((family == wxWINDOWS_NT) && (Major >= 6));
+#endif
 
         if ( isVista )
             m_iFlags |= wxPGCC_BUTTON_STAYS_DOWN;
@@ -3354,7 +3361,13 @@
 
     if ( hTheme )
     {
-        const bool useVistaComboBox = ::wxGetWinVersion() >= wxWinVersion_6;
+#if wxCHECK_VERSION(2, 8, 0)
+        const bool useVistaComboBox = (::wxGetWinVersion() >= wxWinVersion_6);
+#else
+        int Major = 0;
+        int family = wxGetOsVersion(&Major, NULL);
+        const bool useVistaComboBox = ((family == wxWINDOWS_NT) && (Major >= 6));
+#endif
 
         RECT rFull;
         wxCopyRectToRECT(borderRect, rFull);
stahta01 2007-05-08 20:43

This is a back port of wxPropertyGrid 1.2.7 file odcombo.cpp. see forum Thread http://forums.codeblocks.org/index.php/topic,5864.msg44875.html#msg44875

Note, 2.6.1 does NOT work without patch, but 2.6.3 does work. I did NOT test 2.6.2.

Tim S

pauliusz 2007-05-09 22:33

This already is part of my [ Patch #1947 ] wxPropertyGrid 1.2.6->1.2.7

stahta01 2007-05-10 15:38

I agree it is part of wxPropertyGrid 1.2.7, but it does not depend on any of the rest of wxPropertyGrid 1.2.7. Your patch needs more testing before applying to C::B. Have you tested it. I get errors using your patch on the CHANGES-propgrid.txt file. Tim S

stahta01 2007-05-10 16:01

Just tested [ Patch #1947 ] wxPropertyGrid 1.2.6->1.2.7 again and got no errors this time. If you apply [ Patch #1947 ] wxPropertyGrid 1.2.6->1.2.7 this patch is not needed.

stahta01 2007-06-27 00:05

Updated to SVN 4091

killerbot 2007-07-26 14:41

The patch for wxPropertyGrid is now already for 1.2.6->1.2.8, in case we apply that one, then this patch is still obsolete ??

stahta01 2007-07-26 18:38

It should not be needed if wxPropertyGrid is upgraded to 1.2.8, but I have not tested it with wxWidgets 2.6.1 to confirm lack of issues.

Tim S

biplab 2007-07-29 15:16

Closed. Thanks for the patch.