Bug 118563 The new print properties dialog does not save papersize / fix for saving to pref on suite r+sr=neil.parkwaycc.co.uk, a=asa

This commit is contained in:
masayuki%d-toybox.com 2006-07-29 05:43:23 +00:00
parent 750c6197db
commit f1522f36af

View File

@ -142,6 +142,11 @@ function NSPrint()
if (webBrowserPrint) {
gPrintSettings = GetPrintSettings();
webBrowserPrint.print(gPrintSettings, null);
if (gPrintSettingsAreGlobal && gSavePrintSettings) {
var psService = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
.getService(Components.interfaces.nsIPrintSettingsService);
psService.savePrintSettingsToPrefs(gPrintSettings, true, gPrintSettings.kInitSaveAll);
}
}
} catch (e) {
// Pressing cancel is expressed as an NS_ERROR_ABORT return value,