mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1667265. Remove nsIPrintSettingsService.globalPrintSettings. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D91366
This commit is contained in:
parent
6adbc97285
commit
1890bfffde
@ -39,7 +39,7 @@ function printpreview() {
|
||||
}
|
||||
}
|
||||
let settings = Cc["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Ci.nsIPrintSettingsService).globalPrintSettings;
|
||||
.getService(Ci.nsIPrintSettingsService).newPrintSettings;
|
||||
settings.showPrintProgress = false;
|
||||
gWbp.printPreview(settings, frameElts[0].contentWindow, listener);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ function printpreview() {
|
||||
}
|
||||
|
||||
let settings = Cc["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Ci.nsIPrintSettingsService).globalPrintSettings;
|
||||
.getService(Ci.nsIPrintSettingsService).newPrintSettings;
|
||||
settings.showPrintProgress = false;
|
||||
|
||||
gPrintPreviewWin = frameElts[0].contentWindow.printPreview(settings, listener);
|
||||
|
@ -69,7 +69,7 @@ function printpreview(options = {}) {
|
||||
}
|
||||
}
|
||||
var settings = Cc["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Ci.nsIPrintSettingsService).globalPrintSettings;
|
||||
.getService(Ci.nsIPrintSettingsService).newPrintSettings;
|
||||
settings.showPrintProgress = false;
|
||||
settings.printBGColors = true;
|
||||
settings.headerStrLeft = "";
|
||||
|
@ -121,7 +121,7 @@ class PrintingChild extends ActorChild {
|
||||
Ci.nsIPrintSettingsService
|
||||
);
|
||||
|
||||
let printSettings = PSSVC.globalPrintSettings;
|
||||
let printSettings = PSSVC.newPrintSettings;
|
||||
if (!printSettings.printerName) {
|
||||
printSettings.printerName = lastUsedPrinterName;
|
||||
}
|
||||
|
@ -609,7 +609,7 @@ var PrintUtils = {
|
||||
var PSSVC = Cc["@mozilla.org/gfx/printsettings-service;1"].getService(
|
||||
Ci.nsIPrintSettingsService
|
||||
);
|
||||
printSettings = PSSVC.globalPrintSettings;
|
||||
printSettings = PSSVC.newPrintSettings;
|
||||
if (aPrinterName) {
|
||||
printSettings.printerName = aPrinterName;
|
||||
}
|
||||
|
@ -29,11 +29,6 @@ namespace embedding {
|
||||
[scriptable, uuid(841387C8-72E6-484b-9296-BF6EEA80D58A)]
|
||||
interface nsIPrintSettingsService : nsISupports
|
||||
{
|
||||
/**
|
||||
* Legacy alias for newPrintSettings.
|
||||
*/
|
||||
readonly attribute nsIPrintSettings globalPrintSettings;
|
||||
|
||||
/**
|
||||
* Returns the default print settings as used for printing.
|
||||
*/
|
||||
@ -42,16 +37,10 @@ interface nsIPrintSettingsService : nsISupports
|
||||
/**
|
||||
* Returns a new, unique PrintSettings object each time.
|
||||
*
|
||||
* For example, if each browser was to have its own unique
|
||||
* PrintSettings, then each browser window would call this to
|
||||
* create its own unique PrintSettings object.
|
||||
*
|
||||
* If each browse window was to use the same PrintSettings object
|
||||
* then it should use "globalPrintSettings"
|
||||
*
|
||||
* Initializes the newPrintSettings from the unprefixed printer
|
||||
* (Note: this may not happen if there is an OS specific implementation.)
|
||||
*
|
||||
* XXX This should really be a function called `createPrintSettings()`.
|
||||
*/
|
||||
readonly attribute nsIPrintSettings newPrintSettings;
|
||||
|
||||
|
@ -821,11 +821,11 @@ nsresult nsPrintSettingsService::WritePrefs(nsIPrintSettings* aPS,
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintSettingsService::GetDefaultPrintSettingsForPrinting(
|
||||
nsIPrintSettings** aGlobalPrintSettings) {
|
||||
nsresult rv = GetGlobalPrintSettings(aGlobalPrintSettings);
|
||||
nsIPrintSettings** aPrintSettings) {
|
||||
nsresult rv = GetNewPrintSettings(aPrintSettings);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsIPrintSettings* settings = *aGlobalPrintSettings;
|
||||
nsIPrintSettings* settings = *aPrintSettings;
|
||||
|
||||
nsAutoString printerName;
|
||||
settings->GetPrinterName(printerName);
|
||||
@ -838,12 +838,6 @@ nsPrintSettingsService::GetDefaultPrintSettingsForPrinting(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintSettingsService::GetGlobalPrintSettings(
|
||||
nsIPrintSettings** aGlobalPrintSettings) {
|
||||
return GetNewPrintSettings(aGlobalPrintSettings);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintSettingsService::GetNewPrintSettings(
|
||||
nsIPrintSettings** aNewPrintSettings) {
|
||||
|
Loading…
Reference in New Issue
Block a user