Bug 1608610 - Inline 'convert calendar' context menu items. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Tue, 14 Jan 2020 16:53:34 -0500
changeset 37244 08a88ac148a4e0a04f824682ec5e821685e39170
parent 37243 9a50d5b205f2dfc9b7cbce2b9acfc5e29bbbdb79
child 37245 89181842d4a53b42a42035ac291a645ed3b2707d
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 - Inline 'convert calendar' context menu items. r=Fallen
calendar/lightning/content/messenger-overlay-sidebar.xhtml
mail/base/content/mainPopupSet.inc.xhtml
mail/base/content/msgHdrView.inc.xhtml
--- a/calendar/lightning/content/messenger-overlay-sidebar.xhtml
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xhtml
@@ -4,56 +4,16 @@
    - 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/. -->
 
 <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">
 
-  <!-- CALENDAR MENUS -->
-
-  <menupopup id="mailContext">
-    <menu id="mailContext-calendar-convert-menu"
-          insertafter="mailContext-moveToFolderAgain"
-          label="&calendar.context.convertmenu.label;"
-          accesskey="&calendar.context.convertmenu.accesskey.mail;">
-      <menupopup id="mailContext-calendar-convert-menupopup">
-        <menuitem id="mailContext-calendar-convert-event-menuitem"
-                  label="&calendar.context.convertmenu.event.label;"
-                  accesskey="&calendar.context.convertmenu.event.accesskey;"
-                  oncommand="calendarExtract.extractFromEmail(true)" />
-        <menuitem id="mailContext-calendar-convert-task-menuitem"
-                  label="&calendar.context.convertmenu.task.label;"
-                  accesskey="&calendar.context.convertmenu.task.accesskey;"
-                  oncommand="calendarExtract.extractFromEmail(false)" />
-      </menupopup>
-    </menu>
-  </menupopup>
-
-  <menupopup id="otherActionsPopup">
-    <menu id="otherActions-calendar-convert-menu"
-          label="&calendar.context.convertmenu.label;"
-          accesskey="&calendar.context.convertmenu.accesskey.mail;">
-      <menupopup id="otherActions-calendar-convert-menupopup">
-        <menuitem id="otherActions-calendar-convert-event-menuitem"
-                  label="&calendar.context.convertmenu.event.label;"
-                  accesskey="&calendar.context.convertmenu.event.accesskey;"
-                  oncommand="calendarExtract.extractFromEmail(true)" />
-        <menuitem id="otherActions-calendar-convert-task-menuitem"
-                  label="&calendar.context.convertmenu.task.label;"
-                  accesskey="&calendar.context.convertmenu.task.accesskey;"
-                  oncommand="calendarExtract.extractFromEmail(false)" />
-      </menupopup>
-    </menu>
-  </menupopup>
-
-  <menupopup id="toolbar-context-menu"
-             onpopupshowing="calendarOnToolbarsPopupShowing(event);"/>
-
   <!-- App Menu Integration -->
   <!-- Calendar menu items added to appmenu menus -->
 
   <!-- Main Appmenu View -->
   <vbox id="appMenu-mainViewItems">
     <toolbarbutton id="appmenu_Event_Task"
                    class="subviewbutton subviewbutton-nav"
                    label="&lightning.menu.eventtask.label;"
--- a/mail/base/content/mainPopupSet.inc.xhtml
+++ b/mail/base/content/mainPopupSet.inc.xhtml
@@ -322,16 +322,31 @@
                  favoritesLabel="&contextMoveCopyMsgFavoritesMenu.label;"
                  favoritesAccessKey="&contextMoveCopyMsgFavoritesMenu.accesskey;"/>
     </menu>
     <menuitem id="mailContext-moveToFolderAgain"
               command="cmd_moveToFolderAgain"
               label="&moveToFolderAgain.label;"
               accesskey="&moveToFolderAgain.accesskey;"/>
 
+    <menu id="mailContext-calendar-convert-menu"
+          label="&calendar.context.convertmenu.label;"
+          accesskey="&calendar.context.convertmenu.accesskey.mail;">
+      <menupopup id="mailContext-calendar-convert-menupopup">
+        <menuitem id="mailContext-calendar-convert-event-menuitem"
+                  label="&calendar.context.convertmenu.event.label;"
+                  accesskey="&calendar.context.convertmenu.event.accesskey;"
+                  oncommand="calendarExtract.extractFromEmail(true)" />
+        <menuitem id="mailContext-calendar-convert-task-menuitem"
+                  label="&calendar.context.convertmenu.task.label;"
+                  accesskey="&calendar.context.convertmenu.task.accesskey;"
+                  oncommand="calendarExtract.extractFromEmail(false)" />
+      </menupopup>
+    </menu>
+
     <menuitem id="mailContext-delete"
               command="cmd_delete"/>
 
     <menuseparator id="paneContext-afterMove"/>
     <menuitem id="mailContext-ignoreThread"
               type="checkbox"
               label="&contextKillThreadMenu.label;"
               accesskey="&contextKillThreadMenu.accesskey;"
@@ -506,17 +521,17 @@
               data-l10n-id="text-action-copy"
               command="cmd_copy"/>
     <menuitem id="aboutPagesContext-selectall"
               data-l10n-id="text-action-select-all"
               command="cmd_selectAll"/>
   </menupopup>
 
   <menupopup id="toolbar-context-menu"
-             onpopupshowing="onViewToolbarsPopupShowing(event, 'mail-toolbox');">
+             onpopupshowing="calendarOnToolbarsPopupShowing(event);">
     <menuseparator id="customizeMailToolbarMenuSeparator"/>
     <menuitem id="CustomizeMailToolbar"
               command="cmd_CustomizeMailToolbar"
               label="&customizeToolbar.label;"
               accesskey="&customizeToolbar.accesskey;"/>
   </menupopup>
 
   <menupopup id="remoteContentOptions" value=""
--- a/mail/base/content/msgHdrView.inc.xhtml
+++ b/mail/base/content/msgHdrView.inc.xhtml
@@ -199,16 +199,30 @@
                                                   oncommand="MsgMarkMsgAsRead();"/>
                                         <menuitem id="saveAsMenuItem" label="&saveAsMenuItem1.label;"
                                                   accesskey="&saveAsMenuItem1.accesskey;"
                                                   oncommand="MsgSaveAsFile();"/>
                                         <menuitem id="otherActionsPrint"
                                                   label="&otherActionsPrint1.label;"
                                                   accesskey="&otherActionsPrint1.accesskey;"
                                                   oncommand="PrintEnginePrint();"/>
+                                        <menu id="otherActions-calendar-convert-menu"
+                                              label="&calendar.context.convertmenu.label;"
+                                              accesskey="&calendar.context.convertmenu.accesskey.mail;">
+                                          <menupopup id="otherActions-calendar-convert-menupopup">
+                                            <menuitem id="otherActions-calendar-convert-event-menuitem"
+                                                      label="&calendar.context.convertmenu.event.label;"
+                                                      accesskey="&calendar.context.convertmenu.event.accesskey;"
+                                                      oncommand="calendarExtract.extractFromEmail(true)" />
+                                            <menuitem id="otherActions-calendar-convert-task-menuitem"
+                                                      label="&calendar.context.convertmenu.task.label;"
+                                                      accesskey="&calendar.context.convertmenu.task.accesskey;"
+                                                      oncommand="calendarExtract.extractFromEmail(false)" />
+                                          </menupopup>
+                                        </menu>
                                       </menupopup>
                                     </toolbarbutton>
                                   </hbox>
                                 </vbox>
 
                                 <!-- This box ensures that the expandedHeaders grid below is aligned
                                      with the bottom of the message header toolbar. Like the
                                      expandedHeadersTopBox, this uses display:block to give us HTML