From 346dd7d7565882f2da7e0fb109e32b4fa9e5aeee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 19 Jul 2003 11:52:47 +0000 Subject: [PATCH] fix filenames handling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xmlres.cpp | 9 ++++++--- src/xrc/xmlres.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index 0dc2f8d46f..51bf6c4dd4 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -115,6 +115,9 @@ bool wxXmlResource::Load(const wxString& filemask) fn.Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE); fnd = fn.GetFullPath(); } +#if wxUSE_FILESYSTEM + fnd = wxFileSystem::FileNameToURL(fnd); +#endif } #if wxUSE_FILESYSTEM @@ -328,9 +331,9 @@ void wxXmlResource::UpdateResources() #if !wxUSE_UNICODE && wxUSE_INTL if ( (GetFlags() & wxXRC_USE_LOCALE) == 0 ) { - // In case we are not using wxLocale to translate strings, convert the strings - // GUI's charset. This must not be done when wxXRC_USE_LOCALE is on, because - // it could break wxGetTranslation lookup. + // In case we are not using wxLocale to translate strings, convert the + // strings GUI's charset. This must not be done when wxXRC_USE_LOCALE + // is on, because it could break wxGetTranslation lookup. encoding = wxLocale::GetSystemEncodingName(); } #endif diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 0dc2f8d46f..51bf6c4dd4 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -115,6 +115,9 @@ bool wxXmlResource::Load(const wxString& filemask) fn.Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE); fnd = fn.GetFullPath(); } +#if wxUSE_FILESYSTEM + fnd = wxFileSystem::FileNameToURL(fnd); +#endif } #if wxUSE_FILESYSTEM @@ -328,9 +331,9 @@ void wxXmlResource::UpdateResources() #if !wxUSE_UNICODE && wxUSE_INTL if ( (GetFlags() & wxXRC_USE_LOCALE) == 0 ) { - // In case we are not using wxLocale to translate strings, convert the strings - // GUI's charset. This must not be done when wxXRC_USE_LOCALE is on, because - // it could break wxGetTranslation lookup. + // In case we are not using wxLocale to translate strings, convert the + // strings GUI's charset. This must not be done when wxXRC_USE_LOCALE + // is on, because it could break wxGetTranslation lookup. encoding = wxLocale::GetSystemEncodingName(); } #endif