summaryrefslogtreecommitdiff
path: root/ui/gui_status_handler.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:59 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:59 +0200
commita1c91f4695e208d5a8f80dc37b1818169b7829ff (patch)
tree52f5134376d17c99b6c9e53133a2eb5cf171377c /ui/gui_status_handler.cpp
parent5.16 (diff)
downloadFreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.tar.gz
FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.tar.bz2
FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.zip
5.17
Diffstat (limited to 'ui/gui_status_handler.cpp')
-rw-r--r--ui/gui_status_handler.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp
index c740bd09..db92c24c 100644
--- a/ui/gui_status_handler.cpp
+++ b/ui/gui_status_handler.cpp
@@ -194,26 +194,26 @@ SyncStatusHandler::~SyncStatusHandler()
std::wstring finalStatus;
if (abortIsRequested())
{
- finalStatus = _("Synchronization aborted!");
+ finalStatus = _("Synchronization aborted");
errorLog.logMsg(finalStatus, TYPE_ERROR);
}
else if (totalErrors > 0)
{
- finalStatus = _("Synchronization completed with errors!");
+ finalStatus = _("Synchronization completed with errors");
errorLog.logMsg(finalStatus, TYPE_ERROR);
}
else if (totalWarnings > 0)
{
- finalStatus = _("Synchronization completed with warnings.");
+ finalStatus = _("Synchronization completed with warnings");
errorLog.logMsg(finalStatus, TYPE_WARNING); //give status code same warning priority as display category!
}
else
{
if (getObjectsTotal(PHASE_SYNCHRONIZING) == 0 && //we're past "initNewPhase(PHASE_SYNCHRONIZING)" at this point!
getDataTotal (PHASE_SYNCHRONIZING) == 0)
- finalStatus = _("Nothing to synchronize!"); //even if "ignored conflicts" occurred!
+ finalStatus = _("Nothing to synchronize"); //even if "ignored conflicts" occurred!
else
- finalStatus = _("Synchronization completed successfully.");
+ finalStatus = _("Synchronization completed successfully");
errorLog.logMsg(finalStatus, TYPE_INFO);
}
@@ -267,8 +267,8 @@ SyncStatusHandler::~SyncStatusHandler()
//-> nicely manages dialog lifetime
while (progressDlg)
{
+ updateUiNow(); //*first* refresh GUI (removing flicker) before sleeping!
boost::this_thread::sleep(boost::posix_time::milliseconds(UI_UPDATE_INTERVAL));
- updateUiNow();
}
}
}
@@ -301,7 +301,8 @@ void SyncStatusHandler::reportInfo(const std::wstring& text)
ProcessCallback::Response SyncStatusHandler::reportError(const std::wstring& errorMessage)
{
- errorLog.logMsg(errorMessage, TYPE_ERROR); //always, even for "retry"
+ //always, except for "retry":
+ zen::ScopeGuard guardWriteLog = zen::makeGuard([&] { errorLog.logMsg(errorMessage, TYPE_ERROR); });
switch (handleError_)
{
@@ -323,6 +324,8 @@ ProcessCallback::Response SyncStatusHandler::reportError(const std::wstring& err
return ProcessCallback::IGNORE_ERROR;
case ReturnErrorDlg::BUTTON_RETRY:
+ guardWriteLog.dismiss();
+ errorLog.logMsg(_("Retrying operation after error:") + L" " + errorMessage, TYPE_INFO); //explain why there are duplicate "doing operation X" info messages in the log!
return ProcessCallback::RETRY;
case ReturnErrorDlg::BUTTON_CANCEL:
bgstack15