|
|
@ -164,11 +164,14 @@ Launcher::DataFilesPage::DataFilesPage(const Files::ConfigurationManager& cfg, C
|
|
|
|
const QString encoding = mGameSettings.value("encoding", "win1252");
|
|
|
|
const QString encoding = mGameSettings.value("encoding", "win1252");
|
|
|
|
mSelector->setEncoding(encoding);
|
|
|
|
mSelector->setEncoding(encoding);
|
|
|
|
|
|
|
|
|
|
|
|
QStringList languages;
|
|
|
|
QVector<std::pair<QString, QString>> languages = { { "English", tr("English") }, { "French", tr("French") },
|
|
|
|
languages << tr("English") << tr("French") << tr("German") << tr("Italian") << tr("Polish") << tr("Russian")
|
|
|
|
{ "German", tr("German") }, { "Italian", tr("Italian") }, { "Polish", tr("Polish") },
|
|
|
|
<< tr("Spanish");
|
|
|
|
{ "Russian", tr("Russian") }, { "Spanish", tr("Spanish") } };
|
|
|
|
|
|
|
|
|
|
|
|
mSelector->languageBox()->addItems(languages);
|
|
|
|
for (auto lang : languages)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
mSelector->languageBox()->addItem(lang.second, lang.first);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mNewProfileDialog = new TextInputDialog(tr("New Content List"), tr("Content List name:"), this);
|
|
|
|
mNewProfileDialog = new TextInputDialog(tr("New Content List"), tr("Content List name:"), this);
|
|
|
|
mCloneProfileDialog = new TextInputDialog(tr("Clone Content List"), tr("Content List name:"), this);
|
|
|
|
mCloneProfileDialog = new TextInputDialog(tr("Clone Content List"), tr("Content List name:"), this);
|
|
|
@ -254,9 +257,17 @@ bool Launcher::DataFilesPage::loadSettings()
|
|
|
|
if (!currentProfile.isEmpty())
|
|
|
|
if (!currentProfile.isEmpty())
|
|
|
|
addProfile(currentProfile, true);
|
|
|
|
addProfile(currentProfile, true);
|
|
|
|
|
|
|
|
|
|
|
|
const int index = mSelector->languageBox()->findText(mLauncherSettings.getLanguage());
|
|
|
|
auto language = mLauncherSettings.getLanguage();
|
|
|
|
if (index != -1)
|
|
|
|
|
|
|
|
mSelector->languageBox()->setCurrentIndex(index);
|
|
|
|
for (int i = 0; i < mSelector->languageBox()->count(); ++i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QString languageItem = mSelector->languageBox()->itemData(i).toString();
|
|
|
|
|
|
|
|
if (language == languageItem)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
mSelector->languageBox()->setCurrentIndex(i);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -386,7 +397,7 @@ void Launcher::DataFilesPage::saveSettings(const QString& profile)
|
|
|
|
mLauncherSettings.setContentList(profileName, dirList, selectedArchivePaths(), fileNames);
|
|
|
|
mLauncherSettings.setContentList(profileName, dirList, selectedArchivePaths(), fileNames);
|
|
|
|
mGameSettings.setContentList(dirList, selectedArchivePaths(), fileNames);
|
|
|
|
mGameSettings.setContentList(dirList, selectedArchivePaths(), fileNames);
|
|
|
|
|
|
|
|
|
|
|
|
QString language(mSelector->languageBox()->currentText());
|
|
|
|
QString language(mSelector->languageBox()->currentData().toString());
|
|
|
|
|
|
|
|
|
|
|
|
mLauncherSettings.setLanguage(language);
|
|
|
|
mLauncherSettings.setLanguage(language);
|
|
|
|
|
|
|
|
|
|
|
|