This commit is contained in:
DavidXanatos 2023-09-30 18:17:26 +02:00
parent 556c21a14d
commit 97afa28e06
3 changed files with 27 additions and 11 deletions

View File

@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.11.4 / 5.66.4] - 2023-10-
### Changed
- improved lock all boxes behavioure [#3350](https://github.com/sandboxie-plus/Sandboxie/issues/3350)
### Fixed
- fixed issue with unmounting protected images [#3347](https://github.com/sandboxie-plus/Sandboxie/issues/3347)
- fixed Unable to turn off highlight in Sbie Messages search results [#3338](https://github.com/sandboxie-plus/Sandboxie/issues/3338)

View File

@ -2901,13 +2901,13 @@ void CSandMan::OnSandBoxAction()
RunSandboxed(QStringList() << "run_dialog");
}
void CSandMan::TerminateAll(bool bUnmount)
void CSandMan::OnEmptyAll()
{
if (theConf->GetInt("Options/WarnTerminateAll", -1) == -1)
{
bool State = false;
if(CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Do you want to terminate all processes in all sandboxes?")
, tr("Terminate all without asking"), &State, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes, QMessageBox::Information) != QDialogButtonBox::Yes)
, tr("Don't ask in future"), &State, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes, QMessageBox::Information) != QDialogButtonBox::Yes)
return;
if (State)
@ -2915,12 +2915,26 @@ void CSandMan::TerminateAll(bool bUnmount)
}
theAPI->TerminateAll();
}
if (bUnmount) {
QMap<QString, CSandBoxPtr> Boxes = theAPI->GetAllBoxes();
foreach(const CSandBoxPtr & pBox, Boxes) {
if (!pBox->GetMountRoot().isEmpty())
pBox->ImBoxUnmount();
void CSandMan::OnLockAll()
{
if (theConf->GetInt("Options/WarnLockAll", -1) == -1)
{
bool State = false;
if(CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Do you want to terminate all processes in encrypted sandboxes, and unmount them?")
, tr("Don't ask in future"), &State, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes, QMessageBox::Information) != QDialogButtonBox::Yes)
return;
if (State)
theConf->SetValue("Options/WarnLockAll", 1);
}
QMap<QString, CSandBoxPtr> Boxes = theAPI->GetAllBoxes();
foreach(const CSandBoxPtr & pBox, Boxes) {
if (!pBox->GetMountRoot().isEmpty()) {
pBox->TerminateAll();
pBox->ImBoxUnmount();
}
}
}

View File

@ -244,8 +244,8 @@ private slots:
void OnSandBoxAction();
void OnSettingsAction();
void OnEmptyAll() { TerminateAll(false); }
void OnLockAll() { TerminateAll(true); }
void OnEmptyAll();
void OnLockAll();
void OnWndFinder();
void OnBoxAssistant();
void OnDisableForce();
@ -305,8 +305,6 @@ private:
void HandleMaintenance(SB_RESULT(void*) Status);
void TerminateAll(bool bUnmount);
void LoadState(bool bFull = true);
void StoreState();