From 4f5477628d32471df428af927b864633a42bdd39 Mon Sep 17 00:00:00 2001
From: love-code-yeyixiao <188240888@qq.com>
Date: Sun, 17 Mar 2024 19:10:29 +0800
Subject: [PATCH] rollback
---
SandboxiePlus/SandMan/Forms/SettingsWindow.ui | 93 +++++++++----------
SandboxiePlus/SandMan/SandManTray.cpp | 16 ----
.../SandMan/Windows/SettingsWindow.cpp | 6 +-
3 files changed, 45 insertions(+), 70 deletions(-)
diff --git a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui
index 7460ecc5..558c368c 100644
--- a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui
+++ b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui
@@ -2161,6 +2161,33 @@ Unlike the preview channel, it does not include untested, potentially breaking,
Sandboxie.ini Presets
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 211
+
+
+
+
+ -
+
+
+ Clear password when main window becomes hidden
+
+
+
+ -
+
+
+ Only Administrator user accounts can use Pause Forcing Programs command
+
+
+
-
@@ -2168,34 +2195,6 @@ Unlike the preview channel, it does not include untested, potentially breaking,
- -
-
-
-
- 75
- true
- true
-
-
-
- Config protection
-
-
-
- -
-
-
- Only Administrator user accounts can make changes
-
-
-
- -
-
-
- Password must be entered in order to make changes
-
-
-
-
@@ -2216,40 +2215,34 @@ Unlike the preview channel, it does not include untested, potentially breaking,
- -
-
+
-
+
- Only Administrator user accounts can use Pause Forcing Programs command
+ Only Administrator user accounts can make changes
- -
-
+
-
+
+
+
+ 75
+ true
+ true
+
+
- Clear password when main window becomes hidden
+ Config protection
- -
-
+
-
+
- Protect The Sandman tray menu.
+ Password must be entered in order to make changes
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 211
-
-
-
-
diff --git a/SandboxiePlus/SandMan/SandManTray.cpp b/SandboxiePlus/SandMan/SandManTray.cpp
index d0c3ad5d..dd546d5b 100644
--- a/SandboxiePlus/SandMan/SandManTray.cpp
+++ b/SandboxiePlus/SandMan/SandManTray.cpp
@@ -542,22 +542,6 @@ void CSandMan::OnBoxMenu(const QPoint& point)
QTreeWidgetItem* pItem = m_pTrayBoxes->currentItem();
if (!pItem)
return;
- if (theAPI->IsConnected()) {
- if (theConf->GetBool("LockTrayMenu", false) && theAPI->IsConfigLocked()) {
- QString Value = QInputDialog::getText(this, "Sandboxie-Plus", tr("Please enter the configuration password."), QLineEdit::Password);
- if (Value.isEmpty()) {
- QMessageBox::warning(this, "Sandboxie-Plus", tr("Login Failed"));
- return;
- }
- SB_STATUS Status = theAPI->UnlockConfig(Value);
- if (!Status.IsError()) {
- QMessageBox::warning(this, "Sandboxie-Plus", tr("Login Failed: %1").arg(FormatError(Status)));
- return;
- }
-
-
- }
- }
CTrayBoxesItemDelegate::m_Hold = true;
m_pBoxView->PopUpMenu(pItem->data(0, Qt::UserRole).toString());
CTrayBoxesItemDelegate::m_Hold = false;
diff --git a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp
index e71f10d4..cf759a01 100644
--- a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp
+++ b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp
@@ -429,7 +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;
//
@@ -1001,7 +1001,6 @@ 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;
@@ -1056,7 +1055,6 @@ 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);
@@ -1666,7 +1664,7 @@ void CSettingsWindow::SaveSettings()
WriteAdvancedCheck(ui.chkAdminOnlyFP, "ForceDisableAdminOnly", "y", "");
WriteAdvancedCheck(ui.chkClearPass, "ForgetPassword", "y", "");
- WriteAdvancedCheck(ui.chkLockTrayMenu, "LockTrayMenu", "y", "");
+
}
if (m_WarnProgsChanged)