'Bug 1636668 - followup - remove calendar/ usage of gSavePrintSettings. rs=eslint DONTBUILD
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Tue, 12 May 2020 16:31:42 +0300
changeset 39121 d82bed3a0d0d71f62113909ff90c5d9fdeea18ab
parent 39120 ec00afab1f6964728960b1bded64cccc4af94a4b
child 39122 8d4c676d5d53986359ff4214141f7f50015f04ef
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewerseslint
bugs1636668
'Bug 1636668 - followup - remove calendar/ usage of gSavePrintSettings. rs=eslint DONTBUILD gSavePrintSettings was removed in https://hg.mozilla.org/mozilla-central/rev/ebe64667adaa
calendar/base/content/dialogs/calendar-print-dialog.js
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -287,24 +287,16 @@ document.addEventListener("dialogaccept"
       // onetime listener here nor should we close too early so that the
       // the opener is still available when the document finally loaded
       if (aEvent.type == "unload" && printWindow.document.readyState == "complete") {
         printWindow.removeEventListener("unload", closer);
         window.close();
       }
     };
     printWindow.addEventListener("unload", closer);
-
-    if (gSavePrintSettings) {
-      let PSSVC = Cc["@mozilla.org/gfx/printsettings-service;1"].getService(
-        Ci.nsIPrintSettingsService
-      );
-      PSSVC.savePrintSettingsToPrefs(printSettings, true, printSettings.kInitSaveAll);
-      PSSVC.savePrintSettingsToPrefs(printSettings, false, printSettings.kInitSavePrinterName);
-    }
   });
   event.preventDefault(); // leave open
 });
 
 /**
  * Called when once a date has been selected in the datepicker.
  */
 function onDatePick() {