[Orxonox-commit 1656] r6374 - code/branches/presentation2/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Dec 17 23:49:26 CET 2009
Author: rgrieder
Date: 2009-12-17 23:49:25 +0100 (Thu, 17 Dec 2009)
New Revision: 6374
Modified:
code/branches/presentation2/src/libraries/core/ConfigFileManager.h
code/branches/presentation2/src/libraries/core/Shell.cc
code/branches/presentation2/src/libraries/core/Shell.h
Log:
Fixed a problem in the Shell with the command history config file type.
Modified: code/branches/presentation2/src/libraries/core/ConfigFileManager.h
===================================================================
--- code/branches/presentation2/src/libraries/core/ConfigFileManager.h 2009-12-17 22:27:00 UTC (rev 6373)
+++ code/branches/presentation2/src/libraries/core/ConfigFileManager.h 2009-12-17 22:49:25 UTC (rev 6374)
@@ -51,6 +51,7 @@
static const int NoType = 0;
static const int Settings = 1;
static const int JoyStickCalibration = 2;
+ static const int CommandHistory = 3;
static const int numberOfReservedTypes = 1024;
};
Modified: code/branches/presentation2/src/libraries/core/Shell.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Shell.cc 2009-12-17 22:27:00 UTC (rev 6373)
+++ code/branches/presentation2/src/libraries/core/Shell.cc 2009-12-17 22:49:25 UTC (rev 6374)
@@ -61,9 +61,8 @@
this->clearOutput();
this->configureInputBuffer();
- // Get a config file for the command history
- this->commandHistoryConfigFileType_ = ConfigFileManager::getInstance().getNewConfigFileType();
- ConfigFileManager::getInstance().setFilename(this->commandHistoryConfigFileType_, "commandHistory.ini");
+ // Specify file for the command history
+ ConfigFileManager::getInstance().setFilename(ConfigFileType::CommandHistory, "commandHistory.ini");
// Use a stringstream object to buffer the output
this->outputStream_ = &this->outputBuffer_;
@@ -97,7 +96,7 @@
.callback(this, &Shell::commandHistoryLengthChanged);
SetConfigValue(historyOffset_, 0)
.callback(this, &Shell::commandHistoryOffsetChanged);
- setConfigValueGeneric(this, &commandHistory_, commandHistoryConfigFileType_, "Shell", "commandHistory_", std::vector<std::string>());
+ setConfigValueGeneric(this, &commandHistory_, ConfigFileType::CommandHistory, "Shell", "commandHistory_", std::vector<std::string>());
#ifdef ORXONOX_RELEASE
const unsigned int defaultLevel = 1;
Modified: code/branches/presentation2/src/libraries/core/Shell.h
===================================================================
--- code/branches/presentation2/src/libraries/core/Shell.h 2009-12-17 22:27:00 UTC (rev 6373)
+++ code/branches/presentation2/src/libraries/core/Shell.h 2009-12-17 22:49:25 UTC (rev 6374)
@@ -157,7 +157,6 @@
LineList::const_iterator scrollIterator_;
unsigned int scrollPosition_;
unsigned int historyPosition_;
- ConfigFileType commandHistoryConfigFileType_;
std::string promptPrefix_;
const std::string consoleName_;
More information about the Orxonox-commit
mailing list