Patch #1736 2006-12-18 23:51

stahta01

compilergcc patch for wxWidgets 2.8
Download
1736-compilergcc_pa.patch (1.9 KB)
Category
Plugin::Refinement
Status
Closed
Close date
2006-12-27 10:41
Assigned to
killerbot
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, 8, 0)
+    this->Centre(wxBOTH | wxCENTRE_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();
stahta01 2006-12-18 23:59

Problem 1: wxLogNull is not defined unless <wx/log.h> is included.

Solution: Added #include <wx/log.h>

Change 2: wxWindow::SetTitle is valid only on only to frames and dialogs.

Problem 2: wxWidgets 2.8.0 is now enforcing this fact, you must use wxWindow::SetLabel instead.

Solution 2: Changed SetTitle to SetLabel.

Change 3: wxWindow::CentreOnScreen is no longer valid under wxWidgets 2.8.0.

Solution 3: Changed CentreOnScreen to Centre(wxCENTER_ON_SCREEN)

Tim S

stahta01 2006-12-27 01:28

Changed wxCENTER_ON_SCREEN to wxCENTRE_ON_SCREEN

stahta01 2006-12-27 01:58

Using Centre(wxBOTH | wxCENTRE_ON_SCREEN) in patch now. Tim S

killerbot 2006-12-27 10:41

applied : rev 3427