From: Václav Slavík Date: Fri, 16 Jul 2004 22:01:47 +0000 (+0000) Subject: added wxXRC_NO_RELOADING X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/648db587c45e378a91975154a56fdc1879900b80?hp=31ad423e4fb556ec225a63b161154d3bf3445c1b added wxXRC_NO_RELOADING git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h index 76dbd1e972..198efa7a7e 100644 --- a/contrib/include/wx/xrc/xmlres.h +++ b/contrib/include/wx/xrc/xmlres.h @@ -93,7 +93,8 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, enum wxXmlResourceFlags { wxXRC_USE_LOCALE = 1, - wxXRC_NO_SUBCLASSING = 2 + wxXRC_NO_SUBCLASSING = 2, + wxXRC_NO_RELOADING = 4 }; // This class holds XML resources from one or more .xml files diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index e392d946e2..6e826ff82c 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -343,7 +343,7 @@ bool wxXmlResource::UpdateResources() { modif = (m_data[i].Doc == NULL); - if (!modif) + if (!modif && !(m_flags & wxXRC_NO_RELOADING)) { # if wxUSE_FILESYSTEM file = fsys.OpenFile(m_data[i].File); @@ -362,6 +362,9 @@ bool wxXmlResource::UpdateResources() if (modif) { + wxLogTrace(_T("xrc"), + _T("opening file '%s'"), m_data[i].File.c_str()); + wxInputStream *stream = NULL; # if wxUSE_FILESYSTEM diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 76dbd1e972..198efa7a7e 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -93,7 +93,8 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, enum wxXmlResourceFlags { wxXRC_USE_LOCALE = 1, - wxXRC_NO_SUBCLASSING = 2 + wxXRC_NO_SUBCLASSING = 2, + wxXRC_NO_RELOADING = 4 }; // This class holds XML resources from one or more .xml files diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index e392d946e2..6e826ff82c 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -343,7 +343,7 @@ bool wxXmlResource::UpdateResources() { modif = (m_data[i].Doc == NULL); - if (!modif) + if (!modif && !(m_flags & wxXRC_NO_RELOADING)) { # if wxUSE_FILESYSTEM file = fsys.OpenFile(m_data[i].File); @@ -362,6 +362,9 @@ bool wxXmlResource::UpdateResources() if (modif) { + wxLogTrace(_T("xrc"), + _T("opening file '%s'"), m_data[i].File.c_str()); + wxInputStream *stream = NULL; # if wxUSE_FILESYSTEM