Commit 62c5e6f1 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'introduce-cmState'

f081c5bd cmState: Move CacheEntryType enum from cmCacheManager.
f71fdf0e cmMakefile: Remove unused CacheManager accessor.
ff7169a0 Port to cmState.
a6b1ad13 Introduce cmState class.
parents 92d61798 f081c5bd
...@@ -329,6 +329,8 @@ set(SRCS ...@@ -329,6 +329,8 @@ set(SRCS
cmSourceFileLocation.h cmSourceFileLocation.h
cmSourceGroup.cxx cmSourceGroup.cxx
cmSourceGroup.h cmSourceGroup.h
cmState.cxx
cmState.h
cmSystemTools.cxx cmSystemTools.cxx
cmSystemTools.h cmSystemTools.h
cmTarget.cxx cmTarget.cxx
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information. See the License for more information.
============================================================================*/ ============================================================================*/
#include "../cmCacheManager.h"
#include "../cmSystemTools.h" #include "../cmSystemTools.h"
#include "../cmake.h" #include "../cmake.h"
#include "../cmDocumentation.h" #include "../cmDocumentation.h"
......
...@@ -16,7 +16,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, ...@@ -16,7 +16,7 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height,
int left, int top) : int left, int top) :
cmCursesWidget(width, height, left, top) cmCursesWidget(width, height, left, top)
{ {
this->Type = cmCacheManager::BOOL; this->Type = cmState::BOOL;
set_field_fore(this->Field, A_NORMAL); set_field_fore(this->Field, A_NORMAL);
set_field_back(this->Field, A_STANDOUT); set_field_back(this->Field, A_STANDOUT);
field_opts_off(this->Field, O_STATIC); field_opts_off(this->Field, O_STATIC);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "cmCursesDummyWidget.h" #include "cmCursesDummyWidget.h"
#include "../cmSystemTools.h" #include "../cmSystemTools.h"
#include "../cmake.h" #include "../cmake.h"
#include "../cmState.h"
#include <assert.h> #include <assert.h>
...@@ -50,11 +51,11 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( ...@@ -50,11 +51,11 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
} }
this->Entry = 0; this->Entry = 0;
const char* value = cm->GetCacheManager()->GetCacheEntryValue(key); const char* value = cm->GetState()->GetCacheEntryValue(key);
assert(value); assert(value);
switch (cm->GetCacheManager()->GetCacheEntryType(key)) switch (cm->GetState()->GetCacheEntryType(key))
{ {
case cmCacheManager::BOOL: case cmState::BOOL:
this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1); this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
if (cmSystemTools::IsOn(value)) if (cmSystemTools::IsOn(value))
{ {
...@@ -65,17 +66,17 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( ...@@ -65,17 +66,17 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false); static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(false);
} }
break; break;
case cmCacheManager::PATH: case cmState::PATH:
this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1); this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1);
static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value); static_cast<cmCursesPathWidget*>(this->Entry)->SetString(value);
break; break;
case cmCacheManager::FILEPATH: case cmState::FILEPATH:
this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1); this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1);
static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value); static_cast<cmCursesFilePathWidget*>(this->Entry)->SetString(value);
break; break;
case cmCacheManager::STRING: case cmState::STRING:
{ {
const char* stringsProp = cm->GetCacheManager() const char* stringsProp = cm->GetState()
->GetCacheEntryProperty(key, "STRINGS"); ->GetCacheEntryProperty(key, "STRINGS");
if(stringsProp) if(stringsProp)
{ {
...@@ -98,7 +99,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( ...@@ -98,7 +99,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
} }
break; break;
} }
case cmCacheManager::UNINITIALIZED: case cmState::UNINITIALIZED:
cmSystemTools::Error("Found an undefined variable: ", cmSystemTools::Error("Found an undefined variable: ",
key.c_str()); key.c_str());
break; break;
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#ifndef cmCursesCacheEntryComposite_h #ifndef cmCursesCacheEntryComposite_h
#define cmCursesCacheEntryComposite_h #define cmCursesCacheEntryComposite_h
#include "../cmCacheManager.h"
#include "cmCursesLabelWidget.h" #include "cmCursesLabelWidget.h"
class cmCursesCacheEntryComposite class cmCursesCacheEntryComposite
......
...@@ -15,7 +15,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, ...@@ -15,7 +15,7 @@ cmCursesDummyWidget::cmCursesDummyWidget(int width, int height,
int left, int top) : int left, int top) :
cmCursesWidget(width, height, left, top) cmCursesWidget(width, height, left, top)
{ {
this->Type = cmCacheManager::INTERNAL; this->Type = cmState::INTERNAL;
} }
......
...@@ -15,6 +15,6 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, ...@@ -15,6 +15,6 @@ cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height,
int left, int top) : int left, int top) :
cmCursesPathWidget(width, height, left, top) cmCursesPathWidget(width, height, left, top)
{ {
this->Type = cmCacheManager::FILEPATH; this->Type = cmState::FILEPATH;
} }
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information. See the License for more information.
============================================================================*/ ============================================================================*/
#include "../cmCacheManager.h"
#include "../cmSystemTools.h" #include "../cmSystemTools.h"
#include "../cmake.h" #include "../cmake.h"
#include "../cmVersion.h" #include "../cmVersion.h"
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information. See the License for more information.
============================================================================*/ ============================================================================*/
#include "../cmCacheManager.h"
#include "../cmSystemTools.h" #include "../cmSystemTools.h"
#include "../cmVersion.h" #include "../cmVersion.h"
#include "../cmake.h" #include "../cmake.h"
...@@ -23,6 +22,7 @@ ...@@ -23,6 +22,7 @@
#include "cmCursesCacheEntryComposite.h" #include "cmCursesCacheEntryComposite.h"
#include "cmCursesLongMessageForm.h" #include "cmCursesLongMessageForm.h"
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmState.h"
inline int ctrl(int z) inline int ctrl(int z)
...@@ -107,21 +107,21 @@ void cmCursesMainForm::InitializeUI() ...@@ -107,21 +107,21 @@ void cmCursesMainForm::InitializeUI()
// which contain labels, entries and new entry markers // which contain labels, entries and new entry markers
std::vector<cmCursesCacheEntryComposite*>* newEntries = std::vector<cmCursesCacheEntryComposite*>* newEntries =
new std::vector<cmCursesCacheEntryComposite*>; new std::vector<cmCursesCacheEntryComposite*>;
newEntries->reserve(this->CMakeInstance->GetCacheManager()->GetSize()); std::vector<std::string> cacheKeys =
this->CMakeInstance->GetState()->GetCacheEntryKeys();
newEntries->reserve(cacheKeys.size());
// Count non-internal and non-static entries // Count non-internal and non-static entries
int count=0; int count=0;
std::vector<std::string> cacheKeys =
this->CMakeInstance->GetCacheManager()->GetCacheEntryKeys();
for(std::vector<std::string>::const_iterator it = cacheKeys.begin(); for(std::vector<std::string>::const_iterator it = cacheKeys.begin();
it != cacheKeys.end(); ++it) it != cacheKeys.end(); ++it)
{ {
cmCacheManager::CacheEntryType t = this->CMakeInstance->GetCacheManager() cmState::CacheEntryType t = this->CMakeInstance->GetState()
->GetCacheEntryType(*it); ->GetCacheEntryType(*it);
if (t != cmCacheManager::INTERNAL && if (t != cmState::INTERNAL &&
t != cmCacheManager::STATIC && t != cmState::STATIC &&
t != cmCacheManager::UNINITIALIZED) t != cmState::UNINITIALIZED)
{ {
++count; ++count;
} }
...@@ -147,11 +147,11 @@ void cmCursesMainForm::InitializeUI() ...@@ -147,11 +147,11 @@ void cmCursesMainForm::InitializeUI()
it != cacheKeys.end(); ++it) it != cacheKeys.end(); ++it)
{ {
std::string key = *it; std::string key = *it;
cmCacheManager::CacheEntryType t = this->CMakeInstance->GetCacheManager() cmState::CacheEntryType t = this->CMakeInstance->GetState()
->GetCacheEntryType(*it); ->GetCacheEntryType(*it);
if (t == cmCacheManager::INTERNAL || if (t == cmState::INTERNAL ||
t == cmCacheManager::STATIC || t == cmState::STATIC ||
t == cmCacheManager::UNINITIALIZED ) t == cmState::UNINITIALIZED )
{ {
continue; continue;
} }
...@@ -171,11 +171,11 @@ void cmCursesMainForm::InitializeUI() ...@@ -171,11 +171,11 @@ void cmCursesMainForm::InitializeUI()
it != cacheKeys.end(); ++it) it != cacheKeys.end(); ++it)
{ {
std::string key = *it; std::string key = *it;
cmCacheManager::CacheEntryType t = this->CMakeInstance->GetCacheManager() cmState::CacheEntryType t = this->CMakeInstance->GetState()
->GetCacheEntryType(*it); ->GetCacheEntryType(*it);
if (t == cmCacheManager::INTERNAL || if (t == cmState::INTERNAL ||
t == cmCacheManager::STATIC || t == cmState::STATIC ||
t == cmCacheManager::UNINITIALIZED ) t == cmState::UNINITIALIZED )
{ {
continue; continue;
} }
...@@ -225,10 +225,10 @@ void cmCursesMainForm::RePost() ...@@ -225,10 +225,10 @@ void cmCursesMainForm::RePost()
for (it = this->Entries->begin(); it != this->Entries->end(); ++it) for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{ {
const char* existingValue = const char* existingValue =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryValue((*it)->GetValue()); ->GetCacheEntryValue((*it)->GetValue());
bool advanced = bool advanced =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED"); ->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED");
if (!existingValue || (!this->AdvancedMode && advanced)) if (!existingValue || (!this->AdvancedMode && advanced))
{ {
...@@ -257,10 +257,10 @@ void cmCursesMainForm::RePost() ...@@ -257,10 +257,10 @@ void cmCursesMainForm::RePost()
for (it = this->Entries->begin(); it != this->Entries->end(); ++it) for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{ {
const char* existingValue = const char* existingValue =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryValue((*it)->GetValue()); ->GetCacheEntryValue((*it)->GetValue());
bool advanced = bool advanced =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED"); ->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED");
if (!existingValue || (!this->AdvancedMode && advanced)) if (!existingValue || (!this->AdvancedMode && advanced))
{ {
...@@ -293,9 +293,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) ...@@ -293,9 +293,9 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
cmCursesWidget* cw = reinterpret_cast<cmCursesWidget*> cmCursesWidget* cw = reinterpret_cast<cmCursesWidget*>
(field_userptr(currentField)); (field_userptr(currentField));
// If in edit mode, get out of it // If in edit mode, get out of it
if ( cw->GetType() == cmCacheManager::STRING || if ( cw->GetType() == cmState::STRING ||
cw->GetType() == cmCacheManager::PATH || cw->GetType() == cmState::PATH ||
cw->GetType() == cmCacheManager::FILEPATH ) cw->GetType() == cmState::FILEPATH )
{ {
cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw); cmCursesStringWidget* sw = static_cast<cmCursesStringWidget*>(cw);
sw->SetInEdit(false); sw->SetInEdit(false);
...@@ -329,10 +329,10 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) ...@@ -329,10 +329,10 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
for (it = this->Entries->begin(); it != this->Entries->end(); ++it) for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{ {
const char* existingValue = const char* existingValue =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryValue((*it)->GetValue()); ->GetCacheEntryValue((*it)->GetValue());
bool advanced = bool advanced =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED"); ->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED");
if (!existingValue || (!this->AdvancedMode && advanced)) if (!existingValue || (!this->AdvancedMode && advanced))
{ {
...@@ -352,10 +352,10 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) ...@@ -352,10 +352,10 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
for (it = this->Entries->begin(); it != this->Entries->end(); ++it) for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{ {
const char* existingValue = const char* existingValue =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryValue((*it)->GetValue()); ->GetCacheEntryValue((*it)->GetValue());
bool advanced = bool advanced =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED"); ->GetCacheEntryPropertyAsBool((*it)->GetValue(), "ADVANCED");
if (!existingValue || (!this->AdvancedMode && advanced)) if (!existingValue || (!this->AdvancedMode && advanced))
{ {
...@@ -516,10 +516,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message) ...@@ -516,10 +516,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
// Get the help string of the current entry // Get the help string of the current entry
// and add it to the help string // and add it to the help string
const char* existingValue = const char* existingValue =
this->CMakeInstance->GetCacheManager()->GetCacheEntryValue(curField); this->CMakeInstance->GetState()->GetCacheEntryValue(curField);
if (existingValue) if (existingValue)
{ {
const char* hs = this->CMakeInstance->GetCacheManager() const char* hs = this->CMakeInstance->GetState()
->GetCacheEntryProperty(curField, "HELPSTRING"); ->GetCacheEntryProperty(curField, "HELPSTRING");
if ( hs ) if ( hs )
{ {
...@@ -814,7 +814,7 @@ void cmCursesMainForm::FillCacheManagerFromUI() ...@@ -814,7 +814,7 @@ void cmCursesMainForm::FillCacheManagerFromUI()
for(size_t i=0; i < size; i++) for(size_t i=0; i < size; i++)
{ {
std::string cacheKey = (*this->Entries)[i]->Key; std::string cacheKey = (*this->Entries)[i]->Key;
const char* existingValue = this->CMakeInstance->GetCacheManager() const char* existingValue = this->CMakeInstance->GetState()
->GetCacheEntryValue(cacheKey); ->GetCacheEntryValue(cacheKey);
if (existingValue) if (existingValue)
{ {
...@@ -822,8 +822,8 @@ void cmCursesMainForm::FillCacheManagerFromUI() ...@@ -822,8 +822,8 @@ void cmCursesMainForm::FillCacheManagerFromUI()
std::string newValue = (*this->Entries)[i]->Entry->GetValue(); std::string newValue = (*this->Entries)[i]->Entry->GetValue();
std::string fixedOldValue; std::string fixedOldValue;
std::string fixedNewValue; std::string fixedNewValue;
cmCacheManager::CacheEntryType t = cmState::CacheEntryType t =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryType(cacheKey); ->GetCacheEntryType(cacheKey);
this->FixValue(t, oldValue, fixedOldValue); this->FixValue(t, oldValue, fixedOldValue);
this->FixValue(t, newValue, fixedNewValue); this->FixValue(t, newValue, fixedNewValue);
...@@ -831,24 +831,24 @@ void cmCursesMainForm::FillCacheManagerFromUI() ...@@ -831,24 +831,24 @@ void cmCursesMainForm::FillCacheManagerFromUI()
if(!(fixedOldValue == fixedNewValue)) if(!(fixedOldValue == fixedNewValue))
{ {
// The user has changed the value. Mark it as modified. // The user has changed the value. Mark it as modified.
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->SetCacheEntryBoolProperty(cacheKey, "MODIFIED", true); ->SetCacheEntryBoolProperty(cacheKey, "MODIFIED", true);
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->SetCacheEntryValue(cacheKey, fixedNewValue); ->SetCacheEntryValue(cacheKey, fixedNewValue);
} }
} }
} }
} }
void cmCursesMainForm::FixValue(cmCacheManager::CacheEntryType type, void cmCursesMainForm::FixValue(cmState::CacheEntryType type,
const std::string& in, std::string& out) const const std::string& in, std::string& out) const
{ {
out = in.substr(0,in.find_last_not_of(" ")+1); out = in.substr(0,in.find_last_not_of(" ")+1);
if(type == cmCacheManager::PATH || type == cmCacheManager::FILEPATH) if(type == cmState::PATH || type == cmState::FILEPATH)
{ {
cmSystemTools::ConvertToUnixSlashes(out); cmSystemTools::ConvertToUnixSlashes(out);
} }
if(type == cmCacheManager::BOOL) if(type == cmState::BOOL)
{ {
if(cmSystemTools::IsOff(out.c_str())) if(cmSystemTools::IsOff(out.c_str()))
{ {
...@@ -1046,11 +1046,11 @@ void cmCursesMainForm::HandleInput() ...@@ -1046,11 +1046,11 @@ void cmCursesMainForm::HandleInput()
const char* helpString = 0; const char* helpString = 0;
const char* existingValue = const char* existingValue =
this->CMakeInstance->GetCacheManager() this->CMakeInstance->GetState()
->GetCacheEntryValue(curField); ->GetCacheEntryValue(curField);
if (existingValue) if (existingValue)
{ {
helpString = this->CMakeInstance->GetCacheManager() helpString = this->CMakeInstance->GetState()
->GetCacheEntryProperty(curField, "HELPSTRING"); ->GetCacheEntryProperty(curField, "HELPSTRING");
} }
if (helpString) if (helpString)
...@@ -1161,7 +1161,7 @@ void cmCursesMainForm::HandleInput() ...@@ -1161,7 +1161,7 @@ void cmCursesMainForm::HandleInput()
field_userptr(this->Fields[findex-2])); field_userptr(this->Fields[findex-2]));
if ( lbl ) if ( lbl )
{ {
this->CMakeInstance->GetCacheManager()->RemoveCacheEntry(lbl->GetValue()); this->CMakeInstance->GetState()->RemoveCacheEntry(lbl->GetValue());
std::string nextVal; std::string nextVal;
if (nextCur) if (nextCur)
......
...@@ -113,7 +113,7 @@ protected: ...@@ -113,7 +113,7 @@ protected:
// cache. // cache.
void FillCacheManagerFromUI(); void FillCacheManagerFromUI();
// Fix formatting of values to a consistent form. // Fix formatting of values to a consistent form.
void FixValue(cmCacheManager::CacheEntryType type, void FixValue(cmState::CacheEntryType type,
const std::string& in, std::string& out) const; const std::string& in, std::string& out) const;
// Re-post the existing fields. Used to toggle between // Re-post the existing fields. Used to toggle between
// normal and advanced modes. Render() should be called // normal and advanced modes. Render() should be called
......
...@@ -21,7 +21,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, ...@@ -21,7 +21,7 @@ cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height,
int left, int top) : int left, int top) :
cmCursesWidget(width, height, left, top) cmCursesWidget(width, height, left, top)
{ {
this->Type = cmCacheManager::BOOL; // this is a bit of a hack this->Type = cmState::BOOL; // this is a bit of a hack
// there is no option type, and string type causes ccmake to cast // there is no option type, and string type causes ccmake to cast
// the widget into a string widget at some point. BOOL is safe for // the widget into a string widget at some point. BOOL is safe for
// now. // now.
......
...@@ -18,7 +18,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height, ...@@ -18,7 +18,7 @@ cmCursesPathWidget::cmCursesPathWidget(int width, int height,
int left, int top) : int left, int top) :
cmCursesStringWidget(width, height, left, top) cmCursesStringWidget(width, height, left, top)
{ {
this->Type = cmCacheManager::PATH; this->Type = cmState::PATH;
this->Cycle = false; this->Cycle = false;
this->CurrentIndex = 0; this->CurrentIndex = 0;
} }
...@@ -59,7 +59,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) ...@@ -59,7 +59,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
} }
std::vector<std::string> dirs; std::vector<std::string> dirs;
cmSystemTools::SimpleGlob(glob, dirs, (this->Type == cmCacheManager::PATH?-1:0)); cmSystemTools::SimpleGlob(glob, dirs, (this->Type == cmState::PATH?-1:0));
if ( this->CurrentIndex < dirs.size() ) if ( this->CurrentIndex < dirs.size() )
{ {
cstr = dirs[this->CurrentIndex]; cstr = dirs[this->CurrentIndex];
......
...@@ -22,7 +22,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height, ...@@ -22,7 +22,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height,
cmCursesWidget(width, height, left, top) cmCursesWidget(width, height, left, top)
{ {
this->InEdit = false; this->InEdit = false;
this->Type = cmCacheManager::STRING; this->Type = cmState::STRING;
set_field_fore(this->Field, A_NORMAL); set_field_fore(this->Field, A_NORMAL);
set_field_back(this->Field, A_STANDOUT); set_field_back(this->Field, A_STANDOUT);
field_opts_off(this->Field, O_STATIC); field_opts_off(this->Field, O_STATIC);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#ifndef cmCursesWidget_h #ifndef cmCursesWidget_h
#define cmCursesWidget_h #define cmCursesWidget_h
#include "../cmCacheManager.h" #include "../cmState.h"
#include "cmCursesStandardIncludes.h" #include "cmCursesStandardIncludes.h"