Bug 1508119 - De-overlay the lightning-item-toolbar.xul file. r=darktrojan
authorPaul Morris <paul@thunderbird.net>
Tue, 05 Nov 2019 20:58:12 -0500
changeset 36572 f5895f13fccbfeae65a8deeb1f0dac268c0296ec
parent 36571 ebfcb7d8cf3eacb3e5710c26c7f6231a2546dab1
child 36573 f375c9cc162077893f4c731fa7fef7e464a808ac
push id2534
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:52:51 +0000
treeherdercomm-beta@055c50840778 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdarktrojan
bugs1508119
Bug 1508119 - De-overlay the lightning-item-toolbar.xul file. r=darktrojan Have the preprocessor include it instead.
calendar/base/content/dialogs/calendar-event-dialog.xul
calendar/base/jar.mn
calendar/lightning/content/lightning-item-panel.xul
calendar/lightning/content/lightning-item-toolbar.inc.xul
calendar/lightning/content/lightning-item-toolbar.xul
calendar/lightning/jar.mn
--- a/calendar/base/content/dialogs/calendar-event-dialog.xul
+++ b/calendar/base/content/dialogs/calendar-event-dialog.xul
@@ -18,18 +18,16 @@
     <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd">
     <!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
     %brandDTD;
     %globalDTD;
     %calendarDTD;
     %eventDialogDTD;
 ]>
 
-<?xul-overlay href="chrome://lightning/content/lightning-item-toolbar.xul"?>
-
 <!-- Dialog id is changed during execution to allow different Window-icons
      on this dialog. document.loadOverlay() will not work on this one. -->
 <dialog title="&event.title.label;"
         windowtype="Calendar:EventDialog"
         onload="onLoadLightningItemPanel();"
         onunload="onUnloadLightningItemPanel();"
         persist="screenX screenY width height"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
@@ -559,18 +557,20 @@
                         disable-on-readonly="true"/>
             </menupopup>
           </menu>
         </menupopup>
       </menu>
     </menubar>
     </toolbar>
 
-    <!-- toolbarpalette items are added with an overlay -->
-    <toolbarpalette id="event-toolbarpalette"/>
+    <toolbarpalette id="event-toolbarpalette">
+#include ../../../lightning/content/lightning-item-toolbar.inc.xul
+    </toolbarpalette>
+
     <!-- toolboxid is set here since we move the toolbar around in tabs -->
     <toolbar is="customizable-toolbar" id="event-toolbar"
              toolboxid="event-toolbox"
              class="chromeclass-toolbar"
              customizable="true"
              labelalign="end"
              defaultlabelalign="end"
              context="event-dialog-toolbar-context-menu"
--- a/calendar/base/jar.mn
+++ b/calendar/base/jar.mn
@@ -50,17 +50,17 @@ calendar.jar:
     content/calendar-event-dialog-attendees.xul                 (content/dialogs/calendar-event-dialog-attendees.xul)
     content/calendar-event-dialog-recurrence.js                 (content/dialogs/calendar-event-dialog-recurrence.js)
     content/calendar-event-dialog-recurrence.xul                (content/dialogs/calendar-event-dialog-recurrence.xul)
     content/calendar-event-dialog-reminder.js                   (content/dialogs/calendar-event-dialog-reminder.js)
     content/calendar-event-dialog-reminder.xul                  (content/dialogs/calendar-event-dialog-reminder.xul)
     content/calendar-event-dialog-timezone.js                   (content/dialogs/calendar-event-dialog-timezone.js)
     content/calendar-event-dialog-timezone.xul                  (content/dialogs/calendar-event-dialog-timezone.xul)
     content/calendar-event-dialog.css                           (content/dialogs/calendar-event-dialog.css)
-    content/calendar-event-dialog.xul                           (content/dialogs/calendar-event-dialog.xul)
+*   content/calendar-event-dialog.xul                           (content/dialogs/calendar-event-dialog.xul)
     content/calendar-invitations-dialog.css                     (content/dialogs/calendar-invitations-dialog.css)
     content/calendar-invitations-dialog.js                      (content/dialogs/calendar-invitations-dialog.js)
     content/calendar-invitations-dialog.xul                     (content/dialogs/calendar-invitations-dialog.xul)
     content/calendar-migration-dialog.js                        (content/dialogs/calendar-migration-dialog.js)
     content/calendar-migration-dialog.xul                       (content/dialogs/calendar-migration-dialog.xul)
     content/calendar-occurrence-prompt.xul                      (content/dialogs/calendar-occurrence-prompt.xul)
     content/calendar-print-dialog.js                            (content/dialogs/calendar-print-dialog.js)
     content/calendar-print-dialog.xul                           (content/dialogs/calendar-print-dialog.xul)
--- a/calendar/lightning/content/lightning-item-panel.xul
+++ b/calendar/lightning/content/lightning-item-panel.xul
@@ -12,18 +12,16 @@
     <!ENTITY % toolbarDTD SYSTEM "chrome://lightning/locale/lightning-toolbar.dtd">
     %brandDTD;
     %globalDTD;
     %calendarDTD;
     %eventDialogDTD;
     %toolbarDTD;
 ]>
 
-<?xul-overlay href="chrome://lightning/content/lightning-item-toolbar.xul"?>
-
 <overlay id="ltnCalendarItemPanelContentOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
 
   <tabpanels id="tabpanelcontainer">
     <vbox id="lightningItemPanel" collapsed="true">
 
       <!-- The id of the inner vbox and the iframe are set dynamically
            when a tab is created. -->
@@ -121,18 +119,18 @@
         <toolbox id="event-toolbox"
                  class="mail-toolbox"
                  mode="full"
                  defaultmode="full"
                  iconsize="small"
                  defaulticonsize="small"
                  labelalign="end"
                  defaultlabelalign="end">
-          <!-- more toolbarpalette items are added with an overlay -->
           <toolbarpalette id="event-toolbarpalette">
+#include lightning-item-toolbar.inc.xul
             <toolbarbutton id="calendar-item-appmenu-button"
                            type="menu"
                            class="toolbarbutton-1 button-appmenu"
                            label="&lightning.toolbar.appmenuButton.label;"
                            tooltiptext="&lightning.toolbar.appmenuButton1.tooltip;"/>
           </toolbarpalette>
           <!-- toolboxid is set here since we move the toolbar around for tabs -->
           <toolbar is="customizable-toolbar" id="event-tab-toolbar"
rename from calendar/lightning/content/lightning-item-toolbar.xul
rename to calendar/lightning/content/lightning-item-toolbar.inc.xul
--- a/calendar/lightning/content/lightning-item-toolbar.xul
+++ b/calendar/lightning/content/lightning-item-toolbar.inc.xul
@@ -1,170 +1,152 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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 % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
-    <!ENTITY % globalDTD SYSTEM "chrome://calendar/locale/global.dtd">
-    <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd">
-    <!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
-    %brandDTD;
-    %globalDTD;
-    %calendarDTD;
-    %eventDialogDTD;
-]>
-
-<overlay id="ltnCalendarItemPanelContentOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
+# 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/.
 
-  <toolbarpalette id="event-toolbarpalette">
-    <toolbarbutton id="button-save"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   label="&event.toolbar.save.label2;"
-                   tooltiptext="&event.toolbar.save.tooltip2;"
-                   command="cmd_save"/>
-    <toolbarbutton id="button-saveandclose"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   label="&event.toolbar.saveandclose.label;"
-                   tooltiptext="&event.toolbar.saveandclose.tooltip;"
-                   command="cmd_accept"/>
-    <toolbarbutton id="button-attendees"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1 event-only"
-                   disable-on-readonly="true"
-                   label="&event.toolbar.attendees.label;"
-                   tooltiptext="&event.toolbar.attendees.tooltip;"
-                   command="cmd_attendees"/>
-    <toolbarbutton id="button-privacy"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   type="menu"
-                   disable-on-readonly="true"
-                   label="&event.toolbar.privacy.label;"
-                   tooltiptext="&event.toolbar.privacy.tooltip;">
-      <menupopup id="event-privacy-menupopup">
-        <menuitem id="event-privacy-public-menuitem"
-                  name="event-privacy-group"
-                  label="&event.menu.options.privacy.public.label;"
-                  type="radio"
-                  privacy="PUBLIC"
-                  oncommand="editPrivacy(this, event)"/>
-        <menuitem id="event-privacy-confidential-menuitem"
-                  name="event-privacy-group"
-                  label="&event.menu.options.privacy.confidential.label;"
-                  type="radio"
-                  privacy="CONFIDENTIAL"
-                  oncommand="editPrivacy(this, event)"/>
-        <menuitem id="event-privacy-private-menuitem"
-                  name="event-privacy-group"
-                  label="&event.menu.options.privacy.private.label;"
-                  type="radio"
-                  privacy="PRIVATE"
-                  oncommand="editPrivacy(this, event)"/>
-      </menupopup>
-    </toolbarbutton>
-    <toolbarbutton id="button-url"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   label="&event.attachments.menubutton.label;"
-                   tooltiptext="&event.toolbar.attachments.tooltip;"
-                   command="cmd_attach_url"
-                   disable-on-readonly="true"/>
-    <toolbarbutton id="button-delete"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   label="&event.toolbar.delete.label;"
-                   tooltiptext="&event.toolbar.delete.tooltip;"
-                   command="cmd_item_delete"
-                   disable-on-readonly="true"/>
-    <toolbarbutton id="button-priority"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   type="menu"
-                   disable-on-readonly="true"
-                   label="&event.menu.options.priority2.label;"
-                   tooltiptext="&event.toolbar.priority.tooltip;">
-      <menupopup id="event-priority-menupopup">
-        <menuitem id="event-priority-none-menuitem"
-                  name="event-priority-group"
-                  label="&event.menu.options.priority.notspecified.label;"
-                  type="radio"
-                  command="cmd_priority_none"/>
-        <menuitem id="event-priority-low-menuitem"
-                  name="event-priority-group"
-                  label="&event.menu.options.priority.low.label;"
-                  type="radio"
-                  command="cmd_priority_low"/>
-        <menuitem id="event-priority-normal-menuitem"
-                  name="event-priority-group"
-                  label="&event.menu.options.priority.normal.label;"
-                  type="radio"
-                  command="cmd_priority_normal"/>
-        <menuitem id="event-priority-high-menuitem"
-                  name="event-priority-group"
-                  label="&event.menu.options.priority.high.label;"
-                  type="radio"
-                  command="cmd_priority_high"/>
-      </menupopup>
-    </toolbarbutton>
-    <toolbarbutton id="button-status"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1 event-only"
-                   type="menu"
-                   disable-on-readonly="true"
-                   label="&newevent.status.label;"
-                   tooltiptext="&event.toolbar.status.tooltip;">
-      <menupopup id="event-status-menupopup">
-        <menuitem id="event-status-none-menuitem"
-                  name="event-status-group"
-                  label="&newevent.eventStatus.none.label;"
-                  type="radio"
-                  command="cmd_status_none"/>
-        <menuitem id="event-status-tentative-menuitem"
-                  name="event-status-group"
-                  label="&newevent.status.tentative.label;"
-                  type="radio"
-                  command="cmd_status_tentative"/>
-        <menuitem id="event-status-confirmed-menuitem"
-                  name="event-status-group"
-                  label="&newevent.status.confirmed.label;"
-                  type="radio"
-                  command="cmd_status_confirmed"/>
-        <menuitem id="event-status-cancelled-menuitem"
-                  name="event-status-group"
-                  label="&newevent.eventStatus.cancelled.label;"
-                  type="radio"
-                  command="cmd_status_cancelled"/>
-      </menupopup>
-    </toolbarbutton>
-    <toolbarbutton id="button-freebusy"
-                   mode="dialog"
-                   class="cal-event-toolbarbutton toolbarbutton-1 event-only"
-                   type="menu"
-                   disable-on-readonly="true"
-                   label="&event.menu.options.show.time.label;"
-                   tooltiptext="&event.toolbar.freebusy.tooltip;">
-      <menupopup id="event-freebusy-menupopup">
-        <menuitem id="event-freebusy-busy-menuitem"
-                  name="event-freebusy-group"
-                  label="&event.menu.options.show.time.busy.label;"
-                  type="radio"
-                  command="cmd_showtimeas_busy"/>
-        <menuitem id="event-freebusy-free-menuitem"
-                  name="event-freebusy-group"
-                  label="&event.menu.options.show.time.free.label;"
-                  type="radio"
-                  command="cmd_showtimeas_free"/>
-      </menupopup>
-    </toolbarbutton>
-    <toolbarbutton id="button-timezones"
-                   mode="dialog"
-                   type="checkbox"
-                   class="cal-event-toolbarbutton toolbarbutton-1"
-                   label="&event.menu.options.timezone2.label;"
-                   tooltiptext="&event.menu.options.timezone2.label;"
-                   command="cmd_timezone"/>
-  </toolbarpalette>
-</overlay>
+  <toolbarbutton id="button-save"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 label="&event.toolbar.save.label2;"
+                 tooltiptext="&event.toolbar.save.tooltip2;"
+                 command="cmd_save"/>
+  <toolbarbutton id="button-saveandclose"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 label="&event.toolbar.saveandclose.label;"
+                 tooltiptext="&event.toolbar.saveandclose.tooltip;"
+                 command="cmd_accept"/>
+  <toolbarbutton id="button-attendees"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1 event-only"
+                 disable-on-readonly="true"
+                 label="&event.toolbar.attendees.label;"
+                 tooltiptext="&event.toolbar.attendees.tooltip;"
+                 command="cmd_attendees"/>
+  <toolbarbutton id="button-privacy"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 type="menu"
+                 disable-on-readonly="true"
+                 label="&event.toolbar.privacy.label;"
+                 tooltiptext="&event.toolbar.privacy.tooltip;">
+    <menupopup id="event-privacy-menupopup">
+      <menuitem id="event-privacy-public-menuitem"
+                name="event-privacy-group"
+                label="&event.menu.options.privacy.public.label;"
+                type="radio"
+                privacy="PUBLIC"
+                oncommand="editPrivacy(this, event)"/>
+      <menuitem id="event-privacy-confidential-menuitem"
+                name="event-privacy-group"
+                label="&event.menu.options.privacy.confidential.label;"
+                type="radio"
+                privacy="CONFIDENTIAL"
+                oncommand="editPrivacy(this, event)"/>
+      <menuitem id="event-privacy-private-menuitem"
+                name="event-privacy-group"
+                label="&event.menu.options.privacy.private.label;"
+                type="radio"
+                privacy="PRIVATE"
+                oncommand="editPrivacy(this, event)"/>
+    </menupopup>
+  </toolbarbutton>
+  <toolbarbutton id="button-url"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 label="&event.attachments.menubutton.label;"
+                 tooltiptext="&event.toolbar.attachments.tooltip;"
+                 command="cmd_attach_url"
+                 disable-on-readonly="true"/>
+  <toolbarbutton id="button-delete"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 label="&event.toolbar.delete.label;"
+                 tooltiptext="&event.toolbar.delete.tooltip;"
+                 command="cmd_item_delete"
+                 disable-on-readonly="true"/>
+  <toolbarbutton id="button-priority"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 type="menu"
+                 disable-on-readonly="true"
+                 label="&event.menu.options.priority2.label;"
+                 tooltiptext="&event.toolbar.priority.tooltip;">
+    <menupopup id="event-priority-menupopup">
+      <menuitem id="event-priority-none-menuitem"
+                name="event-priority-group"
+                label="&event.menu.options.priority.notspecified.label;"
+                type="radio"
+                command="cmd_priority_none"/>
+      <menuitem id="event-priority-low-menuitem"
+                name="event-priority-group"
+                label="&event.menu.options.priority.low.label;"
+                type="radio"
+                command="cmd_priority_low"/>
+      <menuitem id="event-priority-normal-menuitem"
+                name="event-priority-group"
+                label="&event.menu.options.priority.normal.label;"
+                type="radio"
+                command="cmd_priority_normal"/>
+      <menuitem id="event-priority-high-menuitem"
+                name="event-priority-group"
+                label="&event.menu.options.priority.high.label;"
+                type="radio"
+                command="cmd_priority_high"/>
+    </menupopup>
+  </toolbarbutton>
+  <toolbarbutton id="button-status"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1 event-only"
+                 type="menu"
+                 disable-on-readonly="true"
+                 label="&newevent.status.label;"
+                 tooltiptext="&event.toolbar.status.tooltip;">
+    <menupopup id="event-status-menupopup">
+      <menuitem id="event-status-none-menuitem"
+                name="event-status-group"
+                label="&newevent.eventStatus.none.label;"
+                type="radio"
+                command="cmd_status_none"/>
+      <menuitem id="event-status-tentative-menuitem"
+                name="event-status-group"
+                label="&newevent.status.tentative.label;"
+                type="radio"
+                command="cmd_status_tentative"/>
+      <menuitem id="event-status-confirmed-menuitem"
+                name="event-status-group"
+                label="&newevent.status.confirmed.label;"
+                type="radio"
+                command="cmd_status_confirmed"/>
+      <menuitem id="event-status-cancelled-menuitem"
+                name="event-status-group"
+                label="&newevent.eventStatus.cancelled.label;"
+                type="radio"
+                command="cmd_status_cancelled"/>
+    </menupopup>
+  </toolbarbutton>
+  <toolbarbutton id="button-freebusy"
+                 mode="dialog"
+                 class="cal-event-toolbarbutton toolbarbutton-1 event-only"
+                 type="menu"
+                 disable-on-readonly="true"
+                 label="&event.menu.options.show.time.label;"
+                 tooltiptext="&event.toolbar.freebusy.tooltip;">
+    <menupopup id="event-freebusy-menupopup">
+      <menuitem id="event-freebusy-busy-menuitem"
+                name="event-freebusy-group"
+                label="&event.menu.options.show.time.busy.label;"
+                type="radio"
+                command="cmd_showtimeas_busy"/>
+      <menuitem id="event-freebusy-free-menuitem"
+                name="event-freebusy-group"
+                label="&event.menu.options.show.time.free.label;"
+                type="radio"
+                command="cmd_showtimeas_free"/>
+    </menupopup>
+  </toolbarbutton>
+  <toolbarbutton id="button-timezones"
+                 mode="dialog"
+                 type="checkbox"
+                 class="cal-event-toolbarbutton toolbarbutton-1"
+                 label="&event.menu.options.timezone2.label;"
+                 tooltiptext="&event.menu.options.timezone2.label;"
+                 command="cmd_timezone"/>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -25,18 +25,17 @@ lightning.jar:
 % content lightning %content/
     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.xul                           (content/imip-bar-overlay.xul)
     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-toolbar.xul                     (content/lightning-item-toolbar.xul)
-    content/lightning-item-panel.xul                       (content/lightning-item-panel.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-migration.xul                        (content/lightning-migration.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)