зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1208203 - Display a 'Printing...' indicator toast when starting a print job r=sebastian
This commit is contained in:
Родитель
b34d2af69e
Коммит
1f09adcae3
|
@ -45,6 +45,12 @@ var PrintHelper = {
|
|||
return new Promise((resolve, reject) => {
|
||||
webBrowserPrint.print(printSettings, {
|
||||
onStateChange: function(webProgress, request, stateFlags, status) {
|
||||
// We get two STATE_START calls, one for STATE_IS_DOCUMENT and one for STATE_IS_NETWORK
|
||||
if (stateFlags & Ci.nsIWebProgressListener.STATE_START && stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||
// Let the user know something is happening. Generating the PDF can take some time.
|
||||
NativeWindow.toast.show(Strings.browser.GetStringFromName("alertPrintjobToast"), "long");
|
||||
}
|
||||
|
||||
// We get two STATE_STOP calls, one for STATE_IS_DOCUMENT and one for STATE_IS_NETWORK
|
||||
if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP && stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||
if (Components.isSuccessCode(status)) {
|
||||
|
|
|
@ -38,6 +38,8 @@ alertSearchEngineAddedToast='%S' has been added as a search engine
|
|||
alertSearchEngineErrorToast=Couldn't add '%S' as a search engine
|
||||
alertSearchEngineDuplicateToast='%S' is already one of your search engines
|
||||
|
||||
alertPrintjobToast=Printing…
|
||||
|
||||
downloadCancelPromptTitle=Cancel Download
|
||||
downloadCancelPromptMessage=Do you want to cancel this download?
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче