зеркало из https://github.com/mozilla/gecko-dev.git
Turn on pluggable dialogs (second part of checkin, first part Bug 135441)
Bug 115136 r=dcone sr=attinasi
This commit is contained in:
Родитель
e072b22821
Коммит
628815d8bb
|
@ -125,7 +125,7 @@ function getBrowserURL() {
|
|||
return "chrome://navigator/content/navigator.xul";
|
||||
}
|
||||
|
||||
function goPageSetup(printSettings)
|
||||
function goPageSetup(domwin, printSettings)
|
||||
{
|
||||
try {
|
||||
if (printSettings == null) {
|
||||
|
@ -135,10 +135,12 @@ function goPageSetup(printSettings)
|
|||
// This code calls the printoptions service to bring up the printoptions
|
||||
// dialog. This will be an xp dialog if the platform did not override
|
||||
// the ShowPrintSetupDialog method.
|
||||
var printOptionsService = Components.classes["@mozilla.org/gfx/printoptions;1"]
|
||||
.getService(Components.interfaces.nsIPrintOptions);
|
||||
printOptionsService.ShowPrintSetupDialog(printSettings);
|
||||
} catch(e) {
|
||||
var printingPromptService = Components.classes["@mozilla.org/embedcomp/printingprompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPrintingPromptService);
|
||||
printingPromptService.showPageSetup(domwin, printSettings);
|
||||
return true;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче