From 7fa2de630583e2a71af9dcabd53b3f19d6555e25 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Sat, 18 May 2024 15:00:49 +0800 Subject: [PATCH] Update NewBoxWizard.cpp --- SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp index 83384246..b3893846 100644 --- a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp +++ b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp @@ -265,7 +265,8 @@ 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); @@ -769,6 +770,13 @@ 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.")); + pImageProtection->setToolTip(tr("This feature can cause a decline in the user experience because it also prevents normal screenshots.")); + pImageProtection->setChecked(theConf->GetBool("BoxDefaults/CoverBoxedWindows", false)); + pImageProtection->setEnabled(g_CertInfo.active); + layout->addWidget(pImageProtection, row++, 1, 1, 3); + registerField("coverBoxedWindows", pImageProtection); + 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." @@ -926,6 +934,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()); }