Bug 1504416 - De-overlay calendar-calendars-list.xul. r=mkmelin
authorPaul Morris <paul@paulwmorris.com>
Mon, 20 May 2019 10:59:31 +0200
changeset 34562 844558b1ed2ef5fab33556578e888fc7c4bab621
parent 34561 ebe4366fb0a3c4e6618fba322b8ce05ac32ead13
child 34563 92b567487475b1d9044a621c2e8829808ccb4858
push id2407
push userclokep@gmail.com
push dateMon, 20 May 2019 17:11:26 +0000
treeherdercomm-beta@193428fd6fd4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1504416
Bug 1504416 - De-overlay calendar-calendars-list.xul. r=mkmelin It's only used in one place, so this simplifies things.
.eslintignore
calendar/base/content/calendar-calendars-list.xul
calendar/base/jar.mn
calendar/lightning/content/messenger-overlay-sidebar.xul
--- a/.eslintignore
+++ b/.eslintignore
@@ -12,17 +12,17 @@ mozilla/**
 
 # These directories don't contain any js and are not meant to
 config/**
 db/**
 other-licenses/**
 testing/**
 
 # Temporarily disabled until the XUL parser is fixed.
-calendar/base/content/calendar-calendars-list.xul
+calendar/lightning/content/messenger-overlay-sidebar.xul
 calendar/providers/gdata/content/gdata-calendar-creation.xul
 common/src/viewSource.xul
 
 # We ignore all these directories by default, until we get them enabled.
 # If you are enabling a directory, please add directory specific exclusions
 # below.
 build/**
 suite/**
deleted file mode 100644
--- a/calendar/base/content/calendar-calendars-list.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-<?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/. -->
-
-<?xml-stylesheet href="chrome://calendar/skin/calendar-management.css" type="text/css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://calendar/locale/calendar.dtd">
-
-<overlay id="calendar-list-overlay"
-         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="list-calendars-context-menu"
-               onpopupshowing="return calendarListSetupContextMenu(event);">
-      <menuitem id="list-calendars-context-togglevisible"
-                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"
-                accesskey="&calendar.context.showonly.accesskey;"
-                oncommand="showOnlyCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
-      <menuitem id="list-calendars-context-showall"
-                label="&calendar.context.showall.label;"
-                accesskey="&calendar.context.showall.accesskey;"
-                oncommand="showAllCalendars();"/>
-      <menuseparator id="list-calendars-context-showops-menuseparator"/>
-      <menuitem id="list-calendars-context-new"
-                label="&calendar.context.newserver.label;"
-                accesskey="&calendar.context.newserver.accesskey;"
-                observes="calendar_new_calendar_command"/>
-      <menuitem id="list-calendars-context-find"
-                label="&calendar.context.findcalendar.label;"
-                accesskey="&calendar.context.findcalendar.accesskey;"
-                oncommand="openCalendarSubscriptionsDialog();"/>
-      <menuitem id="list-calendars-context-delete"
-                labeldelete="&calendar.context.deleteserver2.label;"
-                labelremove="&calendar.context.removeserver.label;"
-                labelunsubscribe="&calendar.context.unsubscribeserver.label;"
-                accesskeydelete="&calendar.context.deleteserver2.accesskey;"
-                accesskeyremove="&calendar.context.removeserver.accesskey;"
-                accesskeyunsubscribe="&calendar.context.unsubscribeserver.accesskey;"
-                observes="calendar_delete_calendar_command"/>
-      <menuseparator id="list-calendars-context-itemops-menuseparator"/>
-      <menuitem id="list-calendars-context-export"
-                label="&calendar.context.export.label;"
-                accesskey="&calendar.context.export.accesskey;"
-                oncommand="exportEntireCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
-      <menuitem id="list-calendars-context-publish"
-                label="&calendar.context.publish.label;"
-                accesskey="&calendar.context.publish.accesskey;"
-                observes="calendar_publish_selected_calendar_command"/>
-      <menuseparator id="list-calendars-context-export-menuseparator"/>
-      <menuitem id="list-calendars-context-reload"
-                label="&calendar.context.synccalendars.label;"
-                accesskey="&calendar.context.synccalendars.accesskey;"
-                observes="calendar_reload_remote_calendars"/>
-      <menuseparator id="list-calendars-context-reload-menuseparator"/>
-      <menuitem id="list-calendars-context-edit"
-                label="&calendar.context.properties.label;"
-                accesskey="&calendar.context.properties.accesskey;"
-                observes="calendar_edit_calendar_command"/>
-    </menupopup>
-    <tooltip id="calendar-list-tooltip"
-             onpopupshowing="return calendarListTooltipShowing(event)"/>
-  </popupset>
-
-  <tree is="calendar-list-tree-full" id="calendar-list-tree-widget"
-        writable="true"
-        allowdrag="true"
-        onselect="document.commandDispatcher.updateCommands('calendar_commands')"
-        childtooltip="calendar-list-tooltip"
-        childcontext="list-calendars-context-menu"/>
-</overlay>
--- a/calendar/base/jar.mn
+++ b/calendar/base/jar.mn
@@ -4,17 +4,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 calendar.jar:
 % resource calendar .
 % content calendar %content/calendar/
     content/calendar/agenda-listbox-utils.js               (content/agenda-listbox-utils.js)
     content/calendar/agenda-listbox.js                     (content/agenda-listbox.js)
     content/calendar/calendar-bindings.css                 (content/calendar-bindings.css)
-    content/calendar/calendar-calendars-list.xul           (content/calendar-calendars-list.xul)
     content/calendar/calendar-chrome-startup.js            (content/calendar-chrome-startup.js)
     content/calendar/calendar-clipboard.js                 (content/calendar-clipboard.js)
     content/calendar/calendar-common-sets.xul              (content/calendar-common-sets.xul)
     content/calendar/calendar-common-sets.js               (content/calendar-common-sets.js)
     content/calendar/calendar-daypicker.xml                (content/calendar-daypicker.xml)
     content/calendar/calendar-event-gripbar.js             (content/calendar-event-gripbar.js)
     content/calendar/calendar-views.xml                    (content/calendar-views.xml)
     content/calendar/calendar-dnd-listener.js              (content/calendar-dnd-listener.js)
--- a/calendar/lightning/content/messenger-overlay-sidebar.xul
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xul
@@ -16,18 +16,18 @@
 
 <?xml-stylesheet href="chrome://lightning/skin/lightning.css" type="text/css"?>
 
 <?xml-stylesheet href="chrome://calendar/content/calendar-view-bindings.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"?>
+<?xml-stylesheet href="chrome://calendar/skin/calendar-management.css" type="text/css"?>
 
-<?xul-overlay href="chrome://calendar/content/calendar-calendars-list.xul"?>
 <?xul-overlay href="chrome://calendar/content/calendar-common-sets.xul"?>
 <?xul-overlay href="chrome://calendar/content/calendar-views.xul"?>
 
 <?xul-overlay href="chrome://lightning/content/lightning-toolbar.xul"?>
 <?xul-overlay href="chrome://lightning/content/lightning-menus.xul"?>
 
 <overlay id="ltnSidebarOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
@@ -105,17 +105,70 @@
       <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"/>
     </keyset>
 
     <broadcasterset id="calendar_broadcasters">
       <broadcaster id="filterBroadcaster" value="all"/>
     </broadcasterset>
 
-    <popupset id="calendar-popupset"/>
+    <popupset id="calendar-popupset">
+      <menupopup id="list-calendars-context-menu"
+                 onpopupshowing="return calendarListSetupContextMenu(event);">
+        <menuitem id="list-calendars-context-togglevisible"
+                  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"
+                  accesskey="&calendar.context.showonly.accesskey;"
+                  oncommand="showOnlyCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
+        <menuitem id="list-calendars-context-showall"
+                  label="&calendar.context.showall.label;"
+                  accesskey="&calendar.context.showall.accesskey;"
+                  oncommand="showAllCalendars();"/>
+        <menuseparator id="list-calendars-context-showops-menuseparator"/>
+        <menuitem id="list-calendars-context-new"
+                  label="&calendar.context.newserver.label;"
+                  accesskey="&calendar.context.newserver.accesskey;"
+                  observes="calendar_new_calendar_command"/>
+        <menuitem id="list-calendars-context-find"
+                  label="&calendar.context.findcalendar.label;"
+                  accesskey="&calendar.context.findcalendar.accesskey;"
+                  oncommand="openCalendarSubscriptionsDialog();"/>
+        <menuitem id="list-calendars-context-delete"
+                  labeldelete="&calendar.context.deleteserver2.label;"
+                  labelremove="&calendar.context.removeserver.label;"
+                  labelunsubscribe="&calendar.context.unsubscribeserver.label;"
+                  accesskeydelete="&calendar.context.deleteserver2.accesskey;"
+                  accesskeyremove="&calendar.context.removeserver.accesskey;"
+                  accesskeyunsubscribe="&calendar.context.unsubscribeserver.accesskey;"
+                  observes="calendar_delete_calendar_command"/>
+        <menuseparator id="list-calendars-context-itemops-menuseparator"/>
+        <menuitem id="list-calendars-context-export"
+                  label="&calendar.context.export.label;"
+                  accesskey="&calendar.context.export.accesskey;"
+                  oncommand="exportEntireCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
+        <menuitem id="list-calendars-context-publish"
+                  label="&calendar.context.publish.label;"
+                  accesskey="&calendar.context.publish.accesskey;"
+                  observes="calendar_publish_selected_calendar_command"/>
+        <menuseparator id="list-calendars-context-export-menuseparator"/>
+        <menuitem id="list-calendars-context-reload"
+                  label="&calendar.context.synccalendars.label;"
+                  accesskey="&calendar.context.synccalendars.accesskey;"
+                  observes="calendar_reload_remote_calendars"/>
+        <menuseparator id="list-calendars-context-reload-menuseparator"/>
+        <menuitem id="list-calendars-context-edit"
+                  label="&calendar.context.properties.label;"
+                  accesskey="&calendar.context.properties.accesskey;"
+                  observes="calendar_edit_calendar_command"/>
+      </menupopup>
+      <tooltip id="calendar-list-tooltip"
+               onpopupshowing="return calendarListTooltipShowing(event)"/>
+    </popupset>
   </window>
 
   <toolbar id="tabbar-toolbar">
     <toolbarbutton id="calendar-tab-button"
                    class="toolbarbutton-1"
                    title="&lightning.toolbar.calendar.label;"
                    tooltiptext="&lightning.toolbar.calendar.tooltip;"
                    command="new_calendar_tab"/>
@@ -180,17 +233,19 @@
                                ondrop="return document.getElementById('calendar-list-tree-widget').foreignDrop(event)"
                                ondragenter="return document.getElementById('calendar-list-tree-widget').foreignCanDrop(event)"
                                ondragover="return document.getElementById('calendar-list-tree-widget').foreignCanDrop(event)"
                                label="&calendar.list.header.label;"/>
               <modevbox id="calendar-listtree-pane" flex="1" mode="calendar,task" broadcaster="modeBroadcaster"
                         refcontrol="calendar-list-header">
 
                 <tree is="calendar-list-tree-full" id="calendar-list-tree-widget"
-                      class="calendar-list-tree task-tree-subpane"
+                      writable="true"
+                      allowdrag="true"
+                      onselect="document.commandDispatcher.updateCommands('calendar_commands')"
                       childtooltip="calendar-list-tooltip"
                       childcontext="list-calendars-context-menu"/>
               </modevbox>
           </modevbox>
           </vbox>
         </vbox>
 
         <splitter id="calsidebar_splitter"