зеркало из https://github.com/mozilla/pjs.git
Follow up to bug 420050 Changing the print orientation requires a restart of TB (fixes SM as well). r=Neil,iann_bugzilla,sr=Neil
This commit is contained in:
Родитель
9c33bc6b0a
Коммит
632a00639b
|
@ -68,7 +68,6 @@ const kMsgNotificationRemoteImages = 3;
|
|||
|
||||
var gMessengerBundle;
|
||||
var gPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);
|
||||
var gPrintSettings = null;
|
||||
var gMarkViewedMessageAsReadTimer = null; // if the user has configured the app to mark a message as read if it is viewed for more than n seconds
|
||||
|
||||
// the user preference,
|
||||
|
@ -2010,11 +2009,10 @@ function PrintEnginePrintInternal(messageList, numMessages, doPrintPreview, msgT
|
|||
return false;
|
||||
}
|
||||
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all,centerscreen",
|
||||
numMessages, messageList, statusFeedback, gPrintSettings, doPrintPreview, msgType, window);
|
||||
numMessages, messageList, statusFeedback, doPrintPreview, msgType, window);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ var gSearchTimer = null;
|
|||
var gStatusText = null;
|
||||
var gQueryURIFormat = null;
|
||||
var gSearchInput;
|
||||
var gPrintSettings = null;
|
||||
var gDirTree;
|
||||
var gCardViewBox;
|
||||
var gCardViewBoxEmail1;
|
||||
|
@ -365,13 +364,11 @@ function AbPrintCardInternal(doPrintPreview, msgType)
|
|||
}
|
||||
}
|
||||
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
totalCard, selectionArray, statusFeedback,
|
||||
gPrintSettings, doPrintPreview, msgType);
|
||||
doPrintPreview, msgType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -410,12 +407,10 @@ function AbPrintAddressBookInternal(doPrintPreview, msgType)
|
|||
var abURIArr = uri.split("://");
|
||||
var printUrl = "addbook://" + abURIArr[0] + "/" + abURIArr[1] + "?action=print"
|
||||
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
1, [printUrl], statusFeedback, gPrintSettings, doPrintPreview, msgType);
|
||||
1, [printUrl], statusFeedback, doPrintPreview, msgType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ var gSearchTimer = null;
|
|||
var gStatusText = null;
|
||||
var gQueryURIFormat = null;
|
||||
var gSearchInput;
|
||||
var gPrintSettings = null;
|
||||
var gDirTree;
|
||||
var gSearchBox;
|
||||
var gCardViewBox;
|
||||
|
@ -351,16 +350,11 @@ function AbPrintCardInternal(doPrintPreview, msgType)
|
|||
}
|
||||
}
|
||||
|
||||
if (!gPrintSettings)
|
||||
{
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
totalCard, selectionArray, statusFeedback,
|
||||
gPrintSettings, doPrintPreview, msgType);
|
||||
doPrintPreview, msgType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -399,14 +393,10 @@ function AbPrintAddressBookInternal(doPrintPreview, msgType)
|
|||
var abURIArr = uri.split("://");
|
||||
var printUrl = "addbook://" + abURIArr[0] + "/" + abURIArr[1] + "?action=print"
|
||||
|
||||
if (!gPrintSettings) {
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
1, [printUrl], statusFeedback, gPrintSettings, doPrintPreview, msgType);
|
||||
1, [printUrl], statusFeedback, doPrintPreview, msgType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,6 @@ var gOfflinePromptsBundle;
|
|||
var gOfflineManager;
|
||||
var gWindowManagerInterface;
|
||||
var gPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);
|
||||
var gPrintSettings = null;
|
||||
var gWindowReuse = 0;
|
||||
var gMarkViewedMessageAsReadTimer = null; // if the user has configured the app to mark a message as read if it is viewed for more than n seconds
|
||||
|
||||
|
@ -1716,13 +1715,10 @@ function PrintEnginePrintInternal(messageList, numMessages, doPrintPreview, msgT
|
|||
return false;
|
||||
}
|
||||
|
||||
if (gPrintSettings == null) {
|
||||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all,centerscreen",
|
||||
numMessages, messageList, statusFeedback, gPrintSettings, doPrintPreview, msgType, window);
|
||||
numMessages, messageList, statusFeedback, doPrintPreview, msgType, window);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -59,6 +59,10 @@ function PrintEngineCreateGlobals()
|
|||
/* get the print engine instance */
|
||||
printEngine = Components.classes[printEngineContractID].createInstance();
|
||||
printEngine = printEngine.QueryInterface(Components.interfaces.nsIMsgPrintEngine);
|
||||
printSettings = PrintUtils.getPrintSettings();
|
||||
if (printSettings) {
|
||||
printSettings.isCancelled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function getWebNavigation()
|
||||
|
@ -153,28 +157,22 @@ function InitPrintEngineWindow()
|
|||
var numSelected = window.arguments[0];
|
||||
var uriArray = window.arguments[1];
|
||||
var statusFeedback = window.arguments[2];
|
||||
if (window.arguments[3]) {
|
||||
printSettings = window.arguments[3].QueryInterface(Components.interfaces.nsIPrintSettings);
|
||||
if (printSettings) {
|
||||
printSettings.isCancelled = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (window.arguments[4]) {
|
||||
printEngine.doPrintPreview = window.arguments[4];
|
||||
if (window.arguments[3]) {
|
||||
printEngine.doPrintPreview = window.arguments[3];
|
||||
} else {
|
||||
printEngine.doPrintPreview = false;
|
||||
}
|
||||
printEngine.showWindow(false);
|
||||
|
||||
if (window.arguments.length > 5) {
|
||||
printEngine.setMsgType(window.arguments[5]);
|
||||
if (window.arguments.length > 4) {
|
||||
printEngine.setMsgType(window.arguments[4]);
|
||||
} else {
|
||||
printEngine.setMsgType(Components.interfaces.nsIMsgPrintEngine.MNAB_START);
|
||||
}
|
||||
|
||||
if (window.arguments.length > 6) {
|
||||
printEngine.setParentWindow(window.arguments[6]);
|
||||
if (window.arguments.length > 5) {
|
||||
printEngine.setParentWindow(window.arguments[5]);
|
||||
} else {
|
||||
printEngine.setParentWindow(null);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче