Update the progress meter during download. From David Haas (haasd@cae.wisc.edu)

This commit is contained in:
pinkerton%netscape.com 2002-05-03 19:22:23 +00:00
Родитель b96d3aa698
Коммит 30bb576af7
4 изменённых файлов: 52 добавлений и 20 удалений

Просмотреть файл

@ -100,12 +100,16 @@ NS_IMPL_ISUPPORTS1(nsDownloadListener, nsIWebProgressListener)
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP
nsDownloadListener::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
{
NSProgressIndicator *progressBar= [mController progressBar];
if ([progressBar doubleValue] == 0.0)
[progressBar setMaxValue:aMaxSelfProgress];
[progressBar setDoubleValue:aCurSelfProgress];
return NS_OK;
}
@ -252,6 +256,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar I
aInputStream, aBypassCache);
NS_ADDREF(mDownloadListener);
}
-(id) progressBar
{
return mProgressBar;
}
-(void) setSourceURL: (const char*)aSource
{

Просмотреть файл

@ -100,12 +100,16 @@ NS_IMPL_ISUPPORTS1(nsDownloadListener, nsIWebProgressListener)
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP
nsDownloadListener::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
{
NSProgressIndicator *progressBar= [mController progressBar];
if ([progressBar doubleValue] == 0.0)
[progressBar setMaxValue:aMaxSelfProgress];
[progressBar setDoubleValue:aCurSelfProgress];
return NS_OK;
}
@ -252,6 +256,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar I
aInputStream, aBypassCache);
NS_ADDREF(mDownloadListener);
}
-(id) progressBar
{
return mProgressBar;
}
-(void) setSourceURL: (const char*)aSource
{

Просмотреть файл

@ -100,12 +100,16 @@ NS_IMPL_ISUPPORTS1(nsDownloadListener, nsIWebProgressListener)
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP
nsDownloadListener::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
{
NSProgressIndicator *progressBar= [mController progressBar];
if ([progressBar doubleValue] == 0.0)
[progressBar setMaxValue:aMaxSelfProgress];
[progressBar setDoubleValue:aCurSelfProgress];
return NS_OK;
}
@ -252,6 +256,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar I
aInputStream, aBypassCache);
NS_ADDREF(mDownloadListener);
}
-(id) progressBar
{
return mProgressBar;
}
-(void) setSourceURL: (const char*)aSource
{

Просмотреть файл

@ -100,12 +100,16 @@ NS_IMPL_ISUPPORTS1(nsDownloadListener, nsIWebProgressListener)
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
NS_IMETHODIMP
nsDownloadListener::OnProgressChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
nsIRequest *aRequest,
PRInt32 aCurSelfProgress,
PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress,
PRInt32 aMaxTotalProgress)
{
NSProgressIndicator *progressBar= [mController progressBar];
if ([progressBar doubleValue] == 0.0)
[progressBar setMaxValue:aMaxSelfProgress];
[progressBar setDoubleValue:aCurSelfProgress];
return NS_OK;
}
@ -252,6 +256,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar I
aInputStream, aBypassCache);
NS_ADDREF(mDownloadListener);
}
-(id) progressBar
{
return mProgressBar;
}
-(void) setSourceURL: (const char*)aSource
{