summaryrefslogtreecommitdiff
path: root/ui/progress_indicator.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:09 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:24:09 +0200
commit110fc5dee14fc7988f631a158e50d283446aba7a (patch)
tree7c19dfd3bdb8c4636409ec80a38c70499ac006db /ui/progress_indicator.cpp
parent5.14 (diff)
downloadFreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.tar.gz
FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.tar.bz2
FreeFileSync-110fc5dee14fc7988f631a158e50d283446aba7a.zip
5.15
Diffstat (limited to 'ui/progress_indicator.cpp')
-rw-r--r--ui/progress_indicator.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/ui/progress_indicator.cpp b/ui/progress_indicator.cpp
index b36ccb0f..d23de61a 100644
--- a/ui/progress_indicator.cpp
+++ b/ui/progress_indicator.cpp
@@ -196,17 +196,17 @@ void CompareProgressDialog::Pimpl::updateStatusPanelNow()
//remaining time and speed: only visible during binary comparison
if (perf)
{
- if (numeric::dist(lastStatCallSpeed, timeElapsed.Time()) >= 500)
+ const long timeNow = timeElapsed.Time();
+ if (numeric::dist(lastStatCallSpeed, timeNow) >= 500)
{
- lastStatCallSpeed = timeElapsed.Time();
+ lastStatCallSpeed = timeNow;
- perf->addSample(objectsCurrent, to<double>(dataCurrent), timeElapsed.Time());
+ perf->addSample(objectsCurrent, to<double>(dataCurrent), timeNow);
//current speed -> Win 7 copy uses 1 sec update interval
setText(*m_staticTextSpeed, perf->getBytesPerSecond(), &layoutChanged);
}
- warn_static("more often: eveyr 100 ms?")
//remaining time
setText(*m_staticTextRemTime, perf->getRemainingTime(to<double>(dataTotal - dataCurrent)), &layoutChanged);
}
@@ -1257,11 +1257,12 @@ void SyncProgressDialog::Pimpl::updateGui(bool allowYield)
assert(perf);
if (perf)
{
- if (numeric::dist(lastStatCallSpeed, timeElapsed.Time()) >= 500)
+ const long timeNow = timeElapsed.Time();
+ if (numeric::dist(lastStatCallSpeed, timeNow) >= 500)
{
- lastStatCallSpeed = timeElapsed.Time();
+ lastStatCallSpeed = timeNow;
- perf->addSample(objectsCurrent, to<double>(dataCurrent), timeElapsed.Time());
+ perf->addSample(objectsCurrent, to<double>(dataCurrent), timeNow);
//current speed -> Win 7 copy uses 1 sec update interval
setText(*m_staticTextSpeed, perf->getBytesPerSecond(), &layoutChanged);
@@ -1617,6 +1618,7 @@ void SyncProgressDialog::Pimpl::processHasFinished(SyncResult resultId, const Er
void SyncProgressDialog::Pimpl::OnOkay(wxCommandEvent& event)
{
+ isZombie = true; //on Fedora the iconize event is executed *before* entering SyncProgressDialog::Pimpl::OnClose()!!!
Close(); //generate close event: do NOT destroy window unconditionally!
}
@@ -1726,7 +1728,9 @@ SyncProgressDialog::SyncProgressDialog(AbortCallback& abortCb,
if (showProgress)
{
pimpl->Show();
- pimpl->updateGui(false); //clear gui flicker, remove dummy texts: window must be visible to make this work!
+ warn_static("problem??")
+ //clear gui flicker, remove dummy texts: window must be visible to make this work!
+ pimpl->updateGui(true); //at least on OS X a real Yield() is required to flush pending GUI updates; Update() is not enough
}
else
pimpl->minimizeToTray();
bgstack15