From 9b123f057e0398745bf0ef9acda6dbd5634f6317 Mon Sep 17 00:00:00 2001 From: Emma Malysz Date: Fri, 28 Aug 2020 01:23:42 +0000 Subject: [PATCH] Bug 1659340, hide menu options if new print UI pref is enabled r=mstriemer If print.tab_modal.enabled is enabled, we should not display the print preview menu item, as this will redirect us to the print preview automatically and thus be redundant with the other print button. We also want to hide the page setup menu item. Differential Revision: https://phabricator.services.mozilla.com/D88224 --- browser/base/content/browser-menubar.inc | 7 ++++--- .../components/printing/content/printUtils.js | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index a865c1fd0d9c..1efe3f82aec1 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -11,7 +11,8 @@ + updateImportCommandEnabledState(); + PrintUtils.updatePrintPreviewMenuHiddenState();"> @@ -58,11 +59,11 @@ #if !defined(MOZ_WIDGET_GTK) + command="cmd_pageSetup" data-l10n-id="menu-file-print-setup" hidden="true"/> #endif #ifndef XP_MACOSX + command="cmd_printPreview" data-l10n-id="menu-file-print-preview" hidden="true"/> #endif