Patch #1969 2007-04-17 19:46

stahta01

codesnippets patch for wxWidgets 2.8
Download
1969-codesnippets_p.patch (1.6 KB)
Category
Plugin::Refinement
Status
Closed
Close date
2007-05-08 18:48
Assigned to
 
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp    (revision 3869)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp    (working copy)
@@ -97,14 +97,14 @@
    #endif
 
     wxWindow* pw = this;
-    LOGIT( _T("this[%s]Title[%s]"),pw->GetName().c_str(),pw->GetTitle().c_str() );
+    LOGIT( _T("this[%s]Title[%s]"),pw->GetName().c_str(),pw->GetLabel().c_str() );
     if (pw && pw->GetParent()) //
     {   pw = pw->GetParent();
-        LOGIT( _T("parent1[%s]Title[%s]"),pw->GetName().c_str(),pw->GetTitle().c_str() );
+        LOGIT( _T("parent1[%s]Title[%s]"),pw->GetName().c_str(),pw->GetLabel().c_str() );
     }
     if (pw && pw->GetParent())  //This is the SnippetWindow parent
     {   pw = pw->GetParent();
-        LOGIT( _T("parent2[%s]Title[%s]"),pw->GetName().c_str(),pw->GetTitle().c_str() );
+        LOGIT( _T("parent2[%s]Title[%s]"),pw->GetName().c_str(),pw->GetLabel().c_str() );
     }
 
 //    m_pSnippetWindowParent = pw;
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.h
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.h    (revision 3869)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.h    (working copy)
@@ -40,7 +40,7 @@
 #endif
 
 WX_DEFINE_ARRAY(wxDialog*, DlgPtrArray);
-WX_DEFINE_ARRAY(int, DlgRetcodeArray);
+WX_DEFINE_ARRAY_INT(int, DlgRetcodeArray);
 
 // ----------------------------------------------------------------------------
 class CodeSnippetsTreeCtrl : public wxTreeCtrl
stahta01 2007-04-17 19:53
Filename: wx28_codesnippets-unix.patch
Purpose: To enable CB codesnippets plugin to compile using wxWidgets 2.8 with 2.6 compatible mode enabled.
Reference: wx/window.h from wxWidgets 2.6.4
        // 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).

Problem: GetTitle no longer supported by class wxWindow.

Solution: Changed GetTitle to GetLabel.
stahta01 2007-04-18 12:28

Note: The Code using GetTitle has been commented out by someone like they are working on a new solution, so hold off on using this patch. Tim S

stahta01 2007-04-18 19:04

Update to SVN 3869

Tim S

Replaced WX_DEFINE_ARRAY with WX_DEFINE_ARRAY_INT

Reference: docs/changes.txt in wxWidgets 2.8 cvs

! wxArray<T> macros have been changed to fix runtime problems under 64 bit

architectures and as a side effect of this WX_DEFINE_ARRAY() can only be

used now for the pointer types, WX_DEFINE_ARRAY_INT should be used for the

arrays containing non-pointers.

stahta01 2007-04-23 15:50

HOLD OFF: This patch needs updating again to match SVN.

Tim S

stahta01 2007-04-27 15:32

This patch can be closed; the code has been patched or commented out already in SVN.

Tim S