Merge pull request #3953 from offhub/fix016

Update NewBoxWizard.cpp
This commit is contained in:
DavidXanatos 2024-05-31 09:19:06 +02:00 committed by GitHub
commit 099c8cb1b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -115,14 +115,15 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
bool removeDefaultRecovers = templateSettings.contains(QRegularExpression(QStringLiteral("[\r\n]#RemoveDefaultRecovers=y[\r\n]")));
bool removeDefaultTemplates = templateSettings.contains(QRegularExpression(QStringLiteral("[\r\n]#RemoveDefaultTemplates=y[\r\n]")));
int sharedTemplateMode = field("sharedTemplate").toInt();
// Create base template
if (templateSettings.isEmpty()) {
if (templateSettings.isEmpty() && sharedTemplateMode != 0) {
const QString templateBase = QStringLiteral("Tmpl.Title=%1\nTmpl.Class=Local\n%3=n\n%4=n\n%5=n\n%6=n\nTmpl.Comment=%2")
.arg(templateTitle, templateComment, "#DisableWizardSettings", "#RemoveDefaultAll", "#RemoveDefaultRecovers", "#RemoveDefaultTemplates");
theAPI->SbieIniSet(templateFullName, "", templateBase);
}
int sharedTemplateMode = field("sharedTemplate").toInt();
switch (sharedTemplateMode)
{
case 1:
@ -845,7 +846,7 @@ 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."));
QCheckBox* pWindowCover = new QCheckBox(tr("Prevent sandboxed windows 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);

View File

@ -524,7 +524,7 @@ CShellPage::CShellPage(QWidget *parent)
layout->addWidget(m_pBrowserIcon);
registerField("useBrowserIcon", m_pBrowserIcon);
m_pEditOnlyAdmin = new QCheckBox(tr("Only applications with administrator token can change ini setting."));
m_pEditOnlyAdmin = new QCheckBox(tr("Only applications with admin rights can change configuration"));
m_pEditOnlyAdmin->setChecked(false);
connect(m_pEditOnlyAdmin,SIGNAL(clicked(bool)), this, SLOT(OnEditOnlyAdmin()));
layout->addWidget(m_pEditOnlyAdmin);
@ -536,8 +536,8 @@ CShellPage::CShellPage(QWidget *parent)
void CShellPage::OnEditOnlyAdmin()
{
if (m_pEditOnlyAdmin->isChecked()) {
if (QMessageBox::warning(this, tr("Warning"), tr("When this option is set, Sandbox Manager with normal user permissions will not be able to modify the configuration, which may result in a lock. "
"You need to open the Sandbox Manager main window, click \"Sandbox (s)\" in the system menu, and then click \"Restart as Admin\" in the pop - up context menu to gain control of the configuration."),
if (QMessageBox::warning(this, tr("Warning"), tr("Enabling this option prevents changes to the Sandboxie.ini configuration from the user interface without admin rights. Be careful, as using Sandboxie Manager with normal user rights may result in a lockout. "
"To make changes to the configuration, you must restart Sandboxie Manager as an admin by clicking 'Restart as Admin' in the 'Sandbox' menu in the main window."),
QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
m_pEditOnlyAdmin->setChecked(false);
}