Patch #1702 2006-12-07 20:30

stahta01

patch to the old wxSmith to use wxPropertyGrid version 1.2.x
Download
1702-patch_to_the_o.patch (1.6 KB)
Category
Plugin::Refinement
Status
Closed
Close date
2007-02-25 22:00
Assigned to
 
Index: wxwidgets/properties/wxscolourproperty.cpp
===================================================================
--- wxwidgets/properties/wxscolourproperty.cpp    (revision 3435)
+++ wxwidgets/properties/wxscolourproperty.cpp    (working copy)
@@ -128,7 +128,11 @@
         wxSYS_COLOUR_MENUBAR
     };
 
+#if defined(wxPG_VERSION) && wxPG_VERSION > 1099
+    WX_PG_IMPLEMENT_PROPERTY_CLASS(wxsMyColourProperty,wxEnumProperty,wxColourPropertyValue,const wxColourPropertyValue&,Choice)
+#else
     WX_PG_IMPLEMENT_PROPERTY_CLASS(wxsMyColourProperty,wxColourPropertyValue,const wxColourPropertyValue&,Choice)
+#endif
 
     wxsMyColourPropertyClass::wxsMyColourPropertyClass( const wxString& label, const wxString& name,
         const wxColourPropertyValue& value )
@@ -181,7 +185,12 @@
                 (int)m_value.m_colour.Red(),(int)m_value.m_colour.Green(),(int)m_value.m_colour.Blue());
             return temp;
         }
+
+#if defined(wxPG_VERSION) && wxPG_VERSION > 1099
+        return m_choices.GetLabel(m_index);
+#else
         return m_constants->GetLabel(m_index);
+#endif
     }
 
     wxSize wxsMyColourPropertyClass::GetImageSize() const
Index: wxSmith.cbp
===================================================================
--- wxSmith.cbp    (revision 3435)
+++ wxSmith.cbp    (working copy)
@@ -47,6 +47,8 @@
             <Add option="-DWX_PRECOMP" />
             <Add option="-DBUILDING_PLUGIN" />
             <Add option="-DwxUSE_UNICODE" />
+            <Add option="-DWXMAKINGLIB_PROPGRID" />
+            <Add option="-DwxPG_COMPATIBILITY_1_0_0" />
             <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
             <Add directory="$(#CB)\sdk" />
             <Add directory="$(#CB)\sdk\wxscintilla\include" />
stahta01 2006-12-07 20:31

Typo: this is for the new wxSmith

I am working on patch to upgrade wxPropertyGrid to version 1.2.x; likely version 1.2.5 when it is finished.

See CodeBlocks forum thread http://forums.codeblocks.org/index.php?topic=4638.0

Tim S

Note: forgot to patch unix cbp files.

WXMAKINGLIB_PROPGRID makes wxPropertyGrid into static library

wxPG_USE_WXMODULE=0 turns off the use of wxWidgets wxModule; the use wxModule was causing wxSmith to crash.

wxPG_COMPATIBILITY_1_0_0 turns on 1.0.0 compatibility mode; this should be removed and the errors fixed.

#defines needed in target wxPropertyGrid

WXMAKINGLIB_PROPGRID

wxPG_USE_WXMODULE=0

wxPG_COMPATIBILITY_1_0_0

#defines needed in project wxSmith (old)

WXMAKINGLIB_PROPGRID

wxPG_COMPATIBILITY_1_0_0

stahta01 2006-12-07 20:35

Note: This patch needs testing.

Note: The code in wxsArrayStringEditorDlg::OnCancel is stub code, I have no idea if it will work right.

Tim S

stahta01 2006-12-27 21:23

Moved wxWidgets patch code to new patch. [ Patch #1766 ] NEW (experimental) wxSmith patch for wxWidgets 2.8; https://developer.berlios.de/patch/?func=detailpatch&patch_id=1766&group_id=5358

Tim S