This commit is contained in:
love-code-yeyixiao 2024-06-08 19:40:28 +08:00
parent 23737b55d8
commit a28ffe0e0b
2 changed files with 19 additions and 4 deletions

View File

@ -672,7 +672,7 @@
<attribute name="title">
<string>Restrictions</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_92">
<layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="lblPrinting">
<property name="font">
@ -717,7 +717,7 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="4" column="0">
<widget class="QLabel" name="lblLimit">
<property name="font">
<font>
@ -864,7 +864,14 @@
</property>
</widget>
</item>
<item row="16" column="1" colspan="3">
<item row="16" column="2" colspan="2">
<widget class="QCheckBox" name="chkCoverBar">
<property name="text">
<string>Allow sandboxed windows to cover taskbar</string>
</property>
</widget>
</item>
<item row="17" column="1" colspan="3">
<widget class="QCheckBox" name="chkBlockCapture">
<property name="toolTip">
<string>This feature does not block all means of obtaining a screen capture, only some common ones.</string>
@ -874,7 +881,7 @@
</property>
</widget>
</item>
<item row="17" column="1">
<item row="18" column="1">
<spacer name="verticalSpacer_12">
<property name="orientation">
<enum>Qt::Vertical</enum>

View File

@ -192,6 +192,7 @@ void COptionsWindow::CreateGeneral()
connect(ui.chkEncrypt, SIGNAL(clicked(bool)), this, SLOT(OnDiskChanged()));
connect(ui.chkForceProtection, SIGNAL(clicked(bool)), this, SLOT(OnGeneralChanged()));
connect(ui.chkUserOperation, SIGNAL(clicked(bool)), this, SLOT(OnGeneralChanged()));
connect(ui.chkCoverBar, SIGNAL(clicked(bool)), this, SLOT(OnGeneralChanged()));
connect(ui.btnPassword, SIGNAL(clicked(bool)), this, SLOT(OnSetPassword()));
bool bImDiskReady = theGUI->IsImDiskReady();
@ -283,8 +284,11 @@ void COptionsWindow::LoadGeneral()
ui.chkPrintToFile->setChecked(m_pBox->GetBool("AllowSpoolerPrintToFile", false));
ui.lineSingleMemory->setText(m_pBox->GetText("ProcessMemoryLimit", ""));
ui.lineSingleMemory->setEnabled(true);
ui.lineTotalMemory->setText(m_pBox->GetText("TotalMemoryLimit", ""));
ui.lineTotalMemory->setEnabled(true);
ui.lineTotalNumber->setText(m_pBox->GetText("TotalNumberLimit", ""));
ui.lineTotalNumber->setEnabled(true);
//ui.chkOpenProtectedStorage->setChecked(m_pBox->GetBool("OpenProtectedStorage", false));
ui.chkOpenProtectedStorage->setChecked(m_BoxTemplates.contains("OpenProtectedStorage"));
@ -338,6 +342,7 @@ void COptionsWindow::LoadGeneral()
ui.chkEncrypt->setChecked(m_pBox->GetBool("UseFileImage", false));
ui.chkForceProtection->setChecked(m_pBox->GetBool("ForceProtectionOnMount", false));
ui.chkUserOperation->setChecked(m_pBox->GetBool("BlockInterferenceControl", false));
ui.chkCoverBar->setChecked(m_pBox->GetBool("AllowCoverTaskbar", false));
if (ui.chkRamBox->isEnabled()) {
ui.chkEncrypt->setEnabled(!ui.chkRamBox->isChecked());
ui.chkForceProtection->setEnabled(!ui.chkRamBox->isChecked());
@ -441,6 +446,7 @@ void COptionsWindow::SaveGeneral()
WriteAdvancedCheck(ui.chkProtectPower, "BlockInterferePower", "y", "");
WriteAdvancedCheck(ui.chkForceProtection, "ForceProtectionOnMount", "y", "");
WriteAdvancedCheck(ui.chkUserOperation, "BlockInterferenceControl", "y", "");
WriteAdvancedCheck(ui.chkCoverBar, "AllowCoverTaskbar", "y", "");
WriteAdvancedCheck(ui.chkVmReadNotify, "NotifyProcessAccessDenied", "y", "");
//WriteAdvancedCheck(ui.chkOpenSmartCard, "OpenSmartCard", "", "n");
//WriteAdvancedCheck(ui.chkOpenBluetooth, "OpenBluetooth", "y", "");
@ -814,6 +820,8 @@ void COptionsWindow::OnGeneralChanged()
ui.lineTotalMemory->setEnabled(ui.chkAddToJob->isChecked());
ui.lineTotalNumber->setEnabled(ui.chkAddToJob->isChecked());
ui.chkCoverBar->setEnabled(ui.chkUserOperation->isChecked());
ui.chkOpenCredentials->setEnabled(!ui.chkOpenProtectedStorage->isChecked());
if (!ui.chkOpenCredentials->isEnabled()) ui.chkOpenCredentials->setChecked(true);