b=118889 r=rods sr=sfraser Fixed app. so printSettings dialogs will work

This commit is contained in:
dcone%netscape.com 2006-02-10 22:49:22 +00:00
Родитель 2e7ccabc8a
Коммит 7566ecdbdc
2 изменённых файлов: 7 добавлений и 2 удалений

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

@ -86,8 +86,11 @@ nsPrintOptionsX::~nsPrintOptionsX()
/** --------------------------------------------------- /** ---------------------------------------------------
*/ */
NS_IMETHODIMP NS_IMETHODIMP
nsPrintOptionsX::ShowNativeDialog(void) nsPrintOptionsX::ShowPrintSetupDialog(nsIPrintSettings *aThePrintSettings)
{ {
ReadPrefs();
NS_ASSERTION(mPageFormat != kPMNoPageFormat, "No page format"); NS_ASSERTION(mPageFormat != kPMNoPageFormat, "No page format");
if (mPageFormat == kPMNoPageFormat) if (mPageFormat == kPMNoPageFormat)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
@ -104,6 +107,8 @@ nsPrintOptionsX::ShowNativeDialog(void)
status = ::PMPageSetupDialog(mPageFormat, &accepted); status = ::PMPageSetupDialog(mPageFormat, &accepted);
::PMEnd(); ::PMEnd();
WritePrefs();
if (status != noErr) if (status != noErr)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;

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

@ -55,7 +55,7 @@ public:
nsPrintOptionsX(); nsPrintOptionsX();
virtual ~nsPrintOptionsX(); virtual ~nsPrintOptionsX();
NS_IMETHOD ShowNativeDialog(void); NS_IMETHOD ShowPrintSetupDialog(nsIPrintSettings *aThePrintSettings);
NS_IMETHOD ReadPrefs(void); NS_IMETHOD ReadPrefs(void);
NS_IMETHOD WritePrefs(void); NS_IMETHOD WritePrefs(void);