Ticket #40390: patch-wxWidgets30-compatibility-plugins-codesnippets.diff
File patch-wxWidgets30-compatibility-plugins-codesnippets.diff, 2.6 KB (added by mojca (Mojca Miklavec), 11 years ago) |
---|
-
src/plugins/contrib/codesnippets/codesnippetsapp.cpp
old new 95 95 END_EVENT_TABLE() 96 96 97 97 #ifdef __WXMAC__ 98 #include "wx/mac/corefoundation/cfstring.h" 98 #if wxCHECK_VERSION(2,9,0) 99 #include "wx/osx/core/cfstring.h" 100 #else 101 #include "wx/mac/corefoundation/cfstring.h" 102 #endif 99 103 #include "wx/intl.h" 100 104 101 105 #include <CoreFoundation/CFBundle.h> … … 112 116 CFRelease(resourcesURL); 113 117 CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kCFURLPOSIXPathStyle); 114 118 CFRelease(absoluteURL); 115 return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding()); 119 #if wxCHECK_VERSION(2,9,0) 120 return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding()); 121 #else 122 return wxMacCFStringHolder(cfStrPath).AsString(wxLocale::GetSystemEncoding()); 123 #endif 116 124 } 117 125 #endif 118 126 … … 268 276 m_KeepAliveFileName = wxEmptyString; 269 277 m_pFilesHistory = 0; 270 278 271 wxStandardPaths stdPaths;272 273 279 // ------------------------------- 274 280 // initialize version and logging 275 281 // ------------------------------- … … 325 331 // Find Config File 326 332 // ----------------------------------------- 327 333 // Create filename like {%HOME%}\codesnippets.ini 328 m_ConfigFolder = Normalize( stdPaths.GetUserDataDir());334 m_ConfigFolder = Normalize(wxStandardPaths::Get().GetUserDataDir()); 329 335 wxString m_ExecuteFolder = Normalize(FindAppPath(wxTheApp->argv[0], ::wxGetCwd(), wxEmptyString)); 330 336 331 337 #if defined(LOGGING) … … 1387 1393 void CodeSnippetsAppFrame::ImportCBResources() 1388 1394 // ---------------------------------------------------------------------------- 1389 1395 { 1390 wxStandardPaths stdPaths;1391 1392 1396 // Location of app config folder 1393 1397 wxString appConfigFolder = Normalize(m_ConfigFolder) ; 1394 1398 … … 1399 1403 wxString cbExeFolder = Normalize(GetCBExeFolder()); 1400 1404 1401 1405 // location of CodeBlocks config folder 1402 wxString cbConfigFolder = Normalize( stdPaths.GetUserDataDir());1406 wxString cbConfigFolder = Normalize(wxStandardPaths::Get().GetUserDataDir()); 1403 1407 wxString appParent = GetConfig()->GetAppParent(); 1404 1408 if ( appParent.empty()) appParent =_T("codeblocks"); 1405 1409 wxString prefixPath; -
src/plugins/contrib/codesnippets/snippetsconfig.cpp
old new 128 128 { 129 129 // file will be saved in $HOME/codesnippets.ini 130 130 131 wxStandardPaths stdPaths;132 133 131 #ifdef LOGGING 134 132 wxString fn(__FUNCTION__, wxConvUTF8); 135 133 LOGIT( _T("--- [%s] ---"),fn.c_str() );