diff --git a/mozilla/xpinstall/wizard/windows/setup/xpi.c b/mozilla/xpinstall/wizard/windows/setup/xpi.c index 731fcdac169..a20d1efac67 100644 --- a/mozilla/xpinstall/wizard/windows/setup/xpi.c +++ b/mozilla/xpinstall/wizard/windows/setup/xpi.c @@ -178,6 +178,24 @@ char *GetErrorString(DWORD dwError, char *szErrorString, DWORD dwErrorStringSize return(szErrorString); } +/* function that clears the file progress bar of the xpinstall progress + * dialog. + */ +void InvalidateBarberBarArea() +{ + HWND hWndGauge; + RECT rect; + + /* get the file progress bar gauge */ + hWndGauge = GetDlgItem(dlgInfo.hWndDlg, IDC_GAUGE_FILE); + /* get the dimensions of the gauge */ + GetClientRect(hWndGauge, &rect); + /* invalidate the rect area of the gauge */ + InvalidateRect(hWndGauge, &rect, FALSE); + /* update the dialog */ + UpdateWindow(dlgInfo.hWndDlg); +} + HRESULT SmartUpdateJars() { DWORD dwIndex0; @@ -362,6 +380,7 @@ void cbXPIProgress(const char* msg, PRInt32 val, PRInt32 max) dlgInfo.nFileBars = 0; ++dwCurrentArchive; UpdateGaugeArchiveProgressBar((unsigned)(((double)(dwCurrentArchive)/(double)dwTotalArchives)*(double)100)); + InvalidateBarberBarArea(); bBarberBar = FALSE; } @@ -434,7 +453,10 @@ UpdateGaugeFileBarber() hWndGauge = GetDlgItem(dlgInfo.hWndDlg, IDC_GAUGE_FILE); if(dwBarberDirection == BDIR_RIGHT) { - if(lBarberCounter < 151) + // 121 is the (number of bars) + (number bars in barber bar). + // this number determines how far to the right to draw the barber bat + // so as to make it look like it disappears off the progress meter area. + if(lBarberCounter < 121) ++lBarberCounter; else dwBarberDirection = BDIR_LEFT;