|
|
|
@ -95,7 +95,7 @@ void CS::Editor::setupDataFiles (const Files::PathContainer& dataDirs)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfig()
|
|
|
|
|
std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfig(bool quiet)
|
|
|
|
|
{
|
|
|
|
|
boost::program_options::variables_map variables;
|
|
|
|
|
boost::program_options::options_description desc("Syntax: openmw-cs <options>\nAllowed options");
|
|
|
|
@ -115,7 +115,7 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
|
|
|
|
|
|
|
|
|
boost::program_options::notify(variables);
|
|
|
|
|
|
|
|
|
|
mCfgMgr.readConfiguration(variables, desc);
|
|
|
|
|
mCfgMgr.readConfiguration(variables, desc, /*quiet*/true);
|
|
|
|
|
|
|
|
|
|
mDocumentManager.setEncoding (
|
|
|
|
|
ToUTF8::calculateEncoding (variables["encoding"].as<std::string>()));
|
|
|
|
@ -195,6 +195,11 @@ void CS::Editor::cancelCreateGame()
|
|
|
|
|
void CS::Editor::createAddon()
|
|
|
|
|
{
|
|
|
|
|
mStartup.hide();
|
|
|
|
|
|
|
|
|
|
mFileDialog.clearFiles();
|
|
|
|
|
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig(/*quiet*/true);
|
|
|
|
|
setupDataFiles (config.first);
|
|
|
|
|
|
|
|
|
|
mFileDialog.showDialog (CSVDoc::ContentAction_New);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -215,6 +220,11 @@ void CS::Editor::cancelFileDialog()
|
|
|
|
|
void CS::Editor::loadDocument()
|
|
|
|
|
{
|
|
|
|
|
mStartup.hide();
|
|
|
|
|
|
|
|
|
|
mFileDialog.clearFiles();
|
|
|
|
|
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig(/*quiet*/true);
|
|
|
|
|
setupDataFiles (config.first);
|
|
|
|
|
|
|
|
|
|
mFileDialog.showDialog (CSVDoc::ContentAction_Edit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|