Bug 193001 - "Use gnome's native print dialog" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr+a1.9=roc]
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include "nsISupportsUtils.h"
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIPrintDialogService.h"
|
||||
|
||||
// Printing Progress Includes
|
||||
#include "nsPrintProgress.h"
|
||||
@@ -109,6 +110,13 @@ nsPrintingPromptService::ShowPrintDialog(nsIDOMWindow *parent, nsIWebBrowserPrin
|
||||
NS_ENSURE_ARG(webBrowserPrint);
|
||||
NS_ENSURE_ARG(printSettings);
|
||||
|
||||
// Try to access a component dialog
|
||||
nsCOMPtr<nsIPrintDialogService> dlgPrint(do_GetService(
|
||||
NS_PRINTDIALOGSERVICE_CONTRACTID));
|
||||
if (dlgPrint)
|
||||
return dlgPrint->Show(printSettings);
|
||||
|
||||
// Show the built-in dialog instead
|
||||
ParamBlock block;
|
||||
nsresult rv = block.Init();
|
||||
if (NS_FAILED(rv))
|
||||
@@ -177,6 +185,12 @@ nsPrintingPromptService::ShowPageSetup(nsIDOMWindow *parent, nsIPrintSettings *p
|
||||
{
|
||||
NS_ENSURE_ARG(printSettings);
|
||||
|
||||
// Try to access a component dialog
|
||||
nsCOMPtr<nsIPrintDialogService> dlgPrint(do_GetService(
|
||||
NS_PRINTDIALOGSERVICE_CONTRACTID));
|
||||
if (dlgPrint)
|
||||
return dlgPrint->ShowPageSetup(printSettings);
|
||||
|
||||
ParamBlock block;
|
||||
nsresult rv = block.Init();
|
||||
if (NS_FAILED(rv))
|
||||
|
||||
Reference in New Issue
Block a user