ui: load source from directory via MenuBar
Added MenuBar action Project->New, which opens a directory dialog for choosing the new source directory to parse the files from. The ConfigManager can be created empty now and setValue calls can be used to set values. fortune cookie message = Your troubles will be faded by the luck you will soon have.
This commit is contained in:
@@ -14,8 +14,6 @@ Settings::~Settings()
|
||||
|
||||
bool Settings::load(const std::string& filePath)
|
||||
{
|
||||
m_config.reset();
|
||||
|
||||
if (FileSystem::exists(filePath))
|
||||
{
|
||||
m_config = ConfigManager::createAndLoad(TextAccess::createFromFile(filePath));
|
||||
@@ -23,6 +21,7 @@ bool Settings::load(const std::string& filePath)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_config = ConfigManager::createEmpty();
|
||||
LOG_WARNING("File for Settings not found.");
|
||||
return false;
|
||||
}
|
||||
@@ -39,3 +38,8 @@ void Settings::save(const std::string& filePath)
|
||||
LOG_WARNING("Settings were not saved.");
|
||||
}
|
||||
}
|
||||
|
||||
void Settings::clear()
|
||||
{
|
||||
m_config = ConfigManager::createEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user