зеркало из https://github.com/mozilla/gecko-dev.git
Bug 351913 Printer paper format always set to letter on TB/Mailnews
p=me r=neil sr=mscott
This commit is contained in:
Родитель
c4bddfb943
Коммит
9427d8ca4c
|
@ -1718,31 +1718,6 @@ function MsgSendUnsentMsgs()
|
|||
MailOfflineMgr.goOnlineToSendMessages(msgWindow);
|
||||
}
|
||||
|
||||
function GetPrintSettings()
|
||||
{
|
||||
var prevPS = gPrintSettings;
|
||||
|
||||
try {
|
||||
if (gPrintSettings == null) {
|
||||
var useGlobalPrintSettings = gPrefBranch.getBoolPref("print.use_global_printsettings");
|
||||
|
||||
// I would rather be using nsIWebBrowserPrint API
|
||||
// but I really don't have a document at this point
|
||||
var printSettingsService = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Components.interfaces.nsIPrintSettingsService);
|
||||
if (useGlobalPrintSettings) {
|
||||
gPrintSettings = printSettingsService.globalPrintSettings;
|
||||
} else {
|
||||
gPrintSettings = printSettingsService.CreatePrintSettings();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
dump("GetPrintSettings "+e);
|
||||
}
|
||||
|
||||
return gPrintSettings;
|
||||
}
|
||||
|
||||
function PrintEnginePrintInternal(messageList, numMessages, doPrintPreview, msgType)
|
||||
{
|
||||
if (numMessages == 0) {
|
||||
|
@ -1751,7 +1726,7 @@ function PrintEnginePrintInternal(messageList, numMessages, doPrintPreview, msgT
|
|||
}
|
||||
|
||||
if (gPrintSettings == null) {
|
||||
gPrintSettings = GetPrintSettings();
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
|
|
|
@ -438,36 +438,6 @@ function AbOnRenameAddressBook(aName)
|
|||
addressbook.modifyAddressBook(addressbookDS, parentDir, selectedABDirectory, properties);
|
||||
}
|
||||
|
||||
function GetPrintSettings()
|
||||
{
|
||||
var prevPS = gPrintSettings;
|
||||
|
||||
try {
|
||||
if (gPrintSettings == null) {
|
||||
var useGlobalPrintSettings = true;
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
if (pref) {
|
||||
useGlobalPrintSettings = pref.getBoolPref("print.use_global_printsettings", false);
|
||||
}
|
||||
|
||||
// I would rather be using nsIWebBrowserPrint API
|
||||
// but I really don't have a document at this point
|
||||
var printSettingsService = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Components.interfaces.nsIPrintSettingsService);
|
||||
if (useGlobalPrintSettings) {
|
||||
gPrintSettings = printSettingsService.globalPrintSettings;
|
||||
} else {
|
||||
gPrintSettings = printSettingsService.CreatePrintSettings();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
dump("GetPrintSettings "+e);
|
||||
}
|
||||
|
||||
return gPrintSettings;
|
||||
}
|
||||
|
||||
function AbPrintCardInternal(doPrintPreview, msgType)
|
||||
{
|
||||
var selectedItems = GetSelectedAbCards();
|
||||
|
@ -501,7 +471,7 @@ function AbPrintCardInternal(doPrintPreview, msgType)
|
|||
|
||||
if (!gPrintSettings)
|
||||
{
|
||||
gPrintSettings = GetPrintSettings();
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
|
|
|
@ -422,36 +422,6 @@ function AbOnRenameAddressBook(aName)
|
|||
addressbook.modifyAddressBook(addressbookDS, parentDir, selectedABDirectory, properties);
|
||||
}
|
||||
|
||||
function GetPrintSettings()
|
||||
{
|
||||
var prevPS = gPrintSettings;
|
||||
|
||||
try {
|
||||
if (gPrintSettings == null) {
|
||||
var useGlobalPrintSettings = true;
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
if (pref) {
|
||||
useGlobalPrintSettings = pref.getBoolPref("print.use_global_printsettings", false);
|
||||
}
|
||||
|
||||
// I would rather be using nsIWebBrowserPrint API
|
||||
// but I really don't have a document at this point
|
||||
var printSettingsService = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Components.interfaces.nsIPrintSettingsService);
|
||||
if (useGlobalPrintSettings) {
|
||||
gPrintSettings = printSettingsService.globalPrintSettings;
|
||||
} else {
|
||||
gPrintSettings = printSettingsService.CreatePrintSettings();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
dump("GetPrintSettings "+e);
|
||||
}
|
||||
|
||||
return gPrintSettings;
|
||||
}
|
||||
|
||||
function AbPrintCardInternal(doPrintPreview, msgType)
|
||||
{
|
||||
var selectedItems = GetSelectedAbCards();
|
||||
|
@ -485,7 +455,7 @@ function AbPrintCardInternal(doPrintPreview, msgType)
|
|||
|
||||
if (!gPrintSettings)
|
||||
{
|
||||
gPrintSettings = GetPrintSettings();
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
|
|
|
@ -1612,31 +1612,6 @@ function MsgSendUnsentMsgs()
|
|||
}
|
||||
}
|
||||
|
||||
function GetPrintSettings()
|
||||
{
|
||||
var prevPS = gPrintSettings;
|
||||
|
||||
try {
|
||||
if (gPrintSettings == null) {
|
||||
var useGlobalPrintSettings = gPrefBranch.getBoolPref("print.use_global_printsettings");
|
||||
|
||||
// I would rather be using nsIWebBrowserPrint API
|
||||
// but I really don't have a document at this point
|
||||
var printSettingsService = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
|
||||
.getService(Components.interfaces.nsIPrintSettingsService);
|
||||
if (useGlobalPrintSettings) {
|
||||
gPrintSettings = printSettingsService.globalPrintSettings;
|
||||
} else {
|
||||
gPrintSettings = printSettingsService.CreatePrintSettings();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
dump("GetPrintSettings "+e);
|
||||
}
|
||||
|
||||
return gPrintSettings;
|
||||
}
|
||||
|
||||
function PrintEnginePrintInternal(messageList, numMessages, doPrintPreview, msgType)
|
||||
{
|
||||
if (numMessages == 0) {
|
||||
|
@ -1645,7 +1620,7 @@ function PrintEnginePrintInternal(messageList, numMessages, doPrintPreview, msgT
|
|||
}
|
||||
|
||||
if (gPrintSettings == null) {
|
||||
gPrintSettings = GetPrintSettings();
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
|
|
Загрузка…
Ссылка в новой задаче