Fixing bug 140183. Checking ShowProgress dialog attribute and pref as printing is done. Patch by Rod Spears. r=danm,bhuvan sr=sspitzer

This commit is contained in:
racham%netscape.com 2002-04-28 01:43:23 +00:00
parent 7b7406ee6f
commit 486f60f0e0
2 changed files with 42 additions and 26 deletions

View File

@ -6629,6 +6629,15 @@ DocumentViewerImpl::DoPrintProgress(PRBool aIsForPrinting)
nsCOMPtr<nsIPref> prefs (do_GetService(NS_PREF_CONTRACTID));
if (prefs) {
prefs->GetBoolPref("print.show_print_progress", &mPrt->mShowProgressDialog);
}
// Turning off the showing of Print Progress in Prefs overrides
// whether the calling PS desire to have it on or off, so only check PS if
// prefs says it's ok to be on.
if (mPrt->mShowProgressDialog) {
mPrt->mPrintSettings->GetShowPrintProgress(&mPrt->mShowProgressDialog);
}
if (mPrt->mShowProgressDialog) {
nsPrintProgressParams* prtProgressParams = new nsPrintProgressParams();
nsCOMPtr<nsIPrintProgressParams> params;
@ -6647,7 +6656,6 @@ DocumentViewerImpl::DoPrintProgress(PRBool aIsForPrinting)
}
}
}
}
/* ========================================================================================
* nsIContentViewerFile

View File

@ -6629,6 +6629,15 @@ DocumentViewerImpl::DoPrintProgress(PRBool aIsForPrinting)
nsCOMPtr<nsIPref> prefs (do_GetService(NS_PREF_CONTRACTID));
if (prefs) {
prefs->GetBoolPref("print.show_print_progress", &mPrt->mShowProgressDialog);
}
// Turning off the showing of Print Progress in Prefs overrides
// whether the calling PS desire to have it on or off, so only check PS if
// prefs says it's ok to be on.
if (mPrt->mShowProgressDialog) {
mPrt->mPrintSettings->GetShowPrintProgress(&mPrt->mShowProgressDialog);
}
if (mPrt->mShowProgressDialog) {
nsPrintProgressParams* prtProgressParams = new nsPrintProgressParams();
nsCOMPtr<nsIPrintProgressParams> params;
@ -6647,7 +6656,6 @@ DocumentViewerImpl::DoPrintProgress(PRBool aIsForPrinting)
}
}
}
}
/* ========================================================================================
* nsIContentViewerFile