Bug 581470 - Ctrl+P and Ctrl+W does not work inside Print Preview in Thunderbird. r=mconley, ui-r=bwinton
authorSakshi Bansal <sakshi.april5@gmail.com>
Mon, 18 Feb 2013 09:20:34 -0500
changeset 14874 b86825ef1b700bd1513301502593018fef6880c8
parent 14873 e4a72afda8abcc3d6a339d4fd78587af0a8013dc
child 14875 658e70ff9e54b85021ab852f636faabb25c211e9
push id867
push userbugzilla@standard8.plus.com
push dateMon, 01 Apr 2013 20:44:27 +0000
treeherdercomm-beta@797726b8d244 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, bwinton
bugs581470
Bug 581470 - Ctrl+P and Ctrl+W does not work inside Print Preview in Thunderbird. r=mconley, ui-r=bwinton
mail/base/content/msgPrintEngine.xul
mail/locales/en-US/chrome/messenger/msgPrintEngine.dtd
mail/locales/jar.mn
--- a/mail/base/content/msgPrintEngine.xul
+++ b/mail/base/content/msgPrintEngine.xul
@@ -3,29 +3,35 @@
    - This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
 
 <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
 
+<!DOCTYPE window SYSTEM "chrome://messenger/locale/msgPrintEngine.dtd">
+
 <window id="printEngineWin"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="OnLoadPrintEngine()"
         width="750"
         height="500"
         screenX="10" screenY="10"
         persist="width height screenX screenY sizemode"
         windowtype="mail:printEngine">
 
   <stringbundleset id="stringbundleset">
     <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
   </stringbundleset>
 
+  <!-- Provide shortcut keys for toolkit's print preview; commands will be overridden by printUtils.js -->
+  <key id="printKb" key="&printCmd.key;" command="cmd_print" modifiers="accel"/>
+  <key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
+
   <script type="application/javascript" src="chrome://global/content/printUtils.js"/>
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://messenger/content/msgPrintEngine.js"/>
 
   <!-- The main display frame -->
   <browser id="content" type="content-primary" name="content" src="about:blank" flex="1" disablehistory="true" disablesecurity="true"/>
 </window>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/chrome/messenger/msgPrintEngine.dtd
@@ -0,0 +1,11 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!-- LOCALIZATION NOTE (printCmd.key, closeCmd.key):
+     As defined in msgPrintEngine.xul, Ctrl plus the command keys defined here
+     will be the keyboard shortcuts effective in print preview, e.g. Ctrl+P
+     -->
+
+<!ENTITY printCmd.key "P">
+<!ENTITY closeCmd.key "W">
--- a/mail/locales/jar.mn
+++ b/mail/locales/jar.mn
@@ -110,16 +110,17 @@
   locale/@AB_CD@/messenger/glodaComplete.properties                     (%chrome/messenger/glodaComplete.properties)
   locale/@AB_CD@/messenger/templateUtils.properties                     (%chrome/messenger/templateUtils.properties)
   locale/@AB_CD@/messenger/glodaFacetView.properties                    (%chrome/messenger/glodaFacetView.properties)
   locale/@AB_CD@/messenger/glodaFacetView.dtd                           (%chrome/messenger/glodaFacetView.dtd)
   locale/@AB_CD@/messenger/quickFilterBar.dtd                           (%chrome/messenger/quickFilterBar.dtd)
   locale/@AB_CD@/messenger/safeMode.dtd                                 (%chrome/messenger/safeMode.dtd)
   locale/@AB_CD@/messenger/taskbar.properties                           (%chrome/messenger/taskbar.properties)
   locale/@AB_CD@/messenger/junkLog.dtd                                  (%chrome/messenger/junkLog.dtd)
+  locale/@AB_CD@/messenger/msgPrintEngine.dtd                           (%chrome/messenger/msgPrintEngine.dtd)
   locale/@AB_CD@/messenger/addressbook/abMainWindow.dtd                 (%chrome/messenger/addressbook/abMainWindow.dtd)
   locale/@AB_CD@/messenger/addressbook/abNewCardDialog.dtd              (%chrome/messenger/addressbook/abNewCardDialog.dtd)
   locale/@AB_CD@/messenger/addressbook/abContactsPanel.dtd              (%chrome/messenger/addressbook/abContactsPanel.dtd)
   locale/@AB_CD@/messenger/addressbook/abAddressBookNameDialog.dtd      (%chrome/messenger/addressbook/abAddressBookNameDialog.dtd)
   locale/@AB_CD@/messenger/addressbook/abCardOverlay.dtd                (%chrome/messenger/addressbook/abCardOverlay.dtd)
   locale/@AB_CD@/messenger/addressbook/abResultsPaneOverlay.dtd         (%chrome/messenger/addressbook/abResultsPaneOverlay.dtd)
   locale/@AB_CD@/messenger/addressbook/abMailListDialog.dtd             (%chrome/messenger/addressbook/abMailListDialog.dtd)
   locale/@AB_CD@/messenger/addressbook/addressBook.properties           (%chrome/messenger/addressbook/addressBook.properties)