From 648db587c45e378a91975154a56fdc1879900b80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 16 Jul 2004 22:01:47 +0000 Subject: [PATCH 1/1] added wxXRC_NO_RELOADING git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/xrc/xmlres.h | 3 ++- contrib/src/xrc/xmlres.cpp | 5 ++++- include/wx/xrc/xmlres.h | 3 ++- src/xrc/xmlres.cpp | 5 ++++- 4 files changed, 12 insertions(+), 4 deletions(-) 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 -- 2.45.2