Patch #1903 2007-02-25 20:45
stahta01
wxSmith patch for wxW28 and wxPropertyGrid 1.2.x- Download
- 1903-wxSmith_patch.patch (10.9 KB)
Index: src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsguiconfigpanel.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsguiconfigpanel.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxwidgetsguiconfigpanel.cpp (working copy)
@@ -144,7 +144,11 @@
_("XRC files (*.xrc)|*.xrc|"
"Zipped files (*.zip)|*.zip|"
"All files (*)|*"),
- wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY);
+ wxOPEN | wxFILE_MUST_EXIST
+#if WXWIN_COMPATIBILITY_2_4
+ | wxHIDE_READONLY
+#endif
+ );
if ( !FileName.empty() )
{
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxssplitterwindow.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxssplitterwindow.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxssplitterwindow.cpp (working copy)
@@ -58,7 +58,9 @@
WXS_ST(wxSP_3D)
WXS_ST(wxSP_3DSASH)
WXS_ST(wxSP_3DBORDER)
+#if WXWIN_COMPATIBILITY_2_6
WXS_ST(wxSP_FULLSASH)
+#endif
WXS_ST(wxSP_BORDER)
WXS_ST(wxSP_NOBORDER)
WXS_ST(wxSP_PERMIT_UNSPLIT)
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstextctrl.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstextctrl.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxstextctrl.cpp (working copy)
@@ -56,7 +56,12 @@
// WXS_ST(wxTE_DONTWRAP)
// Not in Help file but in XRC file, assume applying to all platform
+
+#if WXWIN_COMPATIBILITY_2_6
WXS_ST(wxTE_LINEWRAP)
+#else
+ WXS_ST(wxTE_CHARWRAP)
+#endif // WXWIN_COMPATIBILITY_2_6
WXS_ST_END()
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsdialog.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsdialog.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsdialog.cpp (working copy)
@@ -32,13 +32,13 @@
WXS_ST(wxSTAY_ON_TOP)
WXS_ST(wxCAPTION)
WXS_ST(wxDEFAULT_DIALOG_STYLE)
- WXS_ST(wxTHICK_FRAME)
+ // WXS_ST(wxTHICK_FRAME)// replaced by wxRESIZE_BORDER in 2.6
WXS_ST(wxSYSTEM_MENU)
WXS_ST(wxRESIZE_BORDER)
- WXS_ST(wxRESIZE_BOX)
+ // WXS_ST(wxRESIZE_BOX) // replaced by wxMAXIMIZE_BOX in 2.6
WXS_ST(wxCLOSE_BOX)
- WXS_ST(wxDIALOG_MODAL)
- WXS_ST(wxDIALOG_MODELESS)
+ // WXS_ST(wxDIALOG_MODAL) // removed in 2.6
+ // WXS_ST(wxDIALOG_MODELESS) // removed in 2.6
WXS_ST(wxDIALOG_NO_PARENT)
WXS_ST(wxTAB_TRAVERSAL)
WXS_ST(wxWS_EX_VALIDATE_RECURSIVELY)
@@ -50,7 +50,7 @@
// on WXMSW wxDIALOG_EX_METAL only for WXMAC
// NOTE (cyberkoa#1#): wxDIALOG_EX_CONTEXTHELP & wxDIALOG_EX_METAL are
// extended style which need 2 steps construction
- WXS_ST_MASK(wxNO_3D,wxsSFWin,0,true)
+ // WXS_ST_MASK(wxNO_3D,wxsSFWin,0,true) // removed in 2.6
WXS_EXST_MASK(wxDIALOG_EX_CONTEXTHELP,wxsSFWin,0,true)
WXS_EXST_MASK(wxDIALOG_EX_METAL,wxsSFOSX,0,true)
WXS_ST_END()
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsscrolledwindow.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsscrolledwindow.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsscrolledwindow.cpp (working copy)
@@ -31,7 +31,7 @@
WXS_ST_CATEGORY("wxScrolledWindow")
WXS_ST(wxHSCROLL)
WXS_ST(wxVSCROLL)
- WXS_ST(wxNO_3D)
+ // WXS_ST(wxNO_3D) // removed in 2.6
WXS_ST(wxTAB_TRAVERSAL)
WXS_EXST(wxWS_EX_VALIDATE_RECURSIVELY)
WXS_ST_END()
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxspanel.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxspanel.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxspanel.cpp (working copy)
@@ -29,7 +29,7 @@
WXS_ST_BEGIN(wxsPanelStyles,_T("wxTAB_TRAVERSAL"))
WXS_ST_CATEGORY("wxPanel")
- WXS_ST(wxNO_3D)
+ // WXS_ST(wxNO_3D) // removed in 2.6
WXS_ST(wxTAB_TRAVERSAL)
WXS_ST(wxWANTS_CHARS)
WXS_EXST(wxWS_EX_VALIDATE_RECURSIVELY)
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsframe.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsframe.cpp (revision 3669)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsframe.cpp (working copy)
@@ -33,10 +33,10 @@
WXS_ST(wxCAPTION)
WXS_ST(wxDEFAULT_DIALOG_STYLE)
WXS_ST(wxDEFAULT_FRAME_STYLE)
- WXS_ST(wxTHICK_FRAME)
+ // WXS_ST(wxTHICK_FRAME)// r
download for full patch...
History
stahta01 2007-02-25 20:47
This patch combines Pre-compiled Header fixes, wxWidgets 2.8 Warning Reduction and the following patches into one patch.
[ Patch #1771 ] Old wxSmith patch for wxListbook::HitTest protected wxW2.8
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1771&group_id=5358
[ Patch #1766 ] NEW (experimental) wxSmith patch for wxWidgets 2.8
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1766&group_id=5358
[ Patch #1702 ] patch to the old wxSmith to use wxPropertyGrid version 1.2.x
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1702&group_id=5358
Tim S
stahta01 2007-02-26 00:42
Change 1: WXWIN_COMPATIBILITY_2_4 is turn off by default under wxWidgets 2.8 Problem 1: This makes wxHIDE_READONLY undefined. Solution 1: Added #if (WXWIN_COMPATIBILITY_2_4) blocks around wxHIDE_READONLY. Change 2: wxFontEnumerator::GetFacenames returns wxArrayString instead of wxArrayString* Solution 2: Added code #if wxCHECK_VERSION(2, 8, 0) wxArrayString faceNames = Enumer.GetFacenames(); #else wxArrayString& faceNames = *Enumer.GetFacenames(); #endif And use faceNames where GetFacenames was used. Problem 3: wxWidgets 2.8 does NOT like WX_DEFINE_ARRAY(bool,wxArrayBool) Solution 3: Replaced it with WX_DEFINE_ARRAY_INT(bool,wxArrayBool) Change 4: OnCancel method removed from wxDialog. Problem 4: wxsArrayStringEditorDlg was using it. Solution 4: Created wxsArrayStringEditorDlg::OnCancel method, note I am not sure if my code in the OnCancel method is correct. Change 5: wxListbook::HitTest in protected in wx/listbook.h, Fixed in wxW2.8.2 Problem 5: The file src/plugins/contrib/wxSmith/defwidgets/wxslistbook.cpp uses it. Solution 5: Cast to wxBookCtrlBase Change 6: Constansts wxOPEN, wxFILE_MUST_EXIST, wxSAVE and wxOVERWRITE_PROMPT has been depreciated/obsoleted. Change 7A: Constansts wxTHICK_FRAME and wxRESIZE_BOX has been depreciated/obsoleted. Solution 7A: Replaced wxTHICK_FRAME with wxRESIZE_BORDER. Replaced wxRESIZE_BOX with wxMAXIMIZE_BOX. Change 7B: Constansts wxDIALOG_MODELESS, wxNO_3D and wxDIALOG_MODAL has been depreciated/obsoleted. Solution 7B: Removed use of Constansts. Change 8: Method wxBitmapButton::SetLabel has been depreciated/obsoleted. Solution 8: Replaced with wxBitmapButton::SetBitmapLabel. Change 9: propgrid macro WX_PG_IMPLEMENT_PROPERTY_CLASS has been changed. Solution 9: used #if/else/endif block Change 10: Structure wxPGChoiceInfo in header propgrid.h has changed Solution 10: if wxPG_VERSION > 1099 use with m_choices.GetLabel(?) instead of m_constants->GetLabel(?) Change 11: wxPropertyGrid 1.2.6 requires defines to compile and link right Solution 11: Added defines for WXMAKINGLIB_PROPGRID and wxPG_COMPATIBILITY_1_0_0 Note 11: The main CB project needs an extra define of wxPG_USE_WXMODULE=0 Change 12: Constanst wxTE_LINEWRAP has been depreciated/obsoleted. Solution 12: Replaced wxTE_LINEWRAP with wxTE_CHARWRAP. Change 13: Constansts wxSP_FULLSASH and wxSP_SASH_AQUA has been depreciated/obsoleted. Solution 13: Removed Constansts. Change 14: Precompiled Headers issues. Solution 14: Added more includes guarded by WX_PRECOMP
stahta01 2007-02-26 01:19
stahta01 2007-03-07 00:16
FYI:
I am re-doing the patch, wxSmith seems to have changed enough to stop my patch from working.
Tim S
stahta01 2007-03-07 04:13
Updated for SVN 3669
Tim S