From 779903395dd46ff73eba1f7d4aa9bbb40800e11c Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Fri, 3 Feb 2023 08:00:11 +0100 Subject: [PATCH] 1.7.2 --- SandboxiePlus/SandMan/BoxJob.cpp | 2 +- SandboxiePlus/SandMan/BoxJob.h | 6 +++--- SandboxiePlus/SandMan/SandMan.cpp | 12 ++++++------ SandboxiePlus/SandMan/SandMan.h | 4 ++-- SandboxiePlus/SandMan/SandManRecovery.cpp | 4 ++-- SandboxiePlus/SandMan/SbiePlusAPI.cpp | 8 ++++---- SandboxiePlus/SandMan/SbiePlusAPI.h | 4 ++-- SandboxiePlus/SandMan/Views/SbieView.cpp | 12 ++++++------ SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp | 4 ++-- SandboxiePlus/SandMan/Windows/RecoveryWindow.h | 4 ++-- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/SandboxiePlus/SandMan/BoxJob.cpp b/SandboxiePlus/SandMan/BoxJob.cpp index e871b097..02ee69e5 100644 --- a/SandboxiePlus/SandMan/BoxJob.cpp +++ b/SandboxiePlus/SandMan/BoxJob.cpp @@ -13,7 +13,7 @@ SB_PROGRESS CCleanUpJob::Start() CSandBoxPlus* pBox = GetBox(); SB_PROGRESS Status; - if (!m_DeleteShapshots && pBox->HasSnapshots()) { + if (!m_DeleteSnapshots && pBox->HasSnapshots()) { QString Current; QString Default = pBox->GetDefaultSnapshot(&Current); if (m_bOnAutoDelete) { diff --git a/SandboxiePlus/SandMan/BoxJob.h b/SandboxiePlus/SandMan/BoxJob.h index d109e486..85811746 100644 --- a/SandboxiePlus/SandMan/BoxJob.h +++ b/SandboxiePlus/SandMan/BoxJob.h @@ -32,9 +32,9 @@ class CCleanUpJob : public CBoxJob { protected: friend CSandBoxPlus; - CCleanUpJob(CSandBoxPlus* pBox, bool DeleteShapshots = true, bool bOnAutoDelete = false) : CBoxJob((QObject*)pBox) { + CCleanUpJob(CSandBoxPlus* pBox, bool DeleteSnapshots = true, bool bOnAutoDelete = false) : CBoxJob((QObject*)pBox) { m_Description = tr("Deleting Content"); - m_DeleteShapshots = DeleteShapshots; + m_DeleteSnapshots = DeleteSnapshots; m_bOnAutoDelete = bOnAutoDelete; } @@ -42,7 +42,7 @@ protected: virtual void Finished(); protected: - bool m_DeleteShapshots; + bool m_DeleteSnapshots; bool m_bOnAutoDelete; }; diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index 0c3a153e..e0ad68d7 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -1513,7 +1513,7 @@ void CSandMan::OnBoxSelected() } } -SB_STATUS CSandMan::DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, bool DeleteShapshots) +SB_STATUS CSandMan::DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, bool DeleteSnapshots) { SB_STATUS Ret = SB_OK; m_iDeletingContent++; @@ -1541,7 +1541,7 @@ SB_STATUS CSandMan::DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, boo { SB_PROGRESS Status; - if (Mode != eForDelete && !DeleteShapshots && pBox->HasSnapshots()) { // in auto delete mode always return to last snapshot + if (Mode != eForDelete && !DeleteSnapshots && pBox->HasSnapshots()) { // in auto delete mode always return to last snapshot QString Current; QString Default = pBox->GetDefaultSnapshot(&Current); Status = pBox->SelectSnapshot(Mode == eAuto ? Current : Default); @@ -1730,9 +1730,9 @@ void CSandMan::OnBoxClosed(const CSandBoxPtr& pBox) { if (pBox->GetBool("AutoDelete", false)) { - bool DeleteShapshots = false; + bool DeleteSnapshots = false; // if this box auto deletes first show the recovry dialog with the option to abort deletion - if (!theGUI->OpenRecovery(pBox, DeleteShapshots, true)) // unless no files are found than continue silently + if (!theGUI->OpenRecovery(pBox, DeleteSnapshots, true)) // unless no files are found than continue silently return; if (theConf->GetBool("Options/AutoBoxOpsNotify", false)) @@ -1741,11 +1741,11 @@ void CSandMan::OnBoxClosed(const CSandBoxPtr& pBox) if (theConf->GetBool("Options/UseAsyncBoxOps", false) || IsSilentMode()) { auto pBoxEx = pBox.objectCast(); - SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteShapshots); + SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteSnapshots); CheckResults(QList() << Status); } else - DeleteBoxContent(pBox, eAuto, DeleteShapshots); + DeleteBoxContent(pBox, eAuto, DeleteSnapshots); } } } diff --git a/SandboxiePlus/SandMan/SandMan.h b/SandboxiePlus/SandMan/SandMan.h index 9c81ee3f..4ebe3785 100644 --- a/SandboxiePlus/SandMan/SandMan.h +++ b/SandboxiePlus/SandMan/SandMan.h @@ -44,7 +44,7 @@ public: eForDelete }; - SB_STATUS DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, bool DeleteShapshots = true); + SB_STATUS DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, bool DeleteSnapshots = true); SB_STATUS AddAsyncOp(const CSbieProgressPtr& pProgress, bool bWait = false, const QString& InitialMsg = QString()); static QString FormatError(const SB_STATUS& Error); @@ -154,7 +154,7 @@ public slots: void OnFileToRecover(const QString& BoxName, const QString& FilePath, const QString& BoxPath, quint32 ProcessId); void OnFileRecovered(const QString& BoxName, const QString& FilePath, const QString& BoxPath); - bool OpenRecovery(const CSandBoxPtr& pBox, bool& DeleteShapshots, bool bCloseEmpty = false); + bool OpenRecovery(const CSandBoxPtr& pBox, bool& DeleteSnapshots, bool bCloseEmpty = false); class CRecoveryWindow* ShowRecovery(const CSandBoxPtr& pBox, bool bFind = true); void UpdateSettings(bool bRebuildUI); diff --git a/SandboxiePlus/SandMan/SandManRecovery.cpp b/SandboxiePlus/SandMan/SandManRecovery.cpp index 5d01bbd4..e5b1ac1b 100644 --- a/SandboxiePlus/SandMan/SandManRecovery.cpp +++ b/SandboxiePlus/SandMan/SandManRecovery.cpp @@ -23,7 +23,7 @@ void CSandMan::OnFileToRecover(const QString& BoxName, const QString& FilePath, m_pPopUpWindow->AddFileToRecover(FilePath, BoxPath, pBox, ProcessId); } -bool CSandMan::OpenRecovery(const CSandBoxPtr& pBox, bool& DeleteShapshots, bool bCloseEmpty) +bool CSandMan::OpenRecovery(const CSandBoxPtr& pBox, bool& DeleteSnapshots, bool bCloseEmpty) { auto pBoxEx = pBox.objectCast(); if (!pBoxEx) return false; @@ -47,7 +47,7 @@ bool CSandMan::OpenRecovery(const CSandBoxPtr& pBox, bool& DeleteShapshots, bool if (pBoxEx->m_pRecoveryWnd->exec() != 1) return false; } - DeleteShapshots = pRecoveryWnd->IsDeleteShapshots(); + DeleteSnapshots = pRecoveryWnd->IsDeleteSnapshots(); return true; } diff --git a/SandboxiePlus/SandMan/SbiePlusAPI.cpp b/SandboxiePlus/SandMan/SbiePlusAPI.cpp index 95c57289..4e4ea61e 100644 --- a/SandboxiePlus/SandMan/SbiePlusAPI.cpp +++ b/SandboxiePlus/SandMan/SbiePlusAPI.cpp @@ -386,9 +386,9 @@ bool CSandBoxPlus::IsBoxexPath(const QString& Path) return Path.left(m_FilePath.length()).compare(m_FilePath, Qt::CaseInsensitive) == 0; } -bool CSandBoxPlus::IsFileDeleted(const QString& RealPath, const QString& Shapshot, const QStringList& SnapshotList, const QMap>& DeletedPaths) +bool CSandBoxPlus::IsFileDeleted(const QString& RealPath, const QString& Snapshot, const QStringList& SnapshotList, const QMap>& DeletedPaths) { - int NextIndex = SnapshotList.indexOf(Shapshot) - 1; + int NextIndex = SnapshotList.indexOf(Snapshot) - 1; if (NextIndex < 0) return false; // no newer snapshot QString NewerSnapshot = SnapshotList.at(NextIndex); @@ -893,7 +893,7 @@ int CSandBoxPlus::IsLeaderProgram(const QString& ProgName) return FindInStrList(Programs, ProgName) != Programs.end() ? 1 : 0; } -SB_STATUS CSandBoxPlus::DeleteContentAsync(bool DeleteShapshots, bool bOnAutoDelete) +SB_STATUS CSandBoxPlus::DeleteContentAsync(bool DeleteSnapshots, bool bOnAutoDelete) { if (GetBool("NeverDelete", false)) return SB_ERR(SB_DeleteProtect); @@ -908,7 +908,7 @@ SB_STATUS CSandBoxPlus::DeleteContentAsync(bool DeleteShapshots, bool bOnAutoDel AddJobToQueue(pJob); } - CBoxJob* pJob = new CCleanUpJob(this, DeleteShapshots, bOnAutoDelete); + CBoxJob* pJob = new CCleanUpJob(this, DeleteSnapshots, bOnAutoDelete); AddJobToQueue(pJob); return SB_OK; diff --git a/SandboxiePlus/SandMan/SbiePlusAPI.h b/SandboxiePlus/SandMan/SbiePlusAPI.h index 59baf11a..b1dc8e81 100644 --- a/SandboxiePlus/SandMan/SbiePlusAPI.h +++ b/SandboxiePlus/SandMan/SbiePlusAPI.h @@ -151,7 +151,7 @@ public: bool IsOpen() const { return m_bRootAccessOpen; } bool IsBusy() const { return IsSizePending() || !m_JobQueue.isEmpty(); } - SB_STATUS DeleteContentAsync(bool DeleteShapshots = true, bool bOnAutoDelete = false); + SB_STATUS DeleteContentAsync(bool DeleteSnapshots = true, bool bOnAutoDelete = false); struct SLink { QString Folder; @@ -201,7 +201,7 @@ protected: static void ExportBoxAsync(const CSbieProgressPtr& pProgress, const QString& ExportPath, const QString& RootPath, const QString& Section); static void ImportBoxAsync(const CSbieProgressPtr& pProgress, const QString& ImportPath, const QString& RootPath, const QString& BoxName); - bool IsFileDeleted(const QString& RealPath, const QString& Shapshot, const QStringList& SnapshotList, const QMap>& DeletedPaths); + bool IsFileDeleted(const QString& RealPath, const QString& Snapshot, const QStringList& SnapshotList, const QMap>& DeletedPaths); QList> m_JobQueue; diff --git a/SandboxiePlus/SandMan/Views/SbieView.cpp b/SandboxiePlus/SandMan/Views/SbieView.cpp index 6a9bb8c3..97bf344d 100644 --- a/SandboxiePlus/SandMan/Views/SbieView.cpp +++ b/SandboxiePlus/SandMan/Views/SbieView.cpp @@ -1317,7 +1317,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList& SandB } else if (Action == m_pMenuCleanUp) { - bool DeleteShapshots = false; + bool DeleteSnapshots = false; if (SandBoxes.count() == 1) { @@ -1329,15 +1329,15 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList& SandB if (theConf->GetBool("Options/ShowRecovery", false)) { // Use recovery dialog in place of the confirmation messagebox for box clean up - if(!theGUI->OpenRecovery(SandBoxes.first(), DeleteShapshots)) + if(!theGUI->OpenRecovery(SandBoxes.first(), DeleteSnapshots)) return; } else if(CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Do you want to delete the content of the selected sandbox?") - , tr("Also delete all Snapshots"), &DeleteShapshots, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes) != QDialogButtonBox::Yes) + , tr("Also delete all Snapshots"), &DeleteSnapshots, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes) != QDialogButtonBox::Yes) return; } else if(CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Do you really want to delete the content of all selected sandboxes?") - , tr("Also delete all Snapshots"), &DeleteShapshots, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes) != QDialogButtonBox::Yes) + , tr("Also delete all Snapshots"), &DeleteSnapshots, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes) != QDialogButtonBox::Yes) return; foreach(const CSandBoxPtr &pBox, SandBoxes) @@ -1345,13 +1345,13 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList& SandB if (theConf->GetBool("Options/UseAsyncBoxOps", false) || theGUI->IsSilentMode()) { auto pBoxEx = pBox.objectCast(); - SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteShapshots); + SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteSnapshots); if (Status.IsError()) Results.append(Status); } else { - SB_STATUS Status = theGUI->DeleteBoxContent(pBox, CSandMan::eDefault, DeleteShapshots); + SB_STATUS Status = theGUI->DeleteBoxContent(pBox, CSandMan::eDefault, DeleteSnapshots); if (Status.GetMsgCode() == SB_Canceled) break; Results.append(Status); diff --git a/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp b/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp index 17ce9a0f..41f90330 100644 --- a/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp @@ -56,7 +56,7 @@ CRecoveryWindow::CRecoveryWindow(const CSandBoxPtr& pBox, bool bImmediate, QWidg m_LastTargetIndex = 0; m_bTargetsChanged = false; m_bReloadPending = false; - m_DeleteShapshots = false; + m_DeleteSnapshots = false; QStyle* pStyle = QStyleFactory::create("windows"); ui.treeFiles->setStyle(pStyle); @@ -259,7 +259,7 @@ void CRecoveryWindow::OnDeleteAll() void CRecoveryWindow::OnDeleteEverything() { - m_DeleteShapshots = true; + m_DeleteSnapshots = true; OnDeleteAll(); } diff --git a/SandboxiePlus/SandMan/Windows/RecoveryWindow.h b/SandboxiePlus/SandMan/Windows/RecoveryWindow.h index 0c8745e7..2766226d 100644 --- a/SandboxiePlus/SandMan/Windows/RecoveryWindow.h +++ b/SandboxiePlus/SandMan/Windows/RecoveryWindow.h @@ -40,7 +40,7 @@ public: ~CRecoveryWindow(); bool IsDeleteDialog() const; - bool IsDeleteShapshots() { return m_DeleteShapshots; } + bool IsDeleteSnapshots() { return m_DeleteSnapshots; } virtual void accept() {} virtual void reject() { this->close(); } @@ -94,7 +94,7 @@ protected: int m_LastTargetIndex; bool m_bTargetsChanged; bool m_bReloadPending; - bool m_DeleteShapshots; + bool m_DeleteSnapshots; bool m_bImmediate; private: