Ticket #40390: patch-wxWidgets30-compatibility-core.diff

File patch-wxWidgets30-compatibility-core.diff, 2.0 KB (added by mojca (Mojca Miklavec), 11 years ago)

some patches for compatibility of Code::Blocks core with wxWidgets 2.9

  • src/sdk/configmanager.cpp

    old new  
    3636#endif
    3737
    3838#ifdef __WXMAC__
     39#if wxCHECK_VERSION(2,9,0)
     40#include "wx/osx/core/cfstring.h"
     41#else
    3942#include "wx/mac/corefoundation/cfstring.h"
     43#endif
    4044#include "wx/intl.h"
    4145
    4246#include <CoreFoundation/CFBundle.h>
     
    121125            CFRelease(resourcesURL);
    122126            CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
    123127            CFRelease(absoluteURL);
    124             wxString str = wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     128            #if wxCHECK_VERSION(2,9,0)
     129              wxString str = wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     130            #else
     131              wxString str = wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     132            #endif
    125133            if (!str.Contains(wxString(_T("/Resources"))))
    126134               return ::DetermineExecutablePath() + _T("/.."); // not a bundle, use relative path
    127135            return str;
  • src/sdk/xtra_res.cpp

    old new  
    1515    #include <wx/wx.h>
    1616#endif
    1717
     18#include <wx/xml/xml.h>
    1819
    1920/////////////////////////////////////////////////////////////////////////////
    2021// Name:        xh_toolb.cpp
  • src/src/app.cpp

    old new  
    271271END_EVENT_TABLE()
    272272
    273273#ifdef __WXMAC__
     274#if wxCHECK_VERSION(2,9,0)
     275#include "wx/osx/core/cfstring.h"
     276#else
    274277#include "wx/mac/corefoundation/cfstring.h"
     278#endif
    275279#include "wx/intl.h"
    276280
    277281#include <CoreFoundation/CFBundle.h>
     
    286290    CFRelease(resourcesURL);
    287291    CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
    288292    CFRelease(absoluteURL);
    289     return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     293    #if wxCHECK_VERSION(2,9,0)
     294      return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     295    #else
     296      return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     297    #endif
    290298}
    291299#endif
    292300