This commit is contained in:
love-code-yeyixiao 2024-03-17 17:32:43 +08:00
parent f22554c788
commit 16aba205b1
3 changed files with 100 additions and 79 deletions

View File

@ -411,7 +411,7 @@
<item row="11" column="1" colspan="5">
<widget class="QCheckBox" name="chkLockWhenClose">
<property name="text">
<string>Lock the encrypted sandbox when all processes in the sandbox terminate.</string>
<string>Force lock the encrypted sandbox when all processes in the sandbox terminate.</string>
</property>
</widget>
</item>
@ -4525,8 +4525,8 @@ instead of &quot;*&quot;.</string>
<rect>
<x>0</x>
<y>0</y>
<width>75</width>
<height>16</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QGridLayout" name="dbgLayout">

View File

@ -48,7 +48,7 @@
<enum>QTabWidget::North</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>5</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
@ -449,7 +449,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tabsShell">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabWindows">
<attribute name="title">
@ -1689,6 +1689,7 @@
<widget class="QLabel" name="lblCertGuide">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
@ -1940,7 +1941,7 @@ Unlike the preview channel, it does not include untested, potentially breaking,
<item row="0" column="0">
<widget class="QTabWidget" name="tabsAdvanced">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabSandbox">
<attribute name="title">
@ -2159,36 +2160,14 @@ Unlike the preview channel, it does not include untested, potentially breaking,
<attribute name="title">
<string>Sandboxie.ini Presets</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_21">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_19">
<item row="3" column="2">
<widget class="QPushButton" name="btnSetPassword">
<item row="0" column="2">
<widget class="QCheckBox" name="chkWatchConfig">
<property name="text">
<string>Change Password</string>
<string>Watch Sandboxie.ini for changes</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkPassRequired">
<property name="text">
<string>Password must be entered in order to make changes</string>
</property>
</widget>
</item>
<item row="6" column="1">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="lblProtection">
<property name="font">
@ -2203,35 +2182,73 @@ Unlike the preview channel, it does not include untested, potentially breaking,
</property>
</widget>
</item>
<item row="2" column="1">
<item row="2" column="2">
<widget class="QCheckBox" name="chkAdminOnly">
<property name="text">
<string>Only Administrator user accounts can make changes</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkWatchConfig">
<item row="3" column="2">
<widget class="QCheckBox" name="chkPassRequired">
<property name="text">
<string>Watch Sandboxie.ini for changes</string>
<string>Password must be entered in order to make changes</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<item row="3" column="3" rowspan="2">
<widget class="QPushButton" name="btnSetPassword">
<property name="text">
<string>Change Password</string>
</property>
</widget>
</item>
<item row="4" column="1" rowspan="2">
<spacer name="horizontalSpacer_23">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>140</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="2" colspan="2">
<widget class="QCheckBox" name="chkAdminOnlyFP">
<property name="text">
<string>Only Administrator user accounts can use Pause Forcing Programs command</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="2">
<widget class="QCheckBox" name="chkClearPass">
<property name="text">
<string>Clear password when main window becomes hidden</string>
</property>
</widget>
</item>
</layout>
<item row="7" column="2">
<widget class="QCheckBox" name="chkLockTrayMenu">
<property name="text">
<string>Protect The Sandman tray menu.</string>
</property>
</widget>
</item>
<item row="8" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>211</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>

View File

@ -429,6 +429,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
connect(ui.btnSetPassword, SIGNAL(clicked(bool)), this, SLOT(OnSetPassword()));
connect(ui.chkAdminOnlyFP, SIGNAL(stateChanged(int)), this, SLOT(OnProtectionChange()));
connect(ui.chkClearPass, SIGNAL(stateChanged(int)), this, SLOT(OnProtectionChange()));
connect(ui.chkLockTrayMenu, SIGNAL(stateChanged(int)), this, SLOT(OnProtectionChange()));
m_ProtectionChanged = false;
//
@ -1000,6 +1001,7 @@ void CSettingsWindow::LoadSettings()
ui.chkPassRequired->setChecked(!theAPI->GetGlobalSettings()->GetText("EditPassword", "").isEmpty());
ui.chkAdminOnlyFP->setChecked(theAPI->GetGlobalSettings()->GetBool("ForceDisableAdminOnly", false));
ui.chkClearPass->setChecked(theAPI->GetGlobalSettings()->GetBool("ForgetPassword", false));
ui.chkLockTrayMenu->setChecked(theAPI->GetGlobalSettings()->GetBool("LockTrayMenu", false));
m_HoldChange = true;
OnProtectionChange();
m_HoldChange = false;
@ -1054,6 +1056,7 @@ void CSettingsWindow::LoadSettings()
ui.chkPassRequired->setEnabled(false);
ui.chkAdminOnlyFP->setEnabled(false);
ui.chkClearPass->setEnabled(false);
ui.chkLockTrayMenu->setEnabled(false);
ui.btnSetPassword->setEnabled(false);
ui.treeWarnProgs->setEnabled(false);
ui.btnAddWarnProg->setEnabled(false);
@ -1663,6 +1666,7 @@ void CSettingsWindow::SaveSettings()
WriteAdvancedCheck(ui.chkAdminOnlyFP, "ForceDisableAdminOnly", "y", "");
WriteAdvancedCheck(ui.chkClearPass, "ForgetPassword", "y", "");
WriteAdvancedCheck(ui.chkLockTrayMenu, "LockTrayMenu", "y", "");
}
if (m_WarnProgsChanged)