Patch #1915 2007-03-01 17:51

stahta01

Patch Debugger plugin for wxW28 with disable_compat26
Download
1915-Patch_Debugger.patch (1.4 KB)
Category
Plugin::Refinement
Status
Accepted
Close date
2007-03-27 11:01
Assigned to
 
Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp    (revision 3652)
+++ src/plugins/debuggergdb/debuggergdb.cpp    (working copy)
@@ -662,7 +662,11 @@
     wxString binPath = pathList.FindAbsoluteValidPath(gdb);
     // it seems, under Win32, the above command doesn't search in paths with spaces...
     // look directly for the file in question in masterPath
+#if wxCHECK_VERSION(2, 8, 0)
+    if (binPath.IsEmpty() || !(pathList.Index(wxPathOnly(binPath)) != wxNOT_FOUND))
+#else
     if (binPath.IsEmpty() || !pathList.Member(wxPathOnly(binPath)))
+#endif
     {
         if (wxFileExists(masterPath + wxFILE_SEP_PATH + _T("bin") + wxFILE_SEP_PATH + gdb))
             binPath = masterPath + wxFILE_SEP_PATH + _T("bin");
Index: src/plugins/debuggergdb/gdb_tipwindow.cpp
===================================================================
--- src/plugins/debuggergdb/gdb_tipwindow.cpp    (revision 3652)
+++ src/plugins/debuggergdb/gdb_tipwindow.cpp    (working copy)
@@ -536,7 +536,11 @@
     const wxRect& rectBound = m_parent->m_rectBound;
 
     if ( rectBound.width &&
+#if wxCHECK_VERSION(2, 8, 0)
+            !rectBound.Contains(ClientToScreen(event.GetPosition())) )
+#else
             !rectBound.Inside(ClientToScreen(event.GetPosition())) )
+#endif
     {
         // mouse left the bounding rect, disappear
         m_parent->Close();
stahta01 2007-03-01 17:53

Filename: disable_compat26_debugger-unix.patch

Purpose: Change Debugger plugin files to improve support for wxWidgets 2.8 with option disable_compat26.

Problem 1: Method Member was removed.

Reference 1: wx/filefn.h; src/common/filefn.cpp

Solution 1: Use #if/else/endif block with Method Member(?) and Index(?) != wxNOT_FOUND;

Problem 2: Depreciated method wxRect::Inside replaced by wxRect::Contains.

Reference 2: wx/gdicmn.h

Solution 2: Use #if/else/endif block with method Inside and Contains.

mandrav 2007-03-27 11:01

Patch applied.