Bug 1508119 - Inline the lightning-toolbar.xul overlay file. r=darktrojan
authorPaul Morris <paul@thunderbird.net>
Mon, 04 Nov 2019 16:34:36 -0500
changeset 37431 aa5d53e8d88cf9f5d268e670f011cc696ba60cd4
parent 37430 801bb3e237b67f3310a096336202b33fb26d9fce
child 37432 9cad8d5e022be5324b9b9512ab20e96b0a7d1c00
push id396
push userclokep@gmail.com
push dateMon, 06 Jan 2020 23:11:57 +0000
reviewersdarktrojan
bugs1508119
Bug 1508119 - Inline the lightning-toolbar.xul overlay file. r=darktrojan
calendar/lightning/content/lightning-toolbar.xul
calendar/lightning/content/messenger-overlay-sidebar.xul
calendar/lightning/jar.mn
deleted file mode 100644
--- a/calendar/lightning/content/lightning-toolbar.xul
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-<!DOCTYPE overlay [
-  <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd"> %messengerDTD;
-  <!ENTITY % mailOverlayDTD SYSTEM "chrome://messenger/locale/mailOverlay.dtd"> %mailOverlayDTD;
-  <!ENTITY % menuOverlayDTD SYSTEM "chrome://calendar/locale/menuOverlay.dtd" > %menuOverlayDTD;
-  <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd"> %lightningDTD;
-  <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" > %calendarDTD;
-  <!ENTITY % toolbarDTD SYSTEM "chrome://lightning/locale/lightning-toolbar.dtd" > %toolbarDTD;
-  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > %brandDTD;
-]>
-
-<?xml-stylesheet href="chrome://lightning/skin/lightning-toolbar.css" type="text/css"?>
-
-<overlay id="ltnToolbarOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
-  <popupset id="calendar-popupset">
-    <menupopup id="calendar-toolbar-context"
-               onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'calendar-toolbox']);">
-      <menuseparator id="customizeCalendarToolbarMenuSeparator"/>
-      <menuitem id="CustomizeCalendarToolbar"
-                label="&calendar.menu.customize.label;"
-                accesskey="&calendar.menu.customize.accesskey;"
-                oncommand="CustomizeMailToolbar('calendar-toolbox', 'CustomizeCalendarToolbar')"/>
-    </menupopup>
-    <menupopup id="task-toolbar-context"
-               onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'task-toolbox']);">
-      <menuseparator id="customizeTaskToolbarMenuSeparator"/>
-      <menuitem id="CustomizeTaskToolbar"
-                label="&calendar.menu.customize.label;"
-                accesskey="&calendar.menu.customize.accesskey;"
-                oncommand="CustomizeMailToolbar('task-toolbox', 'CustomizeTaskToolbar')"/>
-    </menupopup>
-  </popupset>
-
-  <toolbarpalette id="MailToolbarPalette">
-    <toolbarbutton id="lightning-button-calendar"
-                   class="toolbarbutton-1"
-                   label="&lightning.toolbar.calendar.label;"
-                   tooltiptext="&lightning.toolbar.calendar.tooltip;"
-                   command="new_calendar_tab"/>
-    <toolbarbutton id="lightning-button-tasks"
-                   class="toolbarbutton-1"
-                   label="&lightning.toolbar.task.label;"
-                   tooltiptext="&lightning.toolbar.task.tooltip;"
-                   command="new_task_tab"/>
-    <toolbarbutton is="toolbarbutton-menu-button" id="extractEventButton"
-                   type="menu-button"
-                   class="toolbarbutton-1"
-                   label="&calendar.extract.event.button;"
-                   tooltiptext="&calendar.extract.event.button.tooltip;"
-                   oncommand="calendarExtract.extractFromEmail(true);">
-      <menupopup id="extractEventLocaleList"
-                 oncommand="calendarExtract.extractWithLocale(event, true);"
-                 onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
-    </toolbarbutton>
-    <toolbarbutton is="toolbarbutton-menu-button" id="extractTaskButton"
-                   type="menu-button"
-                   class="toolbarbutton-1"
-                   label="&calendar.extract.task.button;"
-                   tooltiptext="&calendar.extract.task.button.tooltip;"
-                   oncommand="calendarExtract.extractFromEmail(false);">
-      <menupopup id="extractTaskLocaleList"
-                 oncommand="calendarExtract.extractWithLocale(event, false);"
-                 onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
-    </toolbarbutton>
-  </toolbarpalette>
-
-  <toolbox id="calendar-toolbox"
-           class="mail-toolbox"
-           mode="full"
-           defaultmode="full"
-           iconsize="small"
-           defaulticonsize="small"
-           labelalign="end"
-           defaultlabelalign="end">
-    <toolbarpalette id="CalendarToolbarPalette">
-      <toolbarbutton id="calendar-synchronize-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.sync.label;"
-                     tooltiptext="&lightning.toolbar.sync.tooltip;"
-                     command="calendar_reload_remote_calendars"/>
-      <toolbarbutton id="calendar-newevent-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.newevent.label;"
-                     tooltiptext="&lightning.toolbar.newevent.tooltip;"
-                     command="calendar_new_event_command"/>
-      <toolbarbutton id="calendar-newtask-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.newtask.label;"
-                     tooltiptext="&lightning.toolbar.newtask.tooltip;"
-                     command="calendar_new_todo_command"/>
-      <toolbarbutton id="calendar-goto-today-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.gototoday.label;"
-                     tooltiptext="&lightning.toolbar.gototoday.tooltip;"
-                     command="calendar_go_to_today_command"/>
-      <toolbarbutton id="calendar-edit-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.edit.label;"
-                     tooltiptext="&lightning.toolbar.edit.tooltip;"
-                     command="calendar_modify_focused_item_command"/>
-      <toolbarbutton id="calendar-delete-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.delete.label;"
-                     tooltiptext="&lightning.toolbar.delete.tooltip;"
-                     command="calendar_delete_focused_item_command"/>
-      <toolbarbutton id="calendar-print-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.print.label;"
-                     tooltiptext="&lightning.toolbar.print.tooltip;"
-                     command="cmd_print"/>
-      <toolbarbutton id="calendar-unifinder-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&showUnifinderCmd.label;"
-                     tooltiptext="&showUnifinderCmd.tooltip;"
-                     command="calendar_show_unifinder_command"/>
-      <toolbarbutton id="calendar-appmenu-button"
-                     type="menu"
-                     class="toolbarbutton-1 button-appmenu"
-                     label="&lightning.toolbar.appmenuButton.label;"
-                     tooltiptext="&lightning.toolbar.appmenuButton1.tooltip;"/>
-    </toolbarpalette>
-
-    <toolbar is="customizable-toolbar" id="calendar-toolbar2"
-             class="inline-toolbar chromeclass-toolbar"
-             toolbarname="&lightning.toolbar.calendar.name;"
-             accesskey="&lightning.toolbar.calendar.name.accesskey;"
-             fullscreentoolbar="true" mode="full"
-             customizable="true"
-             context="calendar-toolbar-context"
-             iconsize="small"
-             defaultset="calendar-synchronize-button,calendar-newevent-button,calendar-newtask-button,calendar-edit-button,calendar-delete-button,spring,calendar-appmenu-button"/>
-  </toolbox>
-
-  <toolbox id="task-toolbox"
-           class="mail-toolbox"
-           mode="full"
-           defaultmode="full"
-           iconsize="small"
-           defaulticonsize="small"
-           labelalign="end"
-           defaultlabelalign="end">
-    <toolbarpalette id="TaskToolbarPalette">
-      <toolbarbutton id="task-synchronize-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.sync.label;"
-                     tooltiptext="&lightning.toolbar.sync.tooltip;"
-                     command="calendar_reload_remote_calendars"/>
-      <toolbarbutton id="task-newevent-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.newevent.label;"
-                     tooltiptext="&lightning.toolbar.newevent.tooltip;"
-                     command="calendar_new_event_command"/>
-      <toolbarbutton id="task-newtask-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.newtask.label;"
-                     tooltiptext="&lightning.toolbar.newtask.tooltip;"
-                     command="calendar_new_todo_command"/>
-      <toolbarbutton id="task-edit-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.edit.label;"
-                     tooltiptext="&lightning.toolbar.edit.tooltip;"
-                     command="calendar_modify_focused_item_command"/>
-      <toolbarbutton id="task-delete-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.delete.label;"
-                     tooltiptext="&lightning.toolbar.delete.tooltip;"
-                     command="calendar_delete_focused_item_command"/>
-      <toolbarbutton id="task-print-button"
-                     class="toolbarbutton-1 calbar-toolbarbutton-1"
-                     label="&lightning.toolbar.print.label;"
-                     tooltiptext="&lightning.toolbar.print.tooltip;"
-                     command="cmd_print"/>
-      <toolbarbutton id="task-appmenu-button"
-                     type="menu"
-                     class="toolbarbutton-1 button-appmenu"
-                     label="&lightning.toolbar.appmenuButton.label;"
-                     tooltiptext="&lightning.toolbar.appmenuButton1.tooltip;"/>
-    </toolbarpalette>
-
-    <toolbar is="customizable-toolbar" id="task-toolbar2"
-             class="inline-toolbar chromeclass-toolbar"
-             toolbarname="&lightning.toolbar.task.name;"
-             accesskey="&lightning.toolbar.task.name.accesskey;"
-             fullscreentoolbar="true" mode="full"
-             customizable="true"
-             context="task-toolbar-context"
-             iconsize="small"
-             defaultset="task-synchronize-button,task-newevent-button,task-newtask-button,task-edit-button,task-delete-button,spring,task-appmenu-button"/>
-  </toolbox>
-</overlay>
--- a/calendar/lightning/content/messenger-overlay-sidebar.xul
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xul
@@ -9,16 +9,18 @@
   <!ENTITY % dtd1 SYSTEM "chrome://lightning/locale/lightning.dtd" > %dtd1;
   <!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/menuOverlay.dtd" > %dtd2;
   <!ENTITY % dtd3 SYSTEM "chrome://calendar/locale/calendar.dtd" > %dtd3;
   <!ENTITY % dtd4 SYSTEM "chrome://lightning/locale/lightning-toolbar.dtd" > %dtd4;
   <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" > %messengerDTD;
   <!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd" > %eventDialogDTD;
   <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd" > %globalDTD;
   <!ENTITY % calendarGlobalDTD SYSTEM "chrome://calendar/locale/global.dtd" > %calendarGlobalDTD;
+  <!ENTITY % mailOverlayDTD SYSTEM "chrome://messenger/locale/mailOverlay.dtd"> %mailOverlayDTD;
+  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > %brandDTD;
 ]>
 
 <?xml-stylesheet href="chrome://lightning/skin/lightning.css" type="text/css"?>
 
 <?xml-stylesheet href="chrome://calendar/skin/calendar-event-dialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar/content/calendar-event-dialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar-common/skin/dialogs/calendar-event-dialog.css" type="text/css"?>
 
@@ -29,17 +31,18 @@
 <?xml-stylesheet href="chrome://calendar/skin/calendar-task-tree.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar/skin/calendar-task-view.css" type="text/css"?>
 
 <?xml-stylesheet href="chrome://calendar/skin/calendar-views.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar-common/skin/calendar-alarms.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar-common/skin/widgets/minimonth.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar/skin/widgets/calendar-widgets.css" type="text/css"?>
 
-<?xul-overlay href="chrome://lightning/content/lightning-toolbar.xul"?>
+<?xml-stylesheet href="chrome://lightning/skin/lightning-toolbar.css" type="text/css"?>
+
 <?xul-overlay href="chrome://lightning/content/lightning-menus.xul"?>
 
 <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">
 
   <script src="chrome://lightning/content/lightning-utils.js"/>
@@ -278,16 +281,35 @@
 
       <tooltip id="taskTreeTooltip"
               onpopupshowing="return showToolTip(this, getTaskTree().getTaskFromEvent(event))"
               noautohide="true"/>
 
       <tooltip id="itemTooltip"
               noautohide="true"/>
 
+      <!-- CALENDAR TOOLBAR CONTEXT MENU -->
+      <menupopup id="calendar-toolbar-context"
+                 onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'calendar-toolbox']);">
+        <menuseparator id="customizeCalendarToolbarMenuSeparator"/>
+        <menuitem id="CustomizeCalendarToolbar"
+                  label="&calendar.menu.customize.label;"
+                  accesskey="&calendar.menu.customize.accesskey;"
+                  oncommand="CustomizeMailToolbar('calendar-toolbox', 'CustomizeCalendarToolbar')"/>
+      </menupopup>
+      <menupopup id="task-toolbar-context"
+                 onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'task-toolbox']);">
+        <menuseparator id="customizeTaskToolbarMenuSeparator"/>
+        <menuitem id="CustomizeTaskToolbar"
+                  label="&calendar.menu.customize.label;"
+                  accesskey="&calendar.menu.customize.accesskey;"
+                  oncommand="CustomizeMailToolbar('task-toolbox', 'CustomizeTaskToolbar')"/>
+      </menupopup>
+
+      <!-- CALENDAR LIST CONTEXT MENU -->
       <menupopup id="list-calendars-context-menu"
                  onpopupshowing="return calendarListSetupContextMenu(event);">
         <menuitem id="list-calendars-context-togglevisible"
                   class="needs-calendar"
                   accesskeyshow="&calendar.context.showcalendar.accesskey;"
                   accesskeyhide="&calendar.context.hidecalendar.accesskey;"
                   oncommand="toggleCalendarVisible(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
         <menuitem id="list-calendars-context-showonly"
@@ -1056,25 +1078,143 @@
                    title="&lightning.toolbar.task.label;"
                    tooltiptext="&lightning.toolbar.task.tooltip;"
                    command="new_task_tab"/>
   </toolbar>
 
   <tabpanels id="tabpanelcontainer">
     <vbox id="calendarTabPanel">
       <!-- Unfortunately we use the same panel for task and calendar tabs, so
-           we need to differ which toolbar is being shown. The actual toolbar
-           content will be added via a further overlay -->
+           we need to show one toolbar or the other. -->
       <calendar-modevbox id="calendar-toolbox-container"
                          mode="calendar">
-        <toolbox id="calendar-toolbox"/>
+        <toolbox id="calendar-toolbox"
+                 class="mail-toolbox"
+                 mode="full"
+                 defaultmode="full"
+                 iconsize="small"
+                 defaulticonsize="small"
+                 labelalign="end"
+                 defaultlabelalign="end">
+          <toolbarpalette id="CalendarToolbarPalette">
+            <toolbarbutton id="calendar-synchronize-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.sync.label;"
+                           tooltiptext="&lightning.toolbar.sync.tooltip;"
+                           command="calendar_reload_remote_calendars"/>
+            <toolbarbutton id="calendar-newevent-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.newevent.label;"
+                           tooltiptext="&lightning.toolbar.newevent.tooltip;"
+                           command="calendar_new_event_command"/>
+            <toolbarbutton id="calendar-newtask-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.newtask.label;"
+                           tooltiptext="&lightning.toolbar.newtask.tooltip;"
+                           command="calendar_new_todo_command"/>
+            <toolbarbutton id="calendar-goto-today-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.gototoday.label;"
+                           tooltiptext="&lightning.toolbar.gototoday.tooltip;"
+                           command="calendar_go_to_today_command"/>
+            <toolbarbutton id="calendar-edit-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.edit.label;"
+                           tooltiptext="&lightning.toolbar.edit.tooltip;"
+                           command="calendar_modify_focused_item_command"/>
+            <toolbarbutton id="calendar-delete-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.delete.label;"
+                           tooltiptext="&lightning.toolbar.delete.tooltip;"
+                           command="calendar_delete_focused_item_command"/>
+            <toolbarbutton id="calendar-print-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.print.label;"
+                           tooltiptext="&lightning.toolbar.print.tooltip;"
+                           command="cmd_print"/>
+            <toolbarbutton id="calendar-unifinder-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&showUnifinderCmd.label;"
+                           tooltiptext="&showUnifinderCmd.tooltip;"
+                           command="calendar_show_unifinder_command"/>
+            <toolbarbutton id="calendar-appmenu-button"
+                           type="menu"
+                           class="toolbarbutton-1 button-appmenu"
+                           label="&lightning.toolbar.appmenuButton.label;"
+                           tooltiptext="&lightning.toolbar.appmenuButton1.tooltip;"/>
+          </toolbarpalette>
+          <toolbar is="customizable-toolbar" id="calendar-toolbar2"
+                   class="inline-toolbar chromeclass-toolbar"
+                   toolbarname="&lightning.toolbar.calendar.name;"
+                   accesskey="&lightning.toolbar.calendar.name.accesskey;"
+                   fullscreentoolbar="true" mode="full"
+                   customizable="true"
+                   context="calendar-toolbar-context"
+                   iconsize="small"
+                   defaultset="calendar-synchronize-button,calendar-newevent-button,calendar-newtask-button,calendar-edit-button,calendar-delete-button,spring,calendar-appmenu-button"/>
+        </toolbox>
       </calendar-modevbox>
+
       <calendar-modevbox id="task-toolbox-container"
                          mode="task">
-        <toolbox id="task-toolbox"/>
+        <toolbox id="task-toolbox"
+                 class="mail-toolbox"
+                 mode="full"
+                 defaultmode="full"
+                 iconsize="small"
+                 defaulticonsize="small"
+                 labelalign="end"
+                 defaultlabelalign="end">
+          <toolbarpalette id="TaskToolbarPalette">
+            <toolbarbutton id="task-synchronize-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.sync.label;"
+                           tooltiptext="&lightning.toolbar.sync.tooltip;"
+                           command="calendar_reload_remote_calendars"/>
+            <toolbarbutton id="task-newevent-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.newevent.label;"
+                           tooltiptext="&lightning.toolbar.newevent.tooltip;"
+                           command="calendar_new_event_command"/>
+            <toolbarbutton id="task-newtask-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.newtask.label;"
+                           tooltiptext="&lightning.toolbar.newtask.tooltip;"
+                           command="calendar_new_todo_command"/>
+            <toolbarbutton id="task-edit-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.edit.label;"
+                           tooltiptext="&lightning.toolbar.edit.tooltip;"
+                           command="calendar_modify_focused_item_command"/>
+            <toolbarbutton id="task-delete-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.delete.label;"
+                           tooltiptext="&lightning.toolbar.delete.tooltip;"
+                           command="calendar_delete_focused_item_command"/>
+            <toolbarbutton id="task-print-button"
+                           class="toolbarbutton-1 calbar-toolbarbutton-1"
+                           label="&lightning.toolbar.print.label;"
+                           tooltiptext="&lightning.toolbar.print.tooltip;"
+                           command="cmd_print"/>
+            <toolbarbutton id="task-appmenu-button"
+                           type="menu"
+                           class="toolbarbutton-1 button-appmenu"
+                           label="&lightning.toolbar.appmenuButton.label;"
+                           tooltiptext="&lightning.toolbar.appmenuButton1.tooltip;"/>
+          </toolbarpalette>
+          <toolbar is="customizable-toolbar" id="task-toolbar2"
+                   class="inline-toolbar chromeclass-toolbar"
+                   toolbarname="&lightning.toolbar.task.name;"
+                   accesskey="&lightning.toolbar.task.name.accesskey;"
+                   fullscreentoolbar="true" mode="full"
+                   customizable="true"
+                   context="task-toolbar-context"
+                   iconsize="small"
+                   defaultset="task-synchronize-button,task-newevent-button,task-newtask-button,task-edit-button,task-delete-button,spring,task-appmenu-button"/>
+        </toolbox>
       </calendar-modevbox>
       <hbox id="calendarContent" flex="1">
         <vbox id="ltnSidebar"
               width="200"
               persist="collapsed width">
           <calendar-modevbox id="minimonth-pane"
                              mode="calendar,task"
                              refcontrol="calendar_toggle_minimonthpane_command">
@@ -2037,9 +2177,43 @@
           insertbefore="unreadMessageCount,totalMessageCount"
           oncommand="openInvitationsDialog()">
       <label id="calendar-invitations-label"
              class="text-link"
              onclick="openInvitationsDialog()"
              onkeypress="if (event.key == 'Enter') { openInvitationsDialog(); }"/>
     </hbox>
   </hbox>
+
+  <!-- CALENDAR TOOLBAR BUTTONS FOR MAIL TOOLBAR -->
+  <toolbarpalette id="MailToolbarPalette">
+    <toolbarbutton id="lightning-button-calendar"
+                   class="toolbarbutton-1"
+                   label="&lightning.toolbar.calendar.label;"
+                   tooltiptext="&lightning.toolbar.calendar.tooltip;"
+                   command="new_calendar_tab"/>
+    <toolbarbutton id="lightning-button-tasks"
+                   class="toolbarbutton-1"
+                   label="&lightning.toolbar.task.label;"
+                   tooltiptext="&lightning.toolbar.task.tooltip;"
+                   command="new_task_tab"/>
+    <toolbarbutton is="toolbarbutton-menu-button" id="extractEventButton"
+                   type="menu-button"
+                   class="toolbarbutton-1"
+                   label="&calendar.extract.event.button;"
+                   tooltiptext="&calendar.extract.event.button.tooltip;"
+                   oncommand="calendarExtract.extractFromEmail(true);">
+      <menupopup id="extractEventLocaleList"
+                 oncommand="calendarExtract.extractWithLocale(event, true);"
+                 onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
+    </toolbarbutton>
+    <toolbarbutton is="toolbarbutton-menu-button" id="extractTaskButton"
+                   type="menu-button"
+                   class="toolbarbutton-1"
+                   label="&calendar.extract.task.button;"
+                   tooltiptext="&calendar.extract.task.button.tooltip;"
+                   oncommand="calendarExtract.extractFromEmail(false);">
+      <menupopup id="extractTaskLocaleList"
+                 oncommand="calendarExtract.extractWithLocale(event, false);"
+                 onpopupshowing="calendarExtract.onShowLocaleMenu(event.target);"/>
+    </toolbarbutton>
+  </toolbarpalette>
 </overlay>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -32,17 +32,16 @@ lightning.jar:
     content/lightning-invitation.xhtml                     (content/lightning-invitation.xhtml)
     content/lightning-item-toolbar.xul                     (content/lightning-item-toolbar.xul)
     content/lightning-item-panel.xul                       (content/lightning-item-panel.xul)
     content/lightning-item-panel.js                        (content/lightning-item-panel.js)
     content/lightning-item-iframe.xul                      (content/lightning-item-iframe.xul)
     content/lightning-item-iframe.js                       (content/lightning-item-iframe.js)
     content/lightning-menus.xul                            (content/lightning-menus.xul)
     content/lightning-migration.xul                        (content/lightning-migration.xul)
-    content/lightning-toolbar.xul                          (content/lightning-toolbar.xul)
     content/lightning-utils.js                             (content/lightning-utils.js)
     content/messenger-overlay-accountCentral.xul           (content/messenger-overlay-accountCentral.xul)
     content/messenger-overlay-messageWindow.xul            (content/messenger-overlay-messageWindow.xul)
     content/messenger-overlay-sidebar.js                   (content/messenger-overlay-sidebar.js)
     content/messenger-overlay-sidebar.xul                  (content/messenger-overlay-sidebar.xul)
     content/messenger-overlay-preferences.js               (content/messenger-overlay-preferences.js)
 *   content/messenger-overlay-preferences.xul              (content/messenger-overlay-preferences.xul)
 #ifdef MOZ_SUITE