Bug 1608610 - Pre-process calendar keys into messenger.xhtml. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Tue, 14 Jan 2020 11:58:47 -0500
changeset 37232 05f8690b4ae9865217d2849bb1df00b7908a72e0
parent 37231 05e3a9199721408f7675235f58fb58d017dcec0f
child 37233 b959058157bc2fb2029ab22fc82e7920d01c9ab9
push id2552
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:24:16 +0000
treeherdercomm-beta@f95a6f4408a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFallen
bugs1608610
Bug 1608610 - Pre-process calendar keys into messenger.xhtml. r=Fallen
calendar/lightning/content/calendar-keys.inc.xhtml
calendar/lightning/content/messenger-overlay-sidebar.xhtml
calendar/lightning/jar.mn
mail/base/content/messenger.xhtml
new file mode 100644
--- /dev/null
+++ b/calendar/lightning/content/calendar-keys.inc.xhtml
@@ -0,0 +1,48 @@
+# 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/.
+
+<keyset id="calendar-keys">
+  <key id="openLightningKey"
+       key="&lightning.keys.event.showCalendar.key;"
+       modifiers="accel, shift"
+       command="new_calendar_tab"/>
+  <key id="openTasksKey"
+       key="&lightning.keys.event.showTasks.key;"
+       modifiers="accel, shift"
+       command="new_task_tab"/>
+  <key id="todaypanekey" command="calendar_toggle_todaypane_command" keycode="VK_F11"/>
+  <key id="calendar-new-event-key" key="&lightning.keys.event.new;" modifiers="accel" command="calendar_new_event_command"/>
+  <key id="calendar-new-todo-key" key="&lightning.keys.todo.new;" modifiers="accel" command="calendar_new_todo_command"/>
+<!--
+  For linux tab switching reserves alt+number, where on windows that's ctrl.
+  Use the available modifiers for each platform.
+  Can't use the OPTION key on OSX, so we will use SHIFT+OPTION on the Mac.
+-->
+  <key id="calendar-day-view-key" key="1"
+      command="calendar_day-view_command"
+      modifiers-linux="accel"
+      modifiers-macosx="shift alt"
+      modifiers-win="alt"/>
+  <key id="calendar-week-view-key" key="2"
+      command="calendar_week-view_command"
+      modifiers-linux="accel"
+      modifiers-macosx="shift alt"
+      modifiers-win="alt"/>
+  <key id="calendar-multiweek-view-key" key="3"
+      command="calendar_multiweek-view_command"
+      modifiers-linux="accel"
+      modifiers-macosx="shift alt"
+      modifiers-win="alt"/>
+  <key id="calendar-month-view-key" key="4"
+      command="calendar_month-view_command"
+      modifiers-linux="accel"
+      modifiers-macosx="shift alt"
+      modifiers-win="alt"/>
+  <key id="calendar-go-to-today-key" keycode="VK_END"
+      command="calendar_go_to_today_command" modifiers="alt"/>
+  <key id="calendar-delete-item-key" keycode="VK_DELETE"
+      command="calendar_delete_event_command"/>
+  <key id="calendar-delete-todo-key" keycode="VK_DELETE"
+      command="calendar_delete_todo_command"/>
+</keyset>
\ No newline at end of file
--- a/calendar/lightning/content/messenger-overlay-sidebar.xhtml
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xhtml
@@ -6,61 +6,16 @@
 
 <overlay id="ltnSidebarOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:html="http://www.w3.org/1999/xhtml">
 
   <window id="messengerWindow">
 
-    <keyset id="calendar-keys">
-      <key id="openLightningKey"
-           key="&lightning.keys.event.showCalendar.key;"
-           modifiers="accel, shift"
-           command="new_calendar_tab"/>
-      <key id="openTasksKey"
-           key="&lightning.keys.event.showTasks.key;"
-           modifiers="accel, shift"
-           command="new_task_tab"/>
-      <key id="todaypanekey" command="calendar_toggle_todaypane_command" keycode="VK_F11"/>
-      <key id="calendar-new-event-key" key="&lightning.keys.event.new;" modifiers="accel" command="calendar_new_event_command"/>
-      <key id="calendar-new-todo-key" key="&lightning.keys.todo.new;" modifiers="accel" command="calendar_new_todo_command"/>
-<!--
-  For linux tab switching reserves alt+number, where on windows that's ctrl.
-  Use the available modifiers for each platform.
-  Can't use the OPTION key on OSX, so we will use SHIFT+OPTION on the Mac.
--->
-      <key id="calendar-day-view-key" key="1"
-          command="calendar_day-view_command"
-          modifiers-linux="accel"
-          modifiers-macosx="shift alt"
-          modifiers-win="alt"/>
-      <key id="calendar-week-view-key" key="2"
-          command="calendar_week-view_command"
-          modifiers-linux="accel"
-          modifiers-macosx="shift alt"
-          modifiers-win="alt"/>
-      <key id="calendar-multiweek-view-key" key="3"
-          command="calendar_multiweek-view_command"
-          modifiers-linux="accel"
-          modifiers-macosx="shift alt"
-          modifiers-win="alt"/>
-      <key id="calendar-month-view-key" key="4"
-          command="calendar_month-view_command"
-          modifiers-linux="accel"
-          modifiers-macosx="shift alt"
-          modifiers-win="alt"/>
-      <key id="calendar-go-to-today-key" keycode="VK_END"
-          command="calendar_go_to_today_command" modifiers="alt"/>
-      <key id="calendar-delete-item-key" keycode="VK_DELETE"
-          command="calendar_delete_event_command"/>
-      <key id="calendar-delete-todo-key" keycode="VK_DELETE"
-          command="calendar_delete_todo_command"/>
-    </keyset>
-
     <popupset id="calendar-popupset">
       <!-- Tooltips -->
       <tooltip id="calendar-list-tooltip"
                onpopupshowing="return calendarListTooltipShowing(event)"/>
 
       <tooltip id="eventTreeTooltip"
               onpopupshowing="return showToolTip(this, unifinderTreeView.getItemFromEvent(event))"
               noautohide="true"/>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -9,16 +9,17 @@ lightning.jar:
 % overlay chrome://messenger/content/messenger.xhtml chrome://lightning/content/messenger-overlay-sidebar.xhtml
 % overlay chrome://communicator/content/pref/preferences.xhtml chrome://lightning/content/suite-overlay-preferences.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay about:addons chrome://lightning/content/suite-overlay-addons.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://mozapps/content/extensions/extensions.xhtml chrome://lightning/content/suite-overlay-addons.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xhtml chrome://lightning/content/suite-overlay-sidebar.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % override chrome://lightning-common/skin/accountCentral.css chrome://lightning-common/skin/suite-accountCentral.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % content lightning %content/
     content/calendar-commands.inc.xhtml                    (content/calendar-commands.inc.xhtml)
+    content/calendar-keys.inc.xhtml                        (content/calendar-keys.inc.xhtml)
     content/html-item-editing/lightning-item-iframe.html   (content/html-item-editing/lightning-item-iframe.html)
     content/html-item-editing/react-code.js                (content/html-item-editing/react-code.js)
     content/imip-bar.js                                    (content/imip-bar.js)
     content/imip-bar-overlay.inc.xhtml                     (content/imip-bar-overlay.inc.xhtml)
     content/lightning-calendar-creation.js                 (content/lightning-calendar-creation.js)
     content/lightning-calendar-properties.js               (content/lightning-calendar-properties.js)
     content/lightning-invitation.xhtml                     (content/lightning-invitation.xhtml)
 *   content/lightning-item-panel.inc.xhtml                 (content/lightning-item-panel.inc.xhtml)
--- a/mail/base/content/messenger.xhtml
+++ b/mail/base/content/messenger.xhtml
@@ -363,16 +363,18 @@
     <key id="key_newMessage"  key="&newMessageCmd.key;" command="cmd_newMessage"
          modifiers="accel"/>
     <key id="key_newMessage2" key="&newMessageCmd2.key;" command="cmd_newMessage"
          modifiers="accel"/>
 #endif
   </keyset>
 </keyset>
 
+#include ../../../calendar/lightning/content/calendar-keys.inc.xhtml
+
 <!-- Popup menus provided by mailWindowOverlay.xhtml -->
 <popupset id="mainPopupSet">
 #include mainPopupSet.inc.xhtml
 
 <!-- The panelUI is for the appmenu. -->
 #include ../../components/customizableui/content/panelUI.inc.xhtml
 
 #include msgHdrPopup.inc.xhtml