summaryrefslogtreecommitdiff
path: root/ui/progress_indicator.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:09:24 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:09:24 +0200
commitb5f042a6c132c1b97cf03c4615bab966c23f57d2 (patch)
tree1cb057a0ffd51264bb3c9807e2133505ce312eb1 /ui/progress_indicator.cpp
parent3.11 (diff)
downloadFreeFileSync-b5f042a6c132c1b97cf03c4615bab966c23f57d2.tar.gz
FreeFileSync-b5f042a6c132c1b97cf03c4615bab966c23f57d2.tar.bz2
FreeFileSync-b5f042a6c132c1b97cf03c4615bab966c23f57d2.zip
3.12
Diffstat (limited to 'ui/progress_indicator.cpp')
-rw-r--r--ui/progress_indicator.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp
index 346403ee..e5cfa879 100644
--- a/ui/progress_indicator.cpp
+++ b/ui/progress_indicator.cpp
@@ -384,7 +384,7 @@ void CompareStatus::CompareStatusImpl::updateStatusPanelNow()
class SyncStatus::SyncStatusImpl : public SyncStatusDlgGenerated
{
public:
- SyncStatusImpl(StatusHandler& updater, wxTopLevelWindow* parentWindow);
+ SyncStatusImpl(StatusHandler& updater, wxTopLevelWindow* parentWindow, const wxString& jobName);
~SyncStatusImpl();
void resetGauge(int totalObjectsToProcess, wxLongLong totalDataToProcess);
@@ -410,6 +410,7 @@ private:
bool currentProcessIsRunning();
void showProgressExternally(const wxString& progressText, float percent = 0); //percent may already be included in progressText
+ const wxString jobName_;
wxStopWatch timeElapsed;
StatusHandler* processStatusHandler;
@@ -445,8 +446,8 @@ private:
//redirect to implementation
-SyncStatus::SyncStatus(StatusHandler& updater, wxTopLevelWindow* parentWindow, bool startSilent) :
- pimpl(new SyncStatusImpl(updater, parentWindow))
+SyncStatus::SyncStatus(StatusHandler& updater, wxTopLevelWindow* parentWindow, bool startSilent, const wxString& jobName) :
+ pimpl(new SyncStatusImpl(updater, parentWindow, jobName))
{
if (startSilent)
pimpl->minimizeToTray();
@@ -509,7 +510,7 @@ void SyncStatus::processHasFinished(SyncStatusID id, const wxString& finalMessag
//########################################################################################
-SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWindow* parentWindow) :
+SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWindow* parentWindow, const wxString& jobName) :
SyncStatusDlgGenerated(parentWindow,
wxID_ANY,
parentWindow ? wxString(wxEmptyString) : (wxString(wxT("FreeFileSync - ")) + _("Folder Comparison and Synchronization")),
@@ -517,6 +518,7 @@ SyncStatus::SyncStatusImpl::SyncStatusImpl(StatusHandler& updater, wxTopLevelWin
parentWindow ?
wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT : //wxTAB_TRAVERSAL is needed for standard button handling: wxID_OK/wxID_CANCEL
wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL),
+ jobName_(jobName),
processStatusHandler(&updater),
mainDialog(parentWindow),
totalObjects(0),
@@ -702,26 +704,28 @@ void SyncStatus::SyncStatusImpl::updateStatusDialogNow()
const float percent = totalData == 0 ? 0 : currentData.ToDouble() * 100 / totalData.ToDouble();
//write status information to systray, taskbar, parent title ect.
+
+ const wxString postFix = jobName_.empty() ? wxString() : (wxT(" - \"") + jobName_ + wxT("\""));
switch (currentStatus)
{
case SyncStatus::SCANNING:
- showProgressExternally(numberToStringSep(scannedObjects) + wxT(" - ") + _("Scanning..."));
+ showProgressExternally(numberToStringSep(scannedObjects) + wxT(" - ") + _("Scanning...") + postFix);
break;
case SyncStatus::COMPARING_CONTENT:
- showProgressExternally(formatPercentage(currentData, totalData) + wxT(" - ") + _("Comparing content..."), percent);
+ showProgressExternally(formatPercentage(currentData, totalData) + wxT(" - ") + _("Comparing content...") + postFix, percent);
break;
case SyncStatus::SYNCHRONIZING:
- showProgressExternally(formatPercentage(currentData, totalData) + wxT(" - ") + _("Synchronizing..."), percent);
+ showProgressExternally(formatPercentage(currentData, totalData) + wxT(" - ") + _("Synchronizing...") + postFix, percent);
break;
case SyncStatus::PAUSE:
- showProgressExternally((totalData != 0 ? formatPercentage(currentData, totalData) + wxT(" - ") : wxString()) + _("Paused"), percent);
+ showProgressExternally((totalData != 0 ? formatPercentage(currentData, totalData) + wxT(" - ") : wxString()) + _("Paused") + postFix, percent);
break;
case SyncStatus::ABORTED:
- showProgressExternally(_("Aborted"), percent);
+ showProgressExternally(_("Aborted") + postFix, percent);
break;
case SyncStatus::FINISHED_WITH_SUCCESS:
case SyncStatus::FINISHED_WITH_ERROR:
- showProgressExternally(_("Completed"), percent);
+ showProgressExternally(_("Completed") + postFix, percent);
break;
}
bgstack15