diff --git a/src/xvaga/oswin32.cpp b/src/xvaga/oswin32.cpp index 700c70339..06cec3dd0 100755 --- a/src/xvaga/oswin32.cpp +++ b/src/xvaga/oswin32.cpp @@ -1084,14 +1084,26 @@ bool Win32ProgressIndicator::SetProgress(long nCurrent, long nTotal) if (nSec > 0) { const int nSpeed = nCurrent / nSec; + const int nRemaining = nTotal - nCurrent; + const int remainingTime = nRemaining / nSpeed; int s = nSec; const int h = s / 3600; s %= 3600; const int m = s / 60; s %= 60; wxString str; - if (nSpeed < 120) - str.Format("%d%% - %ld / %ld - %02d:%02d:%02d - %d / sec", _perc, nCurrent, nTotal, h, m, s, nSpeed); + + str = str.Format("%d%% - Trascorsi %02d:%02d:%02d", _perc, h, m, s); + if (nSpeed < 120) + str << str.Format(" - Velocità %d/sec - %d sec.alla fine", nSpeed, remainingTime); else - str.Format("%d%% - %ld / %ld - %02d:%02d:%02d - %d / min", _perc, nCurrent, nTotal, h, m, s, nSpeed/60); + { + const int mins = remainingTime / 60; + + str << str.Format(" - Velocità %d/min", nSpeed * 60); + if (mins < 2) + str << str.Format(" - %d sec.alla fine", remainingTime); + else + str << str.Format(" - %d min.alla fine", mins); + } m_ppd->SetLine(2, str2wstr(str), FALSE, NULL); } } @@ -1141,7 +1153,7 @@ Win32ProgressIndicator::Win32ProgressIndicator(WXHWND hwndParent, const char* st if (strTitle && *strTitle) m_ppd->SetTitle(str2wstr(strTitle)); // Set the title of the dialog. - DWORD dwFlags = PROGDLG_AUTOTIME | PROGDLG_MODAL | PROGDLG_NOMINIMIZE; + DWORD dwFlags = PROGDLG_NOTIME | PROGDLG_MODAL | PROGDLG_NOMINIMIZE; if (nMax <= 1) { if (nMax == 1)