From 70509275405d2a5c5e94743786f03b17ef2051f2 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 19 Sep 2023 11:19:39 -0500 Subject: Default profile settings (#1869) * Fix archive parsing and BSA invalidation --- src/createinstancedialogpages.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/createinstancedialogpages.cpp') diff --git a/src/createinstancedialogpages.cpp b/src/createinstancedialogpages.cpp index c8cec45f..27bd4062 100644 --- a/src/createinstancedialogpages.cpp +++ b/src/createinstancedialogpages.cpp @@ -143,6 +143,12 @@ CreateInstanceDialog::Paths Page::selectedPaths() const return {}; } +CreateInstanceDialog::ProfileSettings Page::profileSettings() const +{ + // no-op + return {}; +} + IntroPage::IntroPage(CreateInstanceDialog& dlg) : Page(dlg), m_skip(GlobalSettings::hideCreateInstanceIntro()) { @@ -931,6 +937,22 @@ bool NamePage::checkName(QString parentDir, QString name) return okay; } +ProfilePage::ProfilePage(CreateInstanceDialog& dlg) : Page(dlg) {} + +bool ProfilePage::ready() const +{ + return true; +} + +CreateInstanceDialog::ProfileSettings ProfilePage::profileSettings() const +{ + CreateInstanceDialog::ProfileSettings profileSettings; + profileSettings.localInis = ui->profileInisCheckbox->isChecked(); + profileSettings.localSaves = ui->profileSavesCheckbox->isChecked(); + profileSettings.archiveInvalidation = ui->archiveInvalidationCheckbox->isChecked(); + return profileSettings; +} + PathsPage::PathsPage(CreateInstanceDialog& dlg) : Page(dlg), m_lastType(CreateInstanceDialog::NoType), m_label(ui->pathsLabel), m_simpleExists(ui->locationExists), m_simpleInvalid(ui->locationInvalid), @@ -1215,6 +1237,17 @@ QString ConfirmationPage::makeReview() const lines.push_back(QObject::tr("Instance name: %1").arg(ci.instanceName)); } + lines.push_back(QObject::tr("Profile settings:")); + lines.push_back( + QObject::tr(" Local INIs: %1") + .arg(ci.profileSettings.localInis ? QObject::tr("yes") : QObject::tr("no"))); + lines.push_back( + QObject::tr(" Local Saves: %1") + .arg(ci.profileSettings.localSaves ? QObject::tr("yes") : QObject::tr("no"))); + lines.push_back(QObject::tr(" Automatic Archive Invalidation: %1") + .arg(ci.profileSettings.archiveInvalidation ? QObject::tr("yes") + : QObject::tr("no"))); + if (ci.paths.downloads.isEmpty()) { // simple settings if (ci.paths.base != ci.dataPath) { -- cgit v1.3.1