diff options
author | Luis Ibanez <luis.ibanez@kitware.com> | 2001-06-11 01:36:04 (GMT) |
---|---|---|
committer | Luis Ibanez <luis.ibanez@kitware.com> | 2001-06-11 01:36:04 (GMT) |
commit | 6d04ee9ec175f129baefd226436fcd9c539eafaa (patch) | |
tree | 9b3f1918dba64bc13f9ce567963ccf7eed6b24c0 /Source/FLTKDialog | |
parent | 8f412df3f560645cf83e2dcba3a310bff6c8b355 (diff) | |
download | CMake-6d04ee9ec175f129baefd226436fcd9c539eafaa.zip CMake-6d04ee9ec175f129baefd226436fcd9c539eafaa.tar.gz CMake-6d04ee9ec175f129baefd226436fcd9c539eafaa.tar.bz2 |
ENH: Cache saving added
Diffstat (limited to 'Source/FLTKDialog')
-rw-r--r-- | Source/FLTKDialog/CMakeSetupGUIImplementation.cxx | 32 | ||||
-rw-r--r-- | Source/FLTKDialog/CMakeSetupGUIImplementation.h | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx index 330e1ac..64d2ce4 100644 --- a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx @@ -7,6 +7,7 @@ #include "../cmCacheManager.h" #include "../cmMakefile.h" #include <iostream> +#include "FLTKPropertyList.h" @@ -254,6 +255,12 @@ void CMakeSetupGUIImplementation ::SaveCacheFromGUI( void ) { + this->FillCacheManagerFromCacheGUI(); + if( m_WhereBuild != "" ) + { + cmCacheManager::GetInstance()->SaveCache( + m_WhereBuild.c_str() ); + } } @@ -341,3 +348,28 @@ CMakeSetupGUIImplementation +/** + * Fill cache manager from Cache GUI + */ +void +CMakeSetupGUIImplementation +::FillCacheManagerFromCacheGUI( void ) +{ + cmCacheManager::GetInstance()->GetCacheMap(); + std::set<fltk::PropertyItem*> items = m_CacheEntriesList.GetItems(); + for(std::set<fltk::PropertyItem*>::iterator i = items.begin(); + i != items.end(); ++i) + { + fltk::PropertyItem* item = *i; + cmCacheManager::CacheEntry *entry = + cmCacheManager::GetInstance()->GetCacheEntry( + (const char*)item->m_propName.c_str() ); + if (entry) + { + entry->m_Value = item->m_curValue; + } + } + +} + + diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.h b/Source/FLTKDialog/CMakeSetupGUIImplementation.h index 5149ee6..870f052 100644 --- a/Source/FLTKDialog/CMakeSetupGUIImplementation.h +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.h @@ -33,6 +33,7 @@ public: virtual void SaveCacheFromGUI( void ); virtual void LoadCacheFromDiskToGUI( void ); virtual void FillCacheGUIFromCacheManager( void ); + virtual void FillCacheManagerFromCacheGUI( void ); private: fltk::PropertyList m_CacheEntriesList; |