Bug 1608610 - Integrate messenger-overlay-preferences.xhtml. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Mon, 13 Jan 2020 15:00:22 -0500
changeset 38105 dca41d3769966fa8c3a4286240ef7bfa0fc78cf7
parent 38104 8f7bf0b238cbd5d9d35a326443fd3d7e4661032b
child 38106 13a1ac7c5683f4f2dd6e981c12b58d62401ca30d
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersFallen
bugs1608610
Bug 1608610 - Integrate messenger-overlay-preferences.xhtml. r=Fallen
calendar/lightning/content/messenger-overlay-preferences.inc.xhtml
calendar/lightning/content/messenger-overlay-preferences.xhtml
calendar/lightning/jar.mn
calendar/locales/en-US/chrome/calendar/preferences/preferences.dtd
mail/components/preferences/aboutPreferences.xhtml
rename from calendar/lightning/content/messenger-overlay-preferences.xhtml
rename to calendar/lightning/content/messenger-overlay-preferences.inc.xhtml
--- a/calendar/lightning/content/messenger-overlay-preferences.xhtml
+++ b/calendar/lightning/content/messenger-overlay-preferences.inc.xhtml
@@ -1,78 +1,44 @@
-<?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/. -->
-
-<?xml-stylesheet href="chrome://calendar-common/skin/calendar-preferences.css" type="text/css"?>
+# 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 % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd">
-    <!ENTITY % preferencesDTD SYSTEM "chrome://calendar/locale/preferences/preferences.dtd">
-    <!ENTITY % generalDTD SYSTEM "chrome://calendar/locale/preferences/general.dtd">
-    <!ENTITY % globalDTD SYSTEM "chrome://calendar/locale/global.dtd">
-    <!ENTITY % eventDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
-    <!ENTITY % alarmsDTD SYSTEM "chrome://calendar/locale/preferences/alarms.dtd">
-    <!ENTITY % categoriesDTD SYSTEM "chrome://calendar/locale/preferences/categories.dtd">
-    <!ENTITY % viewsDTD SYSTEM "chrome://calendar/locale/preferences/views.dtd">
-    %lightningDTD;
-    %preferencesDTD;
-    %generalDTD;
-    %globalDTD;
-    %eventDTD;
-    %alarmsDTD;
-    %categoriesDTD;
-    %viewsDTD;
-]>
+# This file requires the following localization files:
+# chrome://lightning/locale/lightning.dtd
+# chrome://calendar/locale/preferences/preferences.dtd
+# chrome://calendar/locale/preferences/general.dtd
+# chrome://calendar/locale/global.dtd
+# chrome://calendar/locale/calendar-event-dialog.dtd
+# chrome://calendar/locale/preferences/alarms.dtd
+# chrome://calendar/locale/preferences/categories.dtd
+# chrome://calendar/locale/preferences/views.dtd
 
-<?xml-stylesheet href="chrome://lightning/skin/lightning.css"?>
-
-<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-         xmlns:html="http://www.w3.org/1999/xhtml">
-    <prefpane id="paneLightning"
-              flex="1"
-              insertbefore="paneAdvanced"
-              label="&lightning.preferencesLabel;">
+  <prefpane id="paneLightning"
+            flex="1"
+            insertbefore="paneAdvanced"
+            label="&lightning.preferencesLabel;">
 
     <hbox id="calendarPaneCategory"
           class="subcategory"
           data-category="paneCalendar">
       <html:h1>&panelHeader.title;</html:h1>
     </hbox>
+
 #include ../../base/content/preferences/views.inc.xhtml
 #include ../../base/content/preferences/general.inc.xhtml
+
     <hbox id="chatPaneCategory"
           class="subcategory"
           data-category="paneCalendar">
       <html:h1>&panelReminder.title;</html:h1>
     </hbox>
+
 #include ../../base/content/preferences/alarms.inc.xhtml
+
     <hbox id="chatPaneCategory"
           class="subcategory"
           data-category="paneCalendar">
-      <html:h1>&panelCatecory.title;</html:h1>
+      <html:h1>&panelCategory.title;</html:h1>
     </hbox>
-#include ../../base/content/preferences/categories.inc.xhtml
-    </prefpane>
-
-    <script src="chrome://calendar/content/calendar-ui-utils.js"/>
-    <script src="chrome://calendar/content/calendar-dialog-utils.js"/>
 
-    <!-- Get the localized text for use in the .js -->
-    <script>
-        var labelLong  = "&pref.dateformat.long;";
-        var labelShort = "&pref.dateformat.short;";
-        var noneLabel  = "&pref.categories.none.label;";
-        var newTitle   = "&pref.categories.new.title;";
-        var editTitle  = "&pref.categories.edit.title;";
-        var overwrite  = "&pref.categories.overwrite;";
-        var overwriteTitle = "&pref.categories.overwrite.title;";
-        var noBlankCategories = "&pref.categories.noBlankCategories;";
-    </script>
-
-    <script src="chrome://calendar/content/preferences/general.js"/>
-    <script src="chrome://calendar/content/preferences/alarms.js"/>
-    <script src="chrome://calendar/content/preferences/categories.js"/>
-    <script src="chrome://calendar/content/preferences/views.js"/>
-    <script src="chrome://lightning/content/messenger-overlay-preferences.js"/>
-</overlay>
+#include ../../base/content/preferences/categories.inc.xhtml
+  </prefpane>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -7,18 +7,16 @@ lightning.jar:
 % override chrome://messagebody/skin/imip.css chrome://lightning/skin/imip.css
 % override chrome://messagebody/skin/calendar-event-dialog-attendees.png chrome://calendar-common/skin/calendar-event-dialog-attendees.png
 % overlay chrome://messenger/content/messenger.xhtml chrome://lightning/content/messenger-overlay-sidebar.xhtml
 % overlay chrome://messenger/content/messageWindow.xhtml chrome://lightning/content/imip-bar-overlay.xhtml
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xhtml chrome://lightning/content/imip-bar-overlay.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://messenger/content/preferences/preferences.xhtml chrome://lightning/content/messenger-overlay-preferences.xhtml
-% overlay about:preferences chrome://lightning/content/messenger-overlay-preferences.xhtml
 % 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/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.xhtml                         (content/imip-bar-overlay.xhtml)
     content/lightning-calendar-creation.js                 (content/lightning-calendar-creation.js)
@@ -27,17 +25,17 @@ lightning.jar:
 *   content/lightning-item-panel.inc.xhtml                 (content/lightning-item-panel.inc.xhtml)
     content/lightning-item-panel.js                        (content/lightning-item-panel.js)
     content/lightning-item-iframe.xhtml                    (content/lightning-item-iframe.xhtml)
     content/lightning-item-iframe.js                       (content/lightning-item-iframe.js)
     content/lightning-utils.js                             (content/lightning-utils.js)
     content/messenger-overlay-sidebar.js                   (content/messenger-overlay-sidebar.js)
     content/messenger-overlay-sidebar.xhtml                (content/messenger-overlay-sidebar.xhtml)
     content/messenger-overlay-preferences.js               (content/messenger-overlay-preferences.js)
-*   content/messenger-overlay-preferences.xhtml            (content/messenger-overlay-preferences.xhtml)
+*   content/messenger-overlay-preferences.inc.xhtml        (content/messenger-overlay-preferences.inc.xhtml)
 #ifdef MOZ_SUITE
     content/suite-overlay-addons.xhtml                     (content/suite-overlay-addons.xhtml)
     content/suite-overlay-preferences.xhtml                (content/suite-overlay-preferences.xhtml)
     content/suite-overlay-sidebar.js                       (content/suite-overlay-sidebar.js)
     content/suite-overlay-sidebar.xhtml                    (content/suite-overlay-sidebar.xhtml)
 #endif
     content/caldav-lightning-calendar-creation.js          (../providers/caldav/content/caldav-lightning-calendar-creation.js)
     content/caldav-lightning-calendar-properties.js        (../providers/caldav/content/caldav-lightning-calendar-properties.js)
--- a/calendar/locales/en-US/chrome/calendar/preferences/preferences.dtd
+++ b/calendar/locales/en-US/chrome/calendar/preferences/preferences.dtd
@@ -3,9 +3,9 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <!ENTITY  paneGeneral.title       "General">
 <!ENTITY  paneAlarms.title        "Reminders">
 <!ENTITY  paneCategories.title    "Categories">
 <!ENTITY  paneViews.title         "Views">
 <!ENTITY  panelHeader.title       "Calendar">
 <!ENTITY  panelReminder.title     "Reminders">
-<!ENTITY  panelCatecory.title     "Categories">
+<!ENTITY  panelCategory.title     "Categories">
--- a/mail/components/preferences/aboutPreferences.xhtml
+++ b/mail/components/preferences/aboutPreferences.xhtml
@@ -6,16 +6,18 @@
 
 <?xml-stylesheet href="chrome://global/skin/global.css"?>
 <?xml-stylesheet href="chrome://messenger/skin/input-fields.css"?>
 <?xml-stylesheet href="chrome://messenger/content/messenger.css"?>
 <?xml-stylesheet href="chrome://messenger/content/preferences/handlers.css"?>
 <?xml-stylesheet href="chrome://messenger/skin/preferences/applications.css"?>
 <?xml-stylesheet href="chrome://global/skin/in-content/common.css"?>
 <?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css"?>
+<?xml-stylesheet href="chrome://calendar-common/skin/calendar-preferences.css" type="text/css"?>
+<?xml-stylesheet href="chrome://lightning/skin/lightning.css"?>
 
 <!DOCTYPE preftab [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 %brandDTD;
 <!ENTITY % preferencesDTD SYSTEM "chrome://messenger/locale/preferences/preferences.dtd">
 %preferencesDTD;
 <!ENTITY % generalDTD SYSTEM "chrome://messenger/locale/preferences/general.dtd" >
 %generalDTD;
@@ -46,16 +48,32 @@
 <!ENTITY % searchIntegrationDefaultDTD SYSTEM "chrome://messenger/locale/searchIntegrationDefault.dtd" >
 %searchIntegrationDefaultDTD;
 #endif
 #endif
 #ifdef MOZ_UPDATER
 <!ENTITY % aboutDialogDTD SYSTEM "chrome://messenger/locale/aboutDialog.dtd" >
 %aboutDialogDTD;
 #endif
+<!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd">
+%lightningDTD;
+<!ENTITY % calendarPreferencesDTD SYSTEM "chrome://calendar/locale/preferences/preferences.dtd">
+%calendarPreferencesDTD;
+<!ENTITY % calendarGeneralDTD SYSTEM "chrome://calendar/locale/preferences/general.dtd">
+%calendarGeneralDTD;
+<!ENTITY % globalDTD SYSTEM "chrome://calendar/locale/global.dtd">
+%globalDTD;
+<!ENTITY % eventDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd">
+%eventDTD;
+<!ENTITY % alarmsDTD SYSTEM "chrome://calendar/locale/preferences/alarms.dtd">
+%alarmsDTD;
+<!ENTITY % categoriesDTD SYSTEM "chrome://calendar/locale/preferences/categories.dtd">
+%categoriesDTD;
+<!ENTITY % viewsDTD SYSTEM "chrome://calendar/locale/preferences/views.dtd">
+%viewsDTD;
 ]>
 
 <preftab id="MailPreferences" flex="1"
          windowtype="Mail:Preferences"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:xhtml="http://www.w3.org/1999/xhtml"
          xmlns:html="http://www.w3.org/1999/xhtml"
          onload="gSubDialog.init();"
@@ -105,17 +123,17 @@
       </vbox>
       <hbox id="preferencesContainer" flex="1">
         <hbox class="paneDeckContainer" flex="1">
           <hbox id="paneDeck" flex="1">
 #include general.inc.xhtml
 #include compose.inc.xhtml
 #include privacy.inc.xhtml
 #include chat.inc.xhtml
-            <prefpane id="paneLightning" label="&paneLightning.title;"/>
+#include ../../../calendar/lightning/content/messenger-overlay-preferences.inc.xhtml
           </hbox>
         </hbox>
       </hbox>
     </hbox>
     <stack id="dialogStack" hidden="true"/>
     <vbox id="dialogTemplate"
           class="dialogOverlay"
           align="center"
@@ -137,9 +155,28 @@
       </vbox>
     </vbox>
   </stack>
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://communicator/content/contentAreaClick.js"/>
   <script src="chrome://messenger/content/preferences/preferences.js"/>
   <script src="chrome://messenger/content/preferences/subdialogs.js"/>
+
+  <script src="chrome://calendar/content/calendar-ui-utils.js"/>
+  <script src="chrome://calendar/content/calendar-dialog-utils.js"/>
+  <!-- Get the localized text for use in the JS. -->
+  <script>
+    var labelLong  = "&pref.dateformat.long;";
+    var labelShort = "&pref.dateformat.short;";
+    var noneLabel  = "&pref.categories.none.label;";
+    var newTitle   = "&pref.categories.new.title;";
+    var editTitle  = "&pref.categories.edit.title;";
+    var overwrite  = "&pref.categories.overwrite;";
+    var overwriteTitle = "&pref.categories.overwrite.title;";
+    var noBlankCategories = "&pref.categories.noBlankCategories;";
+  </script>
+  <script src="chrome://calendar/content/preferences/general.js"/>
+  <script src="chrome://calendar/content/preferences/alarms.js"/>
+  <script src="chrome://calendar/content/preferences/categories.js"/>
+  <script src="chrome://calendar/content/preferences/views.js"/>
+  <script src="chrome://lightning/content/messenger-overlay-preferences.js"/>
 </preftab>