Merge pull request #3909 from love-code-yeyixiao/NewBoxWizard

Update NewBoxWizard.cpp
This commit is contained in:
DavidXanatos 2024-05-18 09:29:25 +02:00 committed by GitHub
commit fb31e94fb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -270,6 +270,9 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
if(field("imagesProtection").toBool())
pBox->SetBool("ProtectHostImages", true);
if (field("coverBoxedWindows").toBool())
pBox->SetBool("CoverBoxedWindows", true);
if (!Password.isEmpty())
pBox->ImBoxCreate(ImageSize / 1024, Password);
@ -780,6 +783,12 @@ CAdvancedPage::CAdvancedPage(QWidget *parent)
layout->addWidget(pImageProtection, row++, 1, 1, 3);
registerField("imagesProtection", pImageProtection);
QCheckBox* pWindowCover = new QCheckBox(tr("Prevents the sandboxed window from being captured."));
pWindowCover->setToolTip(tr("This feature can cause a decline in the user experience because it also prevents normal screenshots."));
pWindowCover->setChecked(theConf->GetBool("BoxDefaults/CoverBoxedWindows", false));
layout->addWidget(pWindowCover, row++, 1, 1, 3);
registerField("coverBoxedWindows", pWindowCover);
QString SharedTemplateName = tr("Shared Template");
QLabel* pSharedTemplateLbl = new QLabel(tr("Shared template mode"), this);
pSharedTemplateLbl->setToolTip(tr("This setting adds a local template or its settings to the sandbox configuration so that the settings in that template are shared between sandboxes."
@ -953,6 +962,7 @@ bool CSummaryPage::validatePage()
theConf->SetValue("BoxDefaults/BoxToken", field("boxToken").toBool());
theConf->SetValue("BoxDefaults/ImagesProtection", field("imagesProtection").toBool());
theConf->SetValue("BoxDefaults/CoverBoxedWindows", field("coverBoxedWindows").toBool());
theConf->SetValue("BoxDefaults/SharedTemplate", field("sharedTemplate").toInt());
}