Commit ce687b0a authored by Jonathan Watt's avatar Jonathan Watt
Browse files

Bug 1749016. Update Page Setup menu code in printUtils.js to reflect removal...

Bug 1749016. Update Page Setup menu code in printUtils.js to reflect removal of the Print Preview menu. r=mstriemer

Differential Revision: https://phabricator.services.mozilla.com/D135351
parent 98610a85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4709,7 +4709,7 @@ let gFileMenu = {
        document.getElementById("menu_savePage")
      );
    }
    PrintUtils.updatePrintPreviewMenuHiddenState();
    PrintUtils.updatePrintSetupMenuHiddenState();
  },
};

+13 −12
Original line number Diff line number Diff line
@@ -65,6 +65,19 @@ var PrintUtils = {
    ));
  },

  /**
   * Updates the hidden state of the "Page Setup" menu items in the File menu,
   * depending on the value of the `print.show_page_setup_menu` pref.
   * Note: not all platforms have a "Page Setup" menu item (or Page Setup
   * window).
   */
  updatePrintSetupMenuHiddenState() {
    let pageSetupMenuItem = document.getElementById("menu_printSetup");
    if (pageSetupMenuItem) {
      pageSetupMenuItem.hidden = !SHOW_PAGE_SETUP_MENU;
    }
  },

  /**
   * Shows the page setup dialog, and saves any settings changed in
   * that dialog if print.save_print_settings is set to true.
@@ -127,18 +140,6 @@ var PrintUtils = {
    return null;
  },

  /**
   * Updates the hidden state of the "Print preview" and "Page Setup"
   * menu items in the file menu depending on the print tab modal pref.
   * The print preview menu item is not available on mac.
   */
  updatePrintPreviewMenuHiddenState() {
    let pageSetupMenuItem = document.getElementById("menu_printSetup");
    if (pageSetupMenuItem) {
      pageSetupMenuItem.hidden = !SHOW_PAGE_SETUP_MENU;
    }
  },

  /**
   * Opens the tab modal version of the print UI for the current tab.
   *