Turn on pluggable dialogs (second part of checkin, first part Bug 135441)
Bug 115136 r=dcone sr=attinasi git-svn-id: svn://10.0.0.236/trunk@120936 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -984,18 +984,15 @@ LRESULT CBrowserView::OnFindMsg(WPARAM wParam, LPARAM lParam)
|
||||
void CBrowserView::OnFilePrint()
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID, &rv));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
prefs->SetBoolPref("print.use_native_print_dialog", PR_TRUE);
|
||||
prefs->SetBoolPref("print.show_print_progress", PR_FALSE);
|
||||
}
|
||||
else
|
||||
NS_ASSERTION(PR_FALSE, "Could not get preferences service");
|
||||
|
||||
nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(mWebBrowser));
|
||||
if(print)
|
||||
{
|
||||
if (!m_PrintSettings)
|
||||
{
|
||||
print->GetGlobalPrintSettings(getter_AddRefs(m_PrintSettings));
|
||||
}
|
||||
|
||||
m_PrintSettings->SetShowPrintProgress(PR_FALSE);
|
||||
CPrintProgressDialog dlg(mWebBrowser, m_PrintSettings);
|
||||
|
||||
nsCOMPtr<nsIURI> currentURI;
|
||||
|
||||
Reference in New Issue
Block a user