From 7566ecdbdcd9e2286779dedda9f61f10e139e6cb Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Fri, 10 Feb 2006 22:49:22 +0000 Subject: [PATCH] b=118889 r=rods sr=sfraser Fixed app. so printSettings dialogs will work --- widget/src/mac/nsPrintOptionsX.cpp | 7 ++++++- widget/src/mac/nsPrintOptionsX.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/widget/src/mac/nsPrintOptionsX.cpp b/widget/src/mac/nsPrintOptionsX.cpp index c13ee0c9106a..bcdd8567929e 100644 --- a/widget/src/mac/nsPrintOptionsX.cpp +++ b/widget/src/mac/nsPrintOptionsX.cpp @@ -86,8 +86,11 @@ nsPrintOptionsX::~nsPrintOptionsX() /** --------------------------------------------------- */ NS_IMETHODIMP -nsPrintOptionsX::ShowNativeDialog(void) +nsPrintOptionsX::ShowPrintSetupDialog(nsIPrintSettings *aThePrintSettings) { + + ReadPrefs(); + NS_ASSERTION(mPageFormat != kPMNoPageFormat, "No page format"); if (mPageFormat == kPMNoPageFormat) return NS_ERROR_NOT_INITIALIZED; @@ -104,6 +107,8 @@ nsPrintOptionsX::ShowNativeDialog(void) status = ::PMPageSetupDialog(mPageFormat, &accepted); ::PMEnd(); + + WritePrefs(); if (status != noErr) return NS_ERROR_FAILURE; diff --git a/widget/src/mac/nsPrintOptionsX.h b/widget/src/mac/nsPrintOptionsX.h index 5974c072ff6a..5f0610acce38 100644 --- a/widget/src/mac/nsPrintOptionsX.h +++ b/widget/src/mac/nsPrintOptionsX.h @@ -55,7 +55,7 @@ public: nsPrintOptionsX(); virtual ~nsPrintOptionsX(); - NS_IMETHOD ShowNativeDialog(void); + NS_IMETHOD ShowPrintSetupDialog(nsIPrintSettings *aThePrintSettings); NS_IMETHOD ReadPrefs(void); NS_IMETHOD WritePrefs(void);