This a work in Progress
I am working on adding the Patches needed to Build Code::Blocks linking against the soon to be released,
wxWidgets 2.9.0 development build.
Tim S
Current Status is: 3. Code::Blocks Opens and Closes without crashing using safe-mode option
The Status Testing:
1. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with POD Warnings
2. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with-out POD Warnings
3. Code::Blocks Opens and Closes without crashing using safe-mode option
4. Code::Blocks Opens and Closes without crashing without using safe-mode option
5. Code::Blocks Compiles Itself.
Types of Patches
1. Code::Blocks Design Change Patches
2. Code::Blocks Implementation Change Patches
3. wxWidgets 2.9 required POD Warning Fixes Patches
4. wxWidgets 2.9 required design Change Patches
5. wxWidgets 2.9 optional deprecation Change Patches
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)
Quote from: Biplab on May 03, 2009, 04:08:15 AM
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)
That explains why my patches needed updating; last updated them about two months ago.
The Compiler is likely crashing because it is trying to open an GUI window before the GUI event handler is finished being initialized. Never, took the time to trace the cause; was hoping it would go away before 2.9.0 release, but not going to happen.
Tim S
Command, I Used, to build wxWidgets 2.9.0 RC2
http://biolpc22.york.ac.uk/pub/2.9.0-rc2/
Still Testing These Options, but should work.
While working on Patches to Source Code will be using wxUSE_STC=0 and USE_STC=0 to avoid Build Errors because of two wxscintilla libs.
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CPPFLAGS="-Wmissing-include-dirs"
Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"
Required for wxSmith: USE_PROPGRID=1
Patch to Code::Blocks needed if NOT wxUSE_STC=0 and USE_STC=0
Edit: Changed Patch to see if this one works better, than last one.
Patch Fails to work too often to be maintained.
Quote from: stahta01 on May 03, 2009, 04:52:56 AM
Command, I Used, to build wxWidgets 2.9.0 RC2
Still Testing These Options, but should work.
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 LDFLAGS="-enable-stdcall-fixup" CXXFLAGS="-fno-strict-aliasing" CPPFLAGS="-Wmissing-include-dirs"
Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"
Required for wxSmith: USE_PROPGRID=1
Didn't notice that RC2 is out.
I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.
My Patch for Core Code::Blocks non-POD type warnings is to change c_str() to wx_str() this needs tested on more systems I have only tested On Windows XP. An wxWidget's person said this is not a fix that can work everywhere, but it is the simplest one I found for windows.
Tim S
Quote
warning: cannot pass objects of non-POD type ...
call will abort at runtime
This patch needs Tested under Linux to confirm it works
Deleted patch to save space.
First Patch needed to get Core Code::Blocks to Compile using wxWidgets 2.9.0 and MinGW GCC 4.40
Deleted to save space.
Quote from: Biplab on May 03, 2009, 05:53:21 AM
Didn't notice that RC2 is out.
I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.
At one time, under windows GCC 4.x the wxWidgets would have runtime crashes if
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.
Link to wxWidgets RC2
http://biolpc22.york.ac.uk/pub/2.9.0-rc2/
Tim S
Tim,
I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.
Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.
Thanks for your good work and keep posting patches. :)
Regards,
Biplab
Quote from: Biplab on May 03, 2009, 07:30:40 AM
Tim,
I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.
Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.
Thanks for your good work and keep posting patches. :)
Regards,
Biplab
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.
Once, I get the patches that break wxWidgets 2.8 will wrap with
wxCHECK_VERSION().
Note, I will only be checking, against wxWidgets 2.8.4, after I get Code::Blocks Core to compile and Link; still working on that.
Tim S
Quote from: stahta01 on May 03, 2009, 07:54:19 AM
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.
But the docs say otherwise. As per the docs,
wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.
Quote from: Biplab on May 03, 2009, 08:27:19 AM
Quote from: stahta01 on May 03, 2009, 07:54:19 AM
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.
But the docs say otherwise. As per the docs, wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.
The header file has it in it. It was depreciated, I am guessing, when the 2.0 series was released.
I can add guards but they are not really needed.
Tim S
@Biplab:
Possible method to add wx_str().
Does the following method meet with your OK?
Deleted to save space
Quote from: stahta01 on May 03, 2009, 06:30:54 AM
At one time, under windows GCC 4.x the wxWidgets would have runtime crashes if
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.
FYI, this was only true for the 4.2 series; it has been fixed as of the 4.3 series.
Quote from: stahta01 on May 03, 2009, 10:59:49 AM
@Biplab:
Possible method to add wx_str().
Does the following method meet with your OK?
I'd prefer to have relevant code guarded with wxCHECK_VERSION. I'd prefer not to use
prep.h for this.
FYI, I've patched most of the Core and Core Plugin code to ensure that build works fine. There are still many areas where I've missed out (as compiler didn't emit any warning).
@Biplab:
Ok, Will do the rest of C::B Plugins using wxCHECK_VERSION() around wx_str() and C_str().
My Method is to use wxWidgets version of wxPropertyGrid; which will need OK from wxSmith maintainer.
Will submit the wxSmith patch as separate file from rest. And, I am not sure how to do this using wxCHECK_VERSION() so will likely take time to work on some parts of wxSmith patch.
Note: I am currently getting new error, less that two months old, on shutting in down Code::Blocks.
I plan to work on finding this error before doing the wxSmith patch.
Tim S
PS: Waiting for a rebuild of wxWidgets 2.9.0 RC2 to finish patches.
Patch to Contrib envvars attached to message.
Deleted patch to save space.
Not had time to test under wxWidgets 2.8, but compiles under wxWidgets 2.9.0 RC2.
Tim S
Note: The file also contains patch to devpak_plugin
Patch to Contrib ThreadSearch
Tim S
Index: src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp
===================================================================
--- src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp (revision 5585)
+++ src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp (working copy)
@@ -491,7 +491,11 @@
wxFocusEvent ev(wxEVT_SET_FOCUS);
ev.SetWindow(this);
+ #if wxCHECK_VERSION(2, 9, 0)
+ control->GetEventHandler()->AddPendingEvent(ev);
+ #else
control->AddPendingEvent(ev);
+ #endif
}
}
Patch to lib_finder attached to this message.
Deleted Patch to save website resources
Patches Still Needed for
Profiler
Exporter
Games
Code Snippets
DragScroll
wxSmith
wxSmith - Contrib Items
Note: I am working currently on a very large patch for wxSmith
Patch to Contrib DragScroll
Tim S
Index: src/plugins/contrib/dragscroll/dragscroll.cpp
===================================================================
--- src/plugins/contrib/dragscroll/dragscroll.cpp (revision 5585)
+++ src/plugins/contrib/dragscroll/dragscroll.cpp (working copy)
@@ -977,7 +977,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0;
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
}while(0);
// Issue SetFont() for saved font sizes on our monitored windows
@@ -1006,7 +1010,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0;
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
#if defined(LOGGING)
//LOGIT( _T("OnAppStartupDoneInit Issued Wheel Zoom event 0[%p]size[%d]"),pWindow, fontSize);
#endif
@@ -1143,7 +1151,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0; //set user font
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
#if defined(LOGGING)
//LOGIT( _T("OnWindowOpen Issued htmlWindow Zoom event"));
#endif
Got to do School Work Now; be a week before I can do any major work.
Tim S
Quote from: stahta01 on May 03, 2009, 08:15:03 PM
My Method is to use wxWidgets version of wxPropertyGrid; which will need OK from wxSmith maintainer.
Will submit the wxSmith patch as separate file from rest. And, I am not sure how to do this using wxCHECK_VERSION() so will likely take time to work on some parts of wxSmith patch.
Please go ahead with the patch. No objections to that.
I didn't read the code; but you can do it like-
#if wxCHECK_VERSION(2, 9, 0)
#include <wx/propgrid/propgrid.h>
#else
#include "propgrid/propgrid.h"
#endifAs long as the API remain unchanged, this should do. I'll commit rest of your patches tonight. :)
Quote from: Biplab on May 04, 2009, 02:34:10 AM
As long as the API remain unchanged, this should do. I'll commit rest of your patches tonight. :)
There was a change in wxPropertyGrid API.
Three clear and separate ways to proceed.
1. Wait till wxWidgets 3.0 is released before doing wxSmith
2. Upgrade wxSmith to using a newer wxPropertyGrid more compatible with wxWidgets 2.9 wxPropertyGrid
3. Add Patches to wxSmith guarded by both wxCHECK_VERSION and wxPropertyGrid version guard.
I plan to do option
3 add guards based on wxPropertyGrid version and wxWidgets version.
Edit: I am going to try with just wxCHECK_VERSION for now.
If option 2 is taken will likely need to use wxCHECK_PROPGRID_VERSION in addition.
Option 3 Failed with about 6 API changes where I could not determine the correct action.
Planning on doing a very limited patch of current wxPropertyGrid.
Will try to use the below to make wxPropertyGrid more like wxWidgets 2.9 version
#define wxPG_PGVARIANT_IS_VARIANT
#define wxPG_ID_IS_PTR 1Tim S
Quote from: Biplab on May 04, 2009, 02:34:10 AM
Please go ahead with the patch. No objections to that.
Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
Quote from: MortenMacFly on May 04, 2009, 09:23:48 AM
Quote from: Biplab on May 04, 2009, 02:34:10 AM
Please go ahead with the patch. No objections to that.
Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
I have three separate patches for wxSmith. Rewriting with guards takes time.
1. Normal wxWidgets 2.9 changes
2. wxPropertyGrid API changes
No idea of best way to do the below, I am thinking make separate CB Project to
build/not build wxPropertyGrid.
3. Build changes (remove wxPropertyGrid code from Code::Blocks to test wxWidgets 2.9)
Write patch to do step 4.
4. Upgrade CB wxPropertyGrid to newer API used by wxWidgets 2.9 to support CB with wxWidgets 2.8
Tim S
Quote from: MortenMacFly on May 04, 2009, 09:23:48 AM
Quote from: Biplab on May 04, 2009, 02:34:10 AM
Please go ahead with the patch. No objections to that.
Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
I don't want to remove wxpropgrid sources now. Rather I want to make wxsmith ready to work with wxWidgets 2.9. As I've been doing so far, all wx-2.9 migration patches are to be guarded by
wxCHECK_VERSION to avoid breaking present compatibility with wx-2.8.x. As long as we support wx-2.8.x we can't remove wxpropgrid from trunk.
See http://forums.next.codeblocks.org/index.php/topic,10510.msg72219.html#msg72219 for wxSmith Patches.
Guarded Patch to devpak. Tim S
Index: src/plugins/contrib/devpak_plugin/mytar.cpp
===================================================================
--- src/plugins/contrib/devpak_plugin/mytar.cpp (revision 5588)
+++ src/plugins/contrib/devpak_plugin/mytar.cpp (working copy)
@@ -19,7 +19,11 @@
m_SkipBytes(0),
m_Size(0)
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ if (!filename.IsEmpty())
+ #else
if (filename)
+ #endif
Open(filename);
}
Patch to Games
Index: src/plugins/contrib/byogames/byosnake.cpp
===================================================================
--- src/plugins/contrib/byogames/byosnake.cpp (revision 5588)
+++ src/plugins/contrib/byogames/byosnake.cpp (working copy)
@@ -300,7 +300,11 @@
DC->SetTextBackground(*wxBLACK);
DC->SetFont(m_Font);
wxString Line1 = wxString::Format(_("Lives: %d Score: %d Length: %d"),m_Lives,m_Score,m_SnakeLen);
+ #if wxCHECK_VERSION(2, 9, 0)
+ wxString Line2 = IsPaused() ? wxString(_("Paused")) : wxString(wxEmptyString);
+ #else
wxString Line2 = IsPaused() ? _("Paused") : wxEmptyString;
+ #endif
wxString Line3 = GetBackToWorkString();
DC->DrawText(Line1,5,5);
int xs, ys;
Patch for profiler; I did not add wx version guards do you want me to? Tim S
Index: src/plugins/contrib/profiler/cbprofilerexec.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofilerexec.cpp (revision 5588)
+++ src/plugins/contrib/profiler/cbprofilerexec.cpp (working copy)
@@ -165,7 +165,7 @@
// Parsing Call Graph
for (n = begin ; n < msg.GetCount(); ++n )
{
- if ((msg[n].IsEmpty())||(msg[n].Find(0x0C) != -1))
+ if ((msg[n].IsEmpty())||(msg[n].Find(wxChar(0x0C)) != -1))
break;
outputCallGraphArea->InsertItem(next,_T(""));
char first_char = msg[n].GetChar(0);
@@ -209,7 +209,7 @@
wxString output_help;
for ( ; n < msg.GetCount(); ++n )
{
- if (msg[n].Find(0x0C) != -1)
+ if (msg[n].Find(wxChar(0x0C)) != -1)
break;
output_help << msg[n] << _T("\n");
progress.Update((100*n)/(msg.GetCount()-1));
@@ -247,7 +247,7 @@
// Parsing Call Graph
for (n = begin ; n < msg.GetCount(); ++n )
{
- if ((msg[n].IsEmpty())||(msg[n].Find(0x0C) != -1))
+ if ((msg[n].IsEmpty())||(msg[n].Find(wxChar(0x0C)) != -1))
break;
long item = outputFlatProfileArea->InsertItem(next,_T(""));
outputFlatProfileArea->SetItemData(item, next);
@@ -312,7 +312,7 @@
// Printing Flat Profile Help
for ( ; n < msg.GetCount(); ++n )
{
- if (msg[n].Find(0x0C) != -1)
+ if (msg[n].Find(wxChar(0x0C)) != -1)
break;
output_help << msg[n] << _T("\n");
progress.Update((100*n)/(msg.GetCount()-1));
Partial patch for CodeSnippets
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (working copy)
@@ -1850,7 +1850,11 @@
#endif
delete filetype;
+ #if wxCHECK_VERSION(2, 9, 0)
+ if ( !open.IsEmpty() )
+ #else
if ( open )
+ #endif
::wxExecute( open, wxEXEC_ASYNC);
}
}
@@ -2154,7 +2158,11 @@
{
SetAssociatedItemID( treeItemID );
wxCommandEvent editEvt( wxEVT_COMMAND_MENU_SELECTED , idMnuEditSnippet);
+ #if wxCHECK_VERSION(2, 9, 0)
+ GetConfig()->GetSnippetsWindow()->GetEventHandler()->AddPendingEvent( editEvt);
+ #else
GetConfig()->GetSnippetsWindow()->AddPendingEvent( editEvt);
+ #endif
}
}
}//if id
Index: src/plugins/contrib/codesnippets/snippetsconfig.cpp
===================================================================
--- src/plugins/contrib/codesnippets/snippetsconfig.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/snippetsconfig.cpp (working copy)
@@ -232,7 +232,11 @@
cfgFile.Write( wxT("SnippetFolder"), SettingsSnippetsFolder ) ;
cfgFile.Write( wxT("ViewSearchBox"), SettingsSearchBox ) ;
cfgFile.Write( wxT("casesensitive"), m_SearchConfig.caseSensitive ) ;
+ #if wxCHECK_VERSION(2, 9, 0)
+ cfgFile.Write( wxT("scope"), int(m_SearchConfig.scope ));
+ #else
cfgFile.Write( wxT("scope"), m_SearchConfig.scope );
+ #endif
cfgFile.Write( wxT("EditorsStayOnTop"),SettingsEditorsStayOnTop );
if ( IsPlugin() )
{ // Write ExternalPersistent for plugin use only
Index: src/plugins/contrib/codesnippets/codesnippetsevent.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetsevent.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/codesnippetsevent.cpp (working copy)
@@ -95,8 +95,13 @@
// Propagate the event to ThreadSearchFrame
if ( pSearchPath && pCodeSnippetsTreeCtrl)
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ pSearchPath->GetEventHandler()->AddPendingEvent( (wxEvent&)event );
+ pCodeSnippetsTreeCtrl->GetEventHandler()->AddPendingEvent( (wxEvent&)event );
+ #else
pSearchPath->AddPendingEvent( (wxEvent&)event );
pCodeSnippetsTreeCtrl->AddPendingEvent( (wxEvent&)event );
+ #endif
}
else
{
@@ -143,8 +148,13 @@
// Propagate the event to ThreadSearchFrame
if ( pSearchPath && pCodeSnippetsTreeCtrl)
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ pSearchPath->GetEventHandler()->ProcessEvent( (wxEvent&)event );
+ pCodeSnippetsTreeCtrl->GetEventHandler()->ProcessEvent( (wxEvent&)event );
+ #else
pSearchPath->ProcessEvent( (wxEvent&)event );
pCodeSnippetsTreeCtrl->ProcessEvent( (wxEvent&)event );
+ #endif
}
else
{
Index: src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp (working copy)
@@ -112,7 +112,11 @@
wxString path = ConfigManager::GetFolder(sdDataUser) + _T("/lexers/");
if (dir.Open(path))
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
+ #else
Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.c_str()));
+ #endif
bool ok = dir.GetFirst(&filename, _T("lexer_*.xml"), wxDIR_FILES);
while(ok)
{
@@ -128,7 +132,11 @@
path = ConfigManager::GetFolder(sdDataGlobal) + _T("/lexers/");
if (dir.Open(path))
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
+ #else
Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.c_str()));
+ #endif
bool ok = dir.GetFirst(&filename, _T("lexer_*.xml"), wxDIR_FILES);
while(ok)
{
@@ -724,7 +732,11 @@
wxString tmp(_T(' '), keywords.length()); // faster than using Alloc()
const wxChar *src = keywords.c_str();
+ #if wxCHECK_VERSION(2, 9, 0)
+ wxChar *dst = (wxChar *) tmp.wx_str();
+ #else
wxChar *dst = (wxChar *) tmp.c_str();
+ #endif
wxChar c;
size_t len = 0;
Index: src/plugins/contrib/codesnippets/editor/scbeditor.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/scbeditor.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/scbeditor.cpp (working copy)
@@ -524,7 +524,11 @@
event.SetY(yArg);
//-wxPostEvent(Manager::Get()->GetAppWindow(), event);
//-Manager::Get()->GetPluginManager()->NotifyPlugins(event);
+ #if wxCHECK_VERSION(2, 9, 0)
+ parent->GetEventHandler()->ProcessEvent(event);
+ #else
parent->ProcessEvent(event);
+ #endif
}
void ScbEditor::DestroySplitView()
Index: src/plugins/contrib/codesnippets/editor/dragscroll.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/dragscroll.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/dragscroll.cpp (working copy)
@@ -1056,7 +1056,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0;
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
#if defined(LOGGING)
LOGIT( _T("OnAppStartupDoneInit Issued Wheel Zoom event [%p][%d][%s]size[%d]"),pWindow, pWindow->GetId(), pWindow->GetName().c_str(),fontSize);
#endif
Index: src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp
===================================================================
--- src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp (working copy)
@@ -572,7 +572,11 @@
wxFocusEvent ev(wxEVT_SET_FOCUS);
ev.SetWindow(this);
+ #if wxCHECK_VERSION(2, 9, 0)
+ control->GetEventHandler()->AddPendingEvent(ev);
+ #else
control->AddPendingEvent(ev);
+ #endif
}
return;
}//if IsOpen
Patch to export; do you wish me to guard this one?
Index: src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp
===================================================================
--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp (revision 5588)
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp (working copy)
@@ -1054,7 +1054,7 @@
charIter = (*m_gn).find(s[i]);
if (charIter != (*m_gn).end())
{
- t.Append(charIter->second);
+ t.Append(wxChar(charIter->second));
}
else
{
Patch to wxSmithContribItems attached as file. Tim S
Deleted Patch to save website resources
Patches to wxSmith for wxWidgets 2.9.0
File wx290_wxSmith_wxAPI-unix.patch patches the wxWidgets 2.9.0 changes
that are not related to wxPropertyGrid or POD warnings.
File wx290_wxSmith_pgAPI-unix.patch patches the wxPropertyGrid changes in wxWidgets 2.9.0.
File wx290_wxSmith_wxAPI_POD-unix.patch patches the cause of POD warnings.
Tim S
Deleted Patches to save website resources
Patch needed for building using CygWin. Tim S
Index: codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h
===================================================================
--- codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h (revision 5593)
+++ codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h (working copy)
@@ -2067,7 +2067,9 @@
//----------------------------------------------------------------------
+#if !wxCHECK_VERSION(2, 9, 0)
typedef long wxIntPtr; // FIXME: back-port from wx29 (svn) to wx289
+#endif
class WXDLLIMPEXP_SCI wxScintilla : public wxControl {
public:
Patch needed for lib_finder
Index: src/plugins/contrib/lib_finder/lib_finder.cpp
===================================================================
--- src/plugins/contrib/lib_finder/lib_finder.cpp (revision 5585)
+++ src/plugins/contrib/lib_finder/lib_finder.cpp (working copy)
@@ -515,7 +515,11 @@
wxURL UrlData(Url);
if ( !UrlData.IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.c_str()));
+ #endif
continue;
}
UrlData.SetProxy( ConfigManager::GetProxy() );
@@ -523,7 +527,11 @@
wxInputStream* is = UrlData.GetInputStream();
if ( !is || !is->IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.c_str()));
+ #endif
delete is;
continue;
}
@@ -531,7 +539,11 @@
wxFileOutputStream Output(FileName);
if ( !Output.IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't write to file '%s'"),FileName.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't write to file '%s'"),FileName.c_str()));
+ #endif
delete is;
return false;
}
@@ -542,7 +554,11 @@
return ret;
}
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't find suitable download url for '%s'"),ShortCode.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't find suitable download url for '%s'"),ShortCode.c_str()));
+ #endif
return false;
}
Index: src/plugins/contrib/lib_finder/defsdownloaddlg.cpp
===================================================================
--- src/plugins/contrib/lib_finder/defsdownloaddlg.cpp (revision 5585)
+++ src/plugins/contrib/lib_finder/defsdownloaddlg.cpp (working copy)
@@ -112,7 +112,11 @@
wxURL UrlData(Url);
if ( !UrlData.IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.c_str()));
+ #endif
continue;
}
UrlData.SetProxy( ConfigManager::GetProxy() );
@@ -120,7 +124,11 @@
std::auto_ptr< wxInputStream > is ( UrlData.GetInputStream() );
if ( !is.get() || !is->IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.c_str()));
+ #endif
continue;
}
@@ -137,7 +145,11 @@
TiXmlDocument doc;
if ( !doc.Parse( (const char*) memory.GetOutputStreamBuffer()->GetBufferStart() ) )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid XML data in '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid XML data in '%s'"),Url.c_str()));
+ #endif
continue;
}
Patch needed for envvars
Index: src/plugins/contrib/envvars/envvars_common.cpp
===================================================================
--- src/plugins/contrib/envvars/envvars_common.cpp (revision 5598)
+++ src/plugins/contrib/envvars/envvars_common.cpp (working copy)
@@ -165,7 +165,11 @@
if (!active_set_cfg.IsEmpty())
active_set = active_set_cfg;
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Obtained '%s' as active envvar set from config."), active_set.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Obtained '%s' as active envvar set from config."), active_set.c_str());
+ #endif
return active_set;
}// GetActiveSetName
@@ -213,7 +217,11 @@
#endif
wxArrayString envvars;
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Searching for envvars in path '%s'."), set_path.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Searching for envvars in path '%s'."), set_path.c_str());
+ #endif
ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("envvars"));
if (!cfg || set_path.IsEmpty())
@@ -230,7 +238,11 @@
EV_DBGLOG(_T("EnvVars: Warning: empty envvar detected and skipped."));
}
EV_DBGLOG(_T("EnvVars: Read %d/%d envvars in path '%s'."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ envvars.GetCount(), num_envvars, set_path.wx_str());
+ #else
envvars.GetCount(), num_envvars, set_path.c_str());
+ #endif
return envvars;
}// GetEnvvarsBySetPath
@@ -346,9 +358,19 @@
if (!wxUnsetEnv(the_key))
{
Manager::Get()->GetLogManager()->Log(F(
- _("Unsetting environment variable '%s' failed."), the_key.c_str()));
+ _("Unsetting environment variable '%s' failed."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ the_key.wx_str())
+ #else
+ the_key.c_str())
+ #endif
+ );
EV_DBGLOG(_T("EnvVars: Unsetting environment variable '%s' failed."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ the_key.wx_str());
+ #else
the_key.c_str());
+ #endif
return false;
}
@@ -386,7 +408,11 @@
if (value_set.Contains(recursion))
{
EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed "
+ #if wxCHECK_VERSION(2, 9, 0)
+ "due to unsresolvable recursion."), the_key.wx_str());
+ #else
"due to unsresolvable recursion."), the_key.c_str());
+ #endif
if (lstEnvVars && (sel>=0))
lstEnvVars->Check(sel, false); // Unset to visualise it's NOT set
return false;
@@ -396,10 +422,18 @@
}
Manager::Get()->GetMacrosManager()->ReplaceMacros(the_value);
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Trying to set environment variable '%s' to value '%s'..."), the_key.wx_str(), the_value.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Trying to set environment variable '%s' to value '%s'..."), the_key.c_str(), the_value.c_str());
+ #endif
if (!wxSetEnv(the_key, the_value))
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed."), the_key.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed."), the_key.c_str());
+ #endif
if (lstEnvVars && (sel>=0))
lstEnvVars->Check(sel, false); // Unset to visualise it's NOT set
return false;
@@ -470,14 +504,22 @@
if (!even_if_active && set_to_apply.IsSameAs(last_set_applied))
{
EV_DBGLOG(_T("EnvVars: Set '%s' will not be applied (already active)."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_to_apply.wx_str());
+ #else
set_to_apply.c_str());
+ #endif
return;
}
// Show currently activated set in debug log (for reference)
wxString set_path = nsEnvVars::GetSetPathByName(set_to_apply);
EV_DBGLOG(_T("EnvVars: Active envvar set is '%s', config path '%s'."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_to_apply.wx_str(), set_path.wx_str());
+ #else
set_to_apply.c_str(), set_path.c_str());
+ #endif
// Read and apply all envvars from currently active set in config
wxArrayString vars = nsEnvVars::GetEnvvarsBySetPath(set_path);
@@ -490,8 +532,14 @@
if (nsEnvVars::EnvvarArrayApply(var_array))
envvars_applied++;
else
+ {
EV_DBGLOG(_T("EnvVars: Invalid envvar in '%s' at position #%d."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_path.wx_str(), i);
+ #else
set_path.c_str(), i);
+ #endif
+ }
}// for
if (envvars_total>0)
@@ -522,7 +570,11 @@
// Show currently activated set in debug log (for reference)
wxString set_path = nsEnvVars::GetSetPathByName(set_to_discard);
EV_DBGLOG(_T("EnvVars: Active envvar set is '%s', config path '%s'."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_to_discard.wx_str(), set_path.wx_str());
+ #else
set_to_discard.c_str(), set_path.c_str());
+ #endif
// Read and apply all envvars from currently active set in config
wxArrayString vars = nsEnvVars::GetEnvvarsBySetPath(set_path);
@@ -540,8 +592,14 @@
envvars_discarded++;
}
else
+ {
EV_DBGLOG(_T("EnvVars: Invalid envvar in '%s' at position #%d."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_path.wx_str(), i);
+ #else
set_path.c_str(), i);
+ #endif
+ }
}// for
if (envvars_total>0)
Quote from: stahta01 on June 19, 2009, 02:03:41 AM
Patch needed for lib_finder
For this patch I receive:
patching file "src/plugins/contrib/lib_finder/lib_finder.cpp"
patching file "src/plugins/contrib/lib_finder/defsdownloaddlg.cpp"
patch unexpectedly ends in middle of linePlease try to re-submit.
Quote from: stahta01 on June 19, 2009, 02:04:39 AM
Patch needed for envvars
Applied in trunk. I've taken that one because I am testing a new version of this plugin currently. Thanks!
Attached patch to message for lib_finder Deleted to space space.
Tim S
Quote from: stahta01 on June 19, 2009, 05:42:03 PM
Attached patch to message for lib_finder
Applied. Now in trunk.
Submitted big patch for wxSmith here
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=2778&group_id=5358
Tim S
Small un-guarded patch here is also needed to wxSmith
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp (revision 5658)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp (working copy)
@@ -48,7 +48,7 @@
{
for ( size_t i=FileName.Length(); i-->0; )
{
- switch ( FileName[i] )
+ switch ( int(FileName[i]) )
{
case _T('/'):
case _T('\\'):
@@ -63,7 +63,7 @@
{
for ( size_t i=FileName.Length(); i-->0; )
{
- switch ( FileName[i] )
+ switch ( int(FileName[i]) )
{
case _T('/'):
case _T('\\'):
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp (revision 5658)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp (working copy)
@@ -39,10 +39,10 @@
_T("#include \"$(Include)\"\n")
_T("\n")
_T("$(InternalHeadersPch)")
- + wxsCodeMarks::Beg(wxsCPP,_T("InternalHeaders"),_T("$(ClassName)")) + _T("\n") +
+ + wxsCodeMarks::Beg(wxsCPP,_T("InternalHeaders"),_T("$(ClassName)")) + _T("\n")
+ wxsCodeMarks::End(wxsCPP) + _T("\n")
_T("\n")
- + wxsCodeMarks::Beg(wxsCPP,_T("IdInit"),_T("$(ClassName)")) + _T("\n") +
+ + wxsCodeMarks::Beg(wxsCPP,_T("IdInit"),_T("$(ClassName)")) + _T("\n")
+ wxsCodeMarks::End(wxsCPP) + _T("\n")
_T("\n")
_T("BEGIN_EVENT_TABLE($(ClassName),$(BaseClassName))\n")