This commit is contained in:
love-code-yeyixiao 2024-02-25 14:30:10 +08:00
commit 7f67acdbc8
2 changed files with 9 additions and 2 deletions

View File

@ -2258,6 +2258,13 @@ void CSandMan::OnStartMenuChanged()
void CSandMan::OnBoxClosed(const CSandBoxPtr& pBox) void CSandMan::OnBoxClosed(const CSandBoxPtr& pBox)
{ {
foreach(const QString & Value, pBox->GetTextList("OnBoxTerminate", true, false, true)) {
QString Value2 = pBox->Expand(Value);
CSbieProgressPtr pProgress = CSbieUtils::RunCommand(Value2, true);
if (!pProgress.isNull()) {
AddAsyncOp(pProgress, true, tr("Executing OnBoxTerminate: %1").arg(Value2));
}
}
if (!pBox->GetBool("NeverDelete", false)) if (!pBox->GetBool("NeverDelete", false))
{ {
if (pBox->GetBool("AutoDelete", false)) if (pBox->GetBool("AutoDelete", false))

View File

@ -430,7 +430,7 @@ void COptionsWindow::SaveAdvanced()
WriteTextList("AutoExec", AutoExec); WriteTextList("AutoExec", AutoExec);
WriteTextList("OnFileRecovery", RecoveryCheck); WriteTextList("OnFileRecovery", RecoveryCheck);
WriteTextList("OnBoxDelete", DeleteCommand); WriteTextList("OnBoxDelete", DeleteCommand);
WriteTextList("OnBoxTerimate", TerminateCommand); WriteTextList("OnBoxTerminate", TerminateCommand);
// //