Patch #1618 2006-11-03 10:41
stahta01
Patch to help codeblock compile against wxWidgets 2.7- Download
- 1618-Patch_to_help.patch (1.9 KB)
Index: src/plugins/compilergcc/compilerCYGWIN.cpp
===================================================================
--- src/plugins/compilergcc/compilerCYGWIN.cpp (revision 3392)
+++ src/plugins/compilergcc/compilerCYGWIN.cpp (working copy)
@@ -3,6 +3,7 @@
#include "compilerCYGWIN.h"
#include <wx/filefn.h>
#include <wx/msw/registry.h>
+#include <wx/log.h>
CompilerCYGWIN::CompilerCYGWIN()
: CompilerMINGW(_("Cygwin GCC"), _T("cygwin"))
Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp (revision 3334)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp (working copy)
@@ -243,7 +243,7 @@
if (!m_pProject)
{
// global settings
- SetTitle(_("Compiler Settings"));
+ SetLabel(_("Compiler Settings"));
sizer->Show(tree,false);
sizer->Remove(tree);
wxNotebook* nb = XRCCTRL(*this, "nbMain", wxNotebook);
@@ -344,7 +344,11 @@
this->SetSizeHints(min_width+140,min_height,-1,-1);
#endif
this->SetSize(-1, -1, 0, 0);
+#if wxCHECK_VERSION(2, 7, 0)
+ this->Centre(wxCENTER_ON_SCREEN);
+#else
this->CentreOnScreen();
+#endif
} // end of constructor
CompilerOptionsDlg::~CompilerOptionsDlg()
@@ -740,7 +744,7 @@
if (!m_pTarget)
{
// project options
- SetTitle(_("Project build options"));
+ SetLabel(_("Project build options"));
IncludeDirs = m_pProject->GetIncludeDirs();
ResDirs = m_pProject->GetResourceIncludeDirs();
LibDirs = m_pProject->GetLibDirs();
@@ -759,7 +763,7 @@
else
{
// target options
- SetTitle(_("Target build options: ") + m_pTarget->GetTitle());
+ SetLabel(_("Target build options: ") + m_pTarget->GetTitle());
IncludeDirs = m_pTarget->GetIncludeDirs();
ResDirs = m_pTarget->GetResourceIncludeDirs();
LibDirs = m_pTarget->GetLibDirs();
History
Attached Patch file is 2 of 4 for patching CodeBlocks to compile against wxWidgets 2.7.0
Note, these patches do NOT have to be applied in any set order or at the same time.
The patch file is named compileroptionsdlg-wx270_2-unix.patch; the -unix means it has unix line ending.
Under 2.7.x
this->CentreOnScreen();
Is replaced by
this->Centre(wxCENTER_ON_SCREEN);
The SetTitle is obsolete except on top level windows (such as dialogs and frames) use SetLabel instead.
Note: I could not find where the label is displayed, so could not test SetLabel under 2.6.3
From wx/window.h (2.6.3 version)
// NB: in future versions of wxWidgets Set/GetTitle() will only work
// with the top level windows (such as dialogs and frames) and
// Set/GetLabel() only with the other ones (i.e. all controls).
Thank You for a great IDE
Tim Stahlhut
Updated patch for SVN changes; compilerCYGWIN.cpp needs to include <wx/log.h> in 2.8 Tim S
PLEASE CLOSE;
Replaced this patch with new 2.8 version. Tim S
See [ Patch #1736 ] compilergcc patch for wxWidgets 2.8
https://developer.berlios.de/patch/?func=detailpatch&patch_id=1736&group_id=5358