Ticket #40390: patch-wxWidgets29-compatibility.diff

File patch-wxWidgets29-compatibility.diff, 7.2 KB (added by mojca (Mojca Miklavec), 11 years ago)

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

  • src/plugins/contrib/NassiShneiderman/NassiView.cpp

    old new void NassiView::DragStart() 
    10481048
    10491049    if ( dataptr )
    10501050    {
    1051         #if defined(__WXMSW__)
    1052             wxCursor copycursor(dnd_copy_cur_xpm);
    1053             wxCursor movecursor(dnd_move_cur_xpm);
    1054             wxCursor nonecursor(dnd_none_cur_xpm);
    1055         #else
    1056             wxIcon copycursor(dnd_copy_cur_xpm);
    1057             wxIcon movecursor(dnd_move_cur_xpm);
    1058             wxIcon nonecursor(dnd_none_cur_xpm);
    1059         #endif
    1060         //wxDragResult result;
    1061 
     1051        // #if defined(__WXMSW__)
     1052        //     wxCursor copycursor(dnd_copy_cur_xpm);
     1053        //     wxCursor movecursor(dnd_move_cur_xpm);
     1054        //     wxCursor nonecursor(dnd_none_cur_xpm);
     1055        // #else
     1056        //     wxIcon copycursor(dnd_copy_cur_xpm);
     1057        //     wxIcon movecursor(dnd_move_cur_xpm);
     1058        //     wxIcon nonecursor(dnd_none_cur_xpm);
     1059        // #endif
     1060        // wxDragResult result;
     1061        wxCursor copycursor(dnd_copy_cur_xpm);
     1062        wxCursor movecursor(dnd_move_cur_xpm);
     1063        wxCursor nonecursor(dnd_none_cur_xpm);
     1064
     1065        // wxDropSource dndSource(m_diagramwindow, wxDROP_ICON(dnd_copy_cur_xpm), wxDROP_ICON(dnd_move_cur_xpm), wxDROP_ICON(dnd_none_cur_xpm));
    10621066        wxDropSource dndSource(m_diagramwindow, copycursor, movecursor, nonecursor);
    10631067        dndSource.SetData(*dataptr);
    10641068        //dndSource.SetData(myData);
  • src/plugins/contrib/codesnippets/codesnippetsapp.cpp

    old new BEGIN_EVENT_TABLE(CodeSnippetsApp, wxApp) 
    9595END_EVENT_TABLE()
    9696
    9797#ifdef __WXMAC__
    98     #include "wx/mac/corefoundation/cfstring.h"
     98    #include "wx/osx/core/cfstring.h"
    9999    #include "wx/intl.h"
    100100
    101101    #include <CoreFoundation/CFBundle.h>
    END_EVENT_TABLE() 
    112112        CFRelease(resourcesURL);
    113113        CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
    114114        CFRelease(absoluteURL);
    115         return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     115        return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
    116116    }
    117117#endif
    118118
    void CodeSnippetsAppFrame::InitCodeSnippetsAppFrame(wxFrame *frame, const wxStri 
    268268    m_KeepAliveFileName = wxEmptyString;
    269269    m_pFilesHistory = 0;
    270270
    271     wxStandardPaths stdPaths;
    272 
    273271    // -------------------------------
    274272    // initialize version and logging
    275273    // -------------------------------
    void CodeSnippetsAppFrame::InitCodeSnippetsAppFrame(wxFrame *frame, const wxStri 
    325323    // Find Config File
    326324    // -----------------------------------------
    327325    // Create filename like {%HOME%}\codesnippets.ini
    328     m_ConfigFolder = Normalize(stdPaths.GetUserDataDir());
     326    m_ConfigFolder = Normalize(wxStandardPaths::Get().GetUserDataDir());
    329327    wxString m_ExecuteFolder = Normalize(FindAppPath(wxTheApp->argv[0], ::wxGetCwd(), wxEmptyString));
    330328
    331329    #if defined(LOGGING)
    int CodeSnippetsAppFrame::ParseCmdLine(wxFrame* handlerFrame) 
    13871385void CodeSnippetsAppFrame::ImportCBResources()
    13881386// ----------------------------------------------------------------------------
    13891387{
    1390     wxStandardPaths stdPaths;
    1391 
    13921388    // Location of app config folder
    13931389    wxString appConfigFolder =  Normalize(m_ConfigFolder) ;
    13941390
    void CodeSnippetsAppFrame::ImportCBResources() 
    13991395    wxString cbExeFolder = Normalize(GetCBExeFolder());
    14001396
    14011397    // location of CodeBlocks config folder
    1402     wxString cbConfigFolder = Normalize(stdPaths.GetUserDataDir());
     1398    wxString cbConfigFolder = Normalize(wxStandardPaths::Get().GetUserDataDir());
    14031399    wxString appParent = GetConfig()->GetAppParent();
    14041400    if ( appParent.empty()) appParent =_T("codeblocks");
    14051401    wxString prefixPath;
  • src/plugins/contrib/codesnippets/snippetsconfig.cpp

    old new void CodeSnippetsConfig::SettingsLoad() 
    128128{
    129129        // file will be saved in $HOME/codesnippets.ini
    130130
    131     wxStandardPaths stdPaths;
    132 
    133131    #ifdef LOGGING
    134132     wxString fn(__FUNCTION__, wxConvUTF8);
    135133     LOGIT( _T("--- [%s] ---"),fn.c_str() );
  • src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/AngularRegulator.h

    old new  
    1111//
    1212/////////////////////////////////////////////////////////////////////////////
    1313
     14#include <wx/control.h>
    1415
    1516const int kwxEVT_ANGREG_FIRST = wxEVT_FIRST + 5402;
    1617
  • src/plugins/contrib/wxContribItems/KWIC/include/wx/KWIC/LinearRegulator.h

    old new  
    1111//
    1212/////////////////////////////////////////////////////////////////////////////
    1313
     14#include <wx/control.h>
    1415
    1516const int kwxEVT_LINEARREG_FIRST = wxEVT_FIRST + 5401;
    1617
  • src/plugins/contrib/wxContribItems/wxTreeList/src/treelistctrl.cpp

    old new bool wxTreeListMainWindow::Create (wxTreeListCtrl *parent, 
    20212021                                   const wxString& name) {
    20222022
    20232023#ifdef __WXMAC__
    2024     if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS;
    2025     if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS;
     2024    // if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS;
     2025    // if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS;
    20262026    style &= ~wxTR_LINES_AT_ROOT;
    20272027    style |= wxTR_NO_LINES;
    20282028
  • src/sdk/configmanager.cpp

    old new  
    3636#endif
    3737
    3838#ifdef __WXMAC__
    39 #include "wx/mac/corefoundation/cfstring.h"
     39#include "wx/osx/core/cfstring.h"
    4040#include "wx/intl.h"
    4141
    4242#include <CoreFoundation/CFBundle.h>
    namespace 
    121121            CFRelease(resourcesURL);
    122122            CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
    123123            CFRelease(absoluteURL);
    124             wxString str = wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     124            wxString str = wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
    125125            if (!str.Contains(wxString(_T("/Resources"))))
    126126               return ::DetermineExecutablePath() + _T("/.."); // not a bundle, use relative path
    127127            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 BEGIN_EVENT_TABLE(CodeBlocksApp, wxApp) 
    271271END_EVENT_TABLE()
    272272
    273273#ifdef __WXMAC__
    274 #include "wx/mac/corefoundation/cfstring.h"
     274#include "wx/osx/core/cfstring.h"
    275275#include "wx/intl.h"
    276276
    277277#include <CoreFoundation/CFBundle.h>
    static wxString GetResourcesDir() 
    286286    CFRelease(resourcesURL);
    287287    CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle);
    288288    CFRelease(absoluteURL);
    289     return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding());
     289    return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding());
    290290}
    291291#endif
    292292