diff --git a/CHANGELOG.md b/CHANGELOG.md index ef7f1c52..181caa72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - split the advanced new box wizard page in two - reorganized box options a bit +- Extend "Temp Template" to make it could delete local template section. ### Fixed - fixed issue with proxy authentication setting diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index 43fcdb41..31f242d5 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -2308,15 +2308,21 @@ void CSandMan::OnBoxClosed(const CSandBoxPtr& pBox) } QString tempValPrefix = "Temp_"; + QString tempValLocalPrefix = "Local_Temp_"; QStringList to_delete; QStringList list = pBox->GetTextList("Template", FALSE); foreach(const QString& Value, list) { if (tempValPrefix.compare(Value.left(5)) == 0) to_delete.append(Value); + else if (tempValLocalPrefix.compare(Value.left(11)) == 0) + to_delete.append(Value); } if (!to_delete.isEmpty()) { - foreach(const QString & Value, to_delete) + foreach(const QString& Value, to_delete) { + if (tempValLocalPrefix.compare(Value.left(11)) == 0) + theAPI->SbieIniSet("Template_" + tempValLocalPrefix, "*", "", CSbieAPI::eIniUpdate); list.removeAt(list.indexOf(Value)); + } pBox->UpdateTextList("Template", list, FALSE); }