summaryrefslogtreecommitdiff
path: root/ui/gui_status_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gui_status_handler.cpp')
-rw-r--r--ui/gui_status_handler.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp
index 120eab39..c8311811 100644
--- a/ui/gui_status_handler.cpp
+++ b/ui/gui_status_handler.cpp
@@ -175,16 +175,18 @@ void CompareStatusHandler::abortThisProcess()
requestAbortion(); //just make sure...
throw GuiAbortProcess();
}
-//########################################################################################################
+//########################################################################################################
SyncStatusHandler::SyncStatusHandler(MainDialog* parentDlg,
+ size_t lastSyncsLogFileSizeMax,
OnGuiError handleError,
const std::wstring& jobName,
const std::wstring& execWhenFinished,
std::vector<std::wstring>& execFinishedHistory) :
parentDlg_(parentDlg),
syncStatusFrame(*this, *this, parentDlg, true, jobName, execWhenFinished, execFinishedHistory),
+ lastSyncsLogFileSizeMax_(lastSyncsLogFileSizeMax),
handleError_(handleError),
jobName_(jobName)
{
@@ -225,12 +227,17 @@ SyncStatusHandler::~SyncStatusHandler()
errorLog.logMsg(finalStatus, TYPE_INFO);
}
- const Utf8String logStream = generateLogStream(errorLog, jobName_, finalStatus,
- getObjectsCurrent(PHASE_SYNCHRONIZING), getDataCurrent(PHASE_SYNCHRONIZING),
- getObjectsTotal (PHASE_SYNCHRONIZING), getDataTotal (PHASE_SYNCHRONIZING), totalTime.Time() / 1000);
+ const SummaryInfo summary =
+ {
+ jobName_, finalStatus,
+ getObjectsCurrent(PHASE_SYNCHRONIZING), getDataCurrent(PHASE_SYNCHRONIZING),
+ getObjectsTotal (PHASE_SYNCHRONIZING), getDataTotal (PHASE_SYNCHRONIZING),
+ totalTime.Time() / 1000
+ };
+
try
{
- saveToLastSyncsLog(logStream); //throw FileError
+ saveToLastSyncsLog(summary, errorLog, lastSyncsLogFileSizeMax_); //throw FileError
}
catch (FileError&) {}
bgstack15