Patch #1621 2006-11-03 12:27

stahta01

Patch to help codeblock compile against wxWidgets 2.7
Download
1621-Patch_to_help.patch (1.0 KB)
Category
Application::FeatureAdd
Status
Closed
Close date
2006-12-19 21:22
Assigned to
killerbot
Index: src/sdk/selecttargetdlg.cpp
===================================================================
--- src/sdk/selecttargetdlg.cpp    (revision 3173)
+++ src/sdk/selecttargetdlg.cpp    (working copy)
@@ -92,6 +92,14 @@
 
 // events
 
+#if wxCHECK_VERSION(2, 7, 1)
+void SelectTargetDlg::OnOK(wxCommandEvent& /*event*/)
+{
+    this->wxDialog::SetAffirmativeId(wxID_OK);
+    this->wxDialog::AcceptAndClose();
+} // end of OnOK
+#endif
+
 void SelectTargetDlg::OnListboxSelection(wxCommandEvent& /*event*/)
 {
     UpdateSelected();
Index: src/sdk/selecttargetdlg.h
===================================================================
--- src/sdk/selecttargetdlg.h    (revision 3173)
+++ src/sdk/selecttargetdlg.h    (working copy)
@@ -15,6 +15,9 @@
         void EndModal(int retCode);
         int GetSelection() const { return m_Selected; }
         ProjectBuildTarget* GetSelectionTarget();
+#if wxCHECK_VERSION(2, 7, 1)
+        void OnOK(wxCommandEvent& event);
+#endif
     private:
         void OnListboxSelection(wxCommandEvent& event);
         void OnCheckboxSelection(wxCommandEvent& event);
stahta01 2006-11-03 12:28

Attached Patch file is 1 of ? for patching CodeBlocks to compile against wxWidgets 2.7.1

Note, these patches do NOT have to be applied in any set order or at the same time.

The patch file is named selecttargetdlg-wx271_1-unix.patch; the -unix means it has unix line ending.

See header wx/dialog.h under wxWidgets 2.7.1 many changes made.

The only one that broke C::B was the removal of method wxDialog::OnOK

Code I added to src/sdk/selecttargetdlg.cpp below;

this code may work under wxWidgets 2.7.1, I tried to test it, but not sure it works.

#if wxCHECK_VERSION(2, 7, 1)

void SelectTargetDlg::OnOK(wxCommandEvent& /*event*/)

{

this->wxDialog::SetAffirmativeId(wxID_OK);

this->wxDialog::AcceptAndClose();

} // end of OnOK

#endif

Note: I have NOT tested this patch but I see no way it can break 2.6.3.

(I did do a re-build of codeblocks which might have tested this patch.)

Thank You for a great IDE

Tim Stahlhut

stahta01 2006-12-19 00:17

PLEASE CLOSE;

I have opened an updated wxWidgets 2.8.0 version of this patch. Tim S [ Patch #1737 ] selecttargetdlg patch for wxWidgets 2.8 https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1737&group_id=5358