Bug 1608610 - Pre-process calendar appmenu panelviews. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Tue, 14 Jan 2020 21:24:52 -0500
changeset 37248 106676f18f206f9c8fb36885b7a7317c40dfd141
parent 37247 5964bccb8f7b52c2f5eda20138d0fed36e025779
child 37249 30b1085f2a92db5613123de5c12dc55019a112fa
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 - Pre-process calendar appmenu panelviews. r=Fallen
calendar/lightning/content/calendar-appmenu-panelviews.inc.xhtml
calendar/lightning/content/messenger-overlay-sidebar.xhtml
calendar/lightning/jar.mn
mail/components/customizableui/content/panelUI.inc.xhtml
rename from calendar/lightning/content/messenger-overlay-sidebar.xhtml
rename to calendar/lightning/content/calendar-appmenu-panelviews.inc.xhtml
--- a/calendar/lightning/content/messenger-overlay-sidebar.xhtml
+++ b/calendar/lightning/content/calendar-appmenu-panelviews.inc.xhtml
@@ -1,325 +1,311 @@
-<?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/. -->
+# 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/.
 
-<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">
-
-  <!-- App Menu Integration -->
-
-  <!-- Calendar submenus added to the appmenu -->
-  <panelmultiview id="appMenu-multiView">
+<!-- calendar appmenu panelviews -->
 
-    <!-- Events and Tasks -->
-    <panelview id="appmenu_Event_Task_View"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="appmenu_ltnMenuSwitchToCalendar"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&lightning.toolbar.calendar.label;"
-                       command="switch2calendar"
-                       value="calendar"
-                       autocheck="false">
-        </toolbarbutton>
-        <toolbarbutton id="appmenu_ltnMenuSwitchToTask"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&lightning.toolbar.task.label;"
-                       command="switch2task"
-                       value="task"
-                       autocheck="false">
-        </toolbarbutton>
-        <toolbarseparator id="appmenu_ltnBeforeCalendarSection"/>
-        <toolbarbutton id="appmenu_ltnExportCalendar"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&calendar.export.label;"
-                       command="calendar_export_command"/>
-        <toolbarbutton id="appmenu_ltnImportCalendar"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&calendar.import.label;"
-                       command="calendar_import_command"/>
-        <toolbarbutton id="appmenu_ltnPublishCalendar"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&calendar.publish.label;"
-                       command="calendar_publish_calendar_command"/>
-        <toolbarbutton id="appmenu_ltnDeleteSelectedCalendar"
-                       class="subviewbutton subviewbutton-iconic"
-                       labeldelete="&calendar.deletecalendar.label;"
-                       labelremove="&calendar.removecalendar.label;"
-                       labelunsubscribe="&calendar.unsubscribecalendar.label;"
-                       accesskeydelete="&calendar.deletecalendar.accesskey;"
-                       accesskeyremove="&calendar.removecalendar.accesskey;"
-                       accesskeyunsubscribe="&calendar.unsubscribecalendar.accesskey;"
-                       command="calendar_delete_calendar_command"/>
-        <toolbarseparator id="ltnBeforeTaskActions"/>
-        <toolbarbutton id="appmenu_ltnTaskActionsMarkCompletedMenuitem"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.context.markcompleted.label;"
-                       command="calendar_toggle_completed_command"/>
-        <toolbarbutton id="appmenu_ltnTaskActionsPriorityMenuitem"
-                       class="subviewbutton subviewbutton-nav"
-                       label="&calendar.context.priority.label;"
-                       closemenu="none"
-                       oncommand="PanelUI.showSubView('appmenu_ltnTaskPriorityView', this)"/>
-        <toolbarbutton id="appmenu_ltnTaskActionsProgressMenuitem"
-                       class="subviewbutton subviewbutton-nav"
-                       label="&calendar.context.progress.label;"
-                       closemenu="none"
-                       oncommand="PanelUI.showSubView('appmenu_ltnTaskProgressView', this)"/>
-        <toolbarbutton id="appmenu_ltnTaskActionsPostponeMenuitem"
-                       class="subviewbutton subviewbutton-nav"
-                       label="&calendar.context.postpone.label;"
-                       observes="calendar_general-postpone_command"
-                       closemenu="none"
-                       oncommand="PanelUI.showSubView('appmenu_ltnTaskActionsPostponeView', this)"/>
-        <toolbarseparator id="appmenu_ltnBeforeUnifinderSection" />
-        <toolbarbutton id="appmenu_ltnShowUnifinder"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       checked="true"
-                       label="&showUnifinderCmd.label;"
-                       command="calendar_show_unifinder_command"/>
-        <toolbarseparator id="appmenu_ltnBeforeCalendarProperties" />
-        <toolbarbutton id="appmenu_ltnCalendarProperties"
-                       class="subviewbutton subviewbutton-iconic"
-                       insertafter="menu_properties"
-                       label="&calendar.properties.label;"
-                       command="calendar_edit_calendar_command"/>
-      </vbox>
-    </panelview>
+<!-- Events and Tasks -->
+<panelview id="appmenu_Event_Task_View"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="appmenu_ltnMenuSwitchToCalendar"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&lightning.toolbar.calendar.label;"
+                   command="switch2calendar"
+                   value="calendar"
+                   autocheck="false">
+    </toolbarbutton>
+    <toolbarbutton id="appmenu_ltnMenuSwitchToTask"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&lightning.toolbar.task.label;"
+                   command="switch2task"
+                   value="task"
+                   autocheck="false">
+    </toolbarbutton>
+    <toolbarseparator id="appmenu_ltnBeforeCalendarSection"/>
+    <toolbarbutton id="appmenu_ltnExportCalendar"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.export.label;"
+                   command="calendar_export_command"/>
+    <toolbarbutton id="appmenu_ltnImportCalendar"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.import.label;"
+                   command="calendar_import_command"/>
+    <toolbarbutton id="appmenu_ltnPublishCalendar"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.publish.label;"
+                   command="calendar_publish_calendar_command"/>
+    <toolbarbutton id="appmenu_ltnDeleteSelectedCalendar"
+                   class="subviewbutton subviewbutton-iconic"
+                   labeldelete="&calendar.deletecalendar.label;"
+                   labelremove="&calendar.removecalendar.label;"
+                   labelunsubscribe="&calendar.unsubscribecalendar.label;"
+                   accesskeydelete="&calendar.deletecalendar.accesskey;"
+                   accesskeyremove="&calendar.removecalendar.accesskey;"
+                   accesskeyunsubscribe="&calendar.unsubscribecalendar.accesskey;"
+                   command="calendar_delete_calendar_command"/>
+    <toolbarseparator id="ltnBeforeTaskActions"/>
+    <toolbarbutton id="appmenu_ltnTaskActionsMarkCompletedMenuitem"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.context.markcompleted.label;"
+                   command="calendar_toggle_completed_command"/>
+    <toolbarbutton id="appmenu_ltnTaskActionsPriorityMenuitem"
+                   class="subviewbutton subviewbutton-nav"
+                   label="&calendar.context.priority.label;"
+                   closemenu="none"
+                   oncommand="PanelUI.showSubView('appmenu_ltnTaskPriorityView', this)"/>
+    <toolbarbutton id="appmenu_ltnTaskActionsProgressMenuitem"
+                   class="subviewbutton subviewbutton-nav"
+                   label="&calendar.context.progress.label;"
+                   closemenu="none"
+                   oncommand="PanelUI.showSubView('appmenu_ltnTaskProgressView', this)"/>
+    <toolbarbutton id="appmenu_ltnTaskActionsPostponeMenuitem"
+                   class="subviewbutton subviewbutton-nav"
+                   label="&calendar.context.postpone.label;"
+                   observes="calendar_general-postpone_command"
+                   closemenu="none"
+                   oncommand="PanelUI.showSubView('appmenu_ltnTaskActionsPostponeView', this)"/>
+    <toolbarseparator id="appmenu_ltnBeforeUnifinderSection" />
+    <toolbarbutton id="appmenu_ltnShowUnifinder"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   checked="true"
+                   label="&showUnifinderCmd.label;"
+                   command="calendar_show_unifinder_command"/>
+    <toolbarseparator id="appmenu_ltnBeforeCalendarProperties" />
+    <toolbarbutton id="appmenu_ltnCalendarProperties"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.properties.label;"
+                   command="calendar_edit_calendar_command"/>
+  </vbox>
+</panelview>
 
-    <!-- Events and Tasks / Priority -->
-    <panelview is="calendar-task-priority-panelview" id="appmenu_ltnTaskPriorityView"
-               class="PanelUI-subView"/>
+<!-- Events and Tasks / Priority -->
+<panelview is="calendar-task-priority-panelview" id="appmenu_ltnTaskPriorityView"
+           class="PanelUI-subView"/>
 
-    <!-- Events and Tasks / Progress -->
-    <panelview is="calendar-task-progress-panelview" id="appmenu_ltnTaskProgressView"
-               class="PanelUI-subView"/>
+<!-- Events and Tasks / Progress -->
+<panelview is="calendar-task-progress-panelview" id="appmenu_ltnTaskProgressView"
+           class="PanelUI-subView"/>
 
-    <!-- Events and Tasks / Postpone Task -->
-    <panelview id="appmenu_ltnTaskActionsPostponeView"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="ltnTaskActionsPostponeMenu-1hour"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&calendar.context.postpone.1hour.label;"
-                       command="calendar_postpone-1hour_command"/>
-        <toolbarbutton id="appmenu_ltnTaskActionsPostponeMenu-1day"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&calendar.context.postpone.1day.label;"
-                       command="calendar_postpone-1day_command"/>
-        <toolbarbutton id="appmenu_ltnTaskActionsPostponeMenu-1week"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&calendar.context.postpone.1week.label;"
-                       command="calendar_postpone-1week_command"/>
-      </vbox>
-    </panelview>
+<!-- Events and Tasks / Postpone Task -->
+<panelview id="appmenu_ltnTaskActionsPostponeView"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="ltnTaskActionsPostponeMenu-1hour"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.context.postpone.1hour.label;"
+                   command="calendar_postpone-1hour_command"/>
+    <toolbarbutton id="appmenu_ltnTaskActionsPostponeMenu-1day"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.context.postpone.1day.label;"
+                   command="calendar_postpone-1day_command"/>
+    <toolbarbutton id="appmenu_ltnTaskActionsPostponeMenu-1week"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&calendar.context.postpone.1week.label;"
+                   command="calendar_postpone-1week_command"/>
+  </vbox>
+</panelview>
 
-    <!-- View / Today Pane -->
-    <panelview id="appmenu_calendar-today-pane-view"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="appmenu_ltnShowTodayPane-2"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&todaypane.showTodayPane.label;"
-                       type="checkbox"
-                       command="calendar_toggle_todaypane_command"/>
-        <toolbarseparator id="appmenu_ltnSeparatorBeforeDisplayMiniday"/>
-        <toolbarbutton id="appmenu_ltnTodayPaneDisplayMiniday"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="minidisplay"
-                       value="miniday"
-                       type="radio"
-                       oncommand="TodayPane.displayMiniSection('miniday')"
-                       observes="ltnTodayPaneDisplayMiniday"
-                       label="&todaypane.showMiniday.label;"/>
-        <toolbarbutton id="appmenu_ltnTodayPaneDisplayMinimonth"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="minidisplay"
-                       value="minimonth"
-                       type="radio"
-                       oncommand="TodayPane.displayMiniSection('minimonth')"
-                       observes="ltnTodayPaneDisplayMinimonth"
-                       label="&todaypane.showMinimonth.label;"/>
-        <toolbarbutton id="appmenu_ltnTodayPaneDisplayNone"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="minidisplay"
-                       value="none"
-                       type="radio"
-                       oncommand="TodayPane.displayMiniSection('none')"
-                       observes="ltnTodayPaneDisplayNone"
-                       label="&todaypane.showNone.label;"/>
-      </vbox>
-    </panelview>
+<!-- View / Today Pane -->
+<panelview id="appmenu_calendar-today-pane-view"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="appmenu_ltnShowTodayPane-2"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&todaypane.showTodayPane.label;"
+                   type="checkbox"
+                   command="calendar_toggle_todaypane_command"/>
+    <toolbarseparator id="appmenu_ltnSeparatorBeforeDisplayMiniday"/>
+    <toolbarbutton id="appmenu_ltnTodayPaneDisplayMiniday"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="minidisplay"
+                   value="miniday"
+                   type="radio"
+                   oncommand="TodayPane.displayMiniSection('miniday')"
+                   observes="ltnTodayPaneDisplayMiniday"
+                   label="&todaypane.showMiniday.label;"/>
+    <toolbarbutton id="appmenu_ltnTodayPaneDisplayMinimonth"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="minidisplay"
+                   value="minimonth"
+                   type="radio"
+                   oncommand="TodayPane.displayMiniSection('minimonth')"
+                   observes="ltnTodayPaneDisplayMinimonth"
+                   label="&todaypane.showMinimonth.label;"/>
+    <toolbarbutton id="appmenu_ltnTodayPaneDisplayNone"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="minidisplay"
+                   value="none"
+                   type="radio"
+                   oncommand="TodayPane.displayMiniSection('none')"
+                   observes="ltnTodayPaneDisplayNone"
+                   label="&todaypane.showNone.label;"/>
+  </vbox>
+</panelview>
 
-    <!-- View / Calendar -->
-    <panelview id="appmenu_calendar-calendar-view"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="appmenu_ltnChangeViewDay"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&lightning.toolbar.day.label;"
-                       type="radio"
-                       name="calendarMenuViews"
-                       command="calendar_day-view_command"/>
-        <toolbarbutton id="appmenu_ltnChangeViewWeek"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&lightning.toolbar.week.label;"
-                       type="radio"
-                       name="calendarMenuViews"
-                       command="calendar_week-view_command"/>
-        <toolbarbutton id="appmenu_ltnChangeViewMultiweek"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&lightning.toolbar.multiweek.label;"
-                       type="radio"
-                       name="calendarMenuViews"
-                       command="calendar_multiweek-view_command"/>
-        <toolbarbutton id="appmenu_ltnChangeViewMonth"
-                       class="subviewbutton subviewbutton-iconic"
-                       label="&lightning.toolbar.month.label;"
-                       type="radio"
-                       name="calendarMenuViews"
-                       command="calendar_month-view_command"/>
-        <toolbarseparator id="appmenu_ltnBeforeCalendarViewSection"/>
-        <toolbarbutton id="appmenu_ltnCalendarPaneMenu"
-                       class="subviewbutton subviewbutton-nav"
-                       label="&lightning.toolbar.calendarmenu.label;"
-                       closemenu="none"
-                       oncommand="PanelUI.showSubView('appmenu_ltnCalendarPaneView', this)"/>
-        <toolbarseparator id="appmenu_ltnBeforeCurrentViewMenu"/>
-        <toolbarbutton id="appmenu_ltnCalendarCurrentViewMenu"
-                       class="subviewbutton subviewbutton-nav"
-                       observes="calendar_mode_calendar"
-                       label="&showCurrentView.label;"
-                       closemenu="none"
-                       oncommand="PanelUI.showSubView('appmenu_ltnCalendarCurrentViewView', this)"/>
-      </vbox>
-    </panelview>
+<!-- View / Calendar -->
+<panelview id="appmenu_calendar-calendar-view"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="appmenu_ltnChangeViewDay"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&lightning.toolbar.day.label;"
+                   type="radio"
+                   name="calendarMenuViews"
+                   command="calendar_day-view_command"/>
+    <toolbarbutton id="appmenu_ltnChangeViewWeek"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&lightning.toolbar.week.label;"
+                   type="radio"
+                   name="calendarMenuViews"
+                   command="calendar_week-view_command"/>
+    <toolbarbutton id="appmenu_ltnChangeViewMultiweek"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&lightning.toolbar.multiweek.label;"
+                   type="radio"
+                   name="calendarMenuViews"
+                   command="calendar_multiweek-view_command"/>
+    <toolbarbutton id="appmenu_ltnChangeViewMonth"
+                   class="subviewbutton subviewbutton-iconic"
+                   label="&lightning.toolbar.month.label;"
+                   type="radio"
+                   name="calendarMenuViews"
+                   command="calendar_month-view_command"/>
+    <toolbarseparator id="appmenu_ltnBeforeCalendarViewSection"/>
+    <toolbarbutton id="appmenu_ltnCalendarPaneMenu"
+                   class="subviewbutton subviewbutton-nav"
+                   label="&lightning.toolbar.calendarmenu.label;"
+                   closemenu="none"
+                   oncommand="PanelUI.showSubView('appmenu_ltnCalendarPaneView', this)"/>
+    <toolbarseparator id="appmenu_ltnBeforeCurrentViewMenu"/>
+    <toolbarbutton id="appmenu_ltnCalendarCurrentViewMenu"
+                   class="subviewbutton subviewbutton-nav"
+                   observes="calendar_mode_calendar"
+                   label="&showCurrentView.label;"
+                   closemenu="none"
+                   oncommand="PanelUI.showSubView('appmenu_ltnCalendarCurrentViewView', this)"/>
+  </vbox>
+</panelview>
 
-    <!-- View / Calendar / Calendar Pane -->
-    <panelview id="appmenu_ltnCalendarPaneView"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="appmenu_ltnViewCalendarPane"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&lightning.toolbar.calendarpane.label;"
-                       command="calendar_toggle_calendarsidebar_command"/>
-        <toolbarseparator id="appmenu_ltnCalendarPaneMenuSeparator"/>
-        <toolbarbutton id="appmenu_ltnTasksViewMinimonth"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.tasks.view.minimonth.label;"
-                       command="calendar_toggle_minimonthpane_command"/>
-        <toolbarbutton id="appmenu_ltnTasksViewCalendarlist"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.tasks.view.calendarlist.label;"
-                       command="calendar_toggle_calendarlist_command"/>
-      </vbox>
-    </panelview>
+<!-- View / Calendar / Calendar Pane -->
+<panelview id="appmenu_ltnCalendarPaneView"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="appmenu_ltnViewCalendarPane"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&lightning.toolbar.calendarpane.label;"
+                   command="calendar_toggle_calendarsidebar_command"/>
+    <toolbarseparator id="appmenu_ltnCalendarPaneMenuSeparator"/>
+    <toolbarbutton id="appmenu_ltnTasksViewMinimonth"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.tasks.view.minimonth.label;"
+                   command="calendar_toggle_minimonthpane_command"/>
+    <toolbarbutton id="appmenu_ltnTasksViewCalendarlist"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.tasks.view.calendarlist.label;"
+                   command="calendar_toggle_calendarlist_command"/>
+  </vbox>
+</panelview>
 
-    <!-- View / Calendar / Current View -->
-    <panelview id="appmenu_ltnCalendarCurrentViewView"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="appmenu_ltnWorkdaysOnlyMenuitem"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.onlyworkday.checkbox.label;"
-                       command="calendar_toggle_workdays_only_command"/>
-        <toolbarbutton id="appmenu_ltnTasksInViewMenuitem"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.displaytodos.checkbox.label;"
-                       command="calendar_toggle_tasks_in_view_command"/>
-        <toolbarbutton id="appmenu_ltnShowCompletedInViewMenuItem"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.completedtasks.checkbox.label;"
-                       command="calendar_toggle_show_completed_in_view_command"/>
-        <toolbarbutton id="appmenu_ltnViewRotated"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.orientation.label;"
-                       command="calendar_toggle_orientation_command"/>
-      </vbox>
-    </panelview>
+<!-- View / Calendar / Current View -->
+<panelview id="appmenu_ltnCalendarCurrentViewView"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="appmenu_ltnWorkdaysOnlyMenuitem"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.onlyworkday.checkbox.label;"
+                   command="calendar_toggle_workdays_only_command"/>
+    <toolbarbutton id="appmenu_ltnTasksInViewMenuitem"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.displaytodos.checkbox.label;"
+                   command="calendar_toggle_tasks_in_view_command"/>
+    <toolbarbutton id="appmenu_ltnShowCompletedInViewMenuItem"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.completedtasks.checkbox.label;"
+                   command="calendar_toggle_show_completed_in_view_command"/>
+    <toolbarbutton id="appmenu_ltnViewRotated"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.orientation.label;"
+                   command="calendar_toggle_orientation_command"/>
+  </vbox>
+</panelview>
 
-    <!-- View / Tasks -->
-    <panelview id="appmenu_calendar-tasks-view"
-               class="PanelUI-subView">
-      <vbox class="panel-subview-body">
-        <toolbarbutton id="appmenu_ltnTasksViewFilterTasks"
-                       class="subviewbutton subviewbutton-iconic"
-                       type="checkbox"
-                       label="&calendar.tasks.view.filtertasks.label;"
-                       command="calendar_toggle_filter_command"/>
-        <toolbarseparator id="appmenu_ltnTasksViewSeparator"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterCurrent"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       value="throughcurrent"
-                       type="radio"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.current.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterToday"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       value="throughtoday"
-                       type="radio"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.today.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterNext7days"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       value="throughsevendays"
-                       type="radio"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.next7days.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterNotstartedtasks"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       value="notstarted"
-                       type="radio"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.notstarted.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterOverdue"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       value="overdue"
-                       type="radio"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.overdue.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterCompleted"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       type="radio"
-                       value="completed"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.completed.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterOpen"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       type="radio"
-                       value="open"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.open.label;"/>
-        <toolbarbutton id="appmenu_ltnTasksViewFilterAll"
-                       class="subviewbutton subviewbutton-iconic"
-                       name="filtergroup"
-                       value="all"
-                       type="radio"
-                       command="calendar_task_filter_command"
-                       label="&calendar.task.filter.all.label;"/>
-      </vbox>
-    </panelview>
-
-  </panelmultiview>
-</overlay>
+<!-- View / Tasks -->
+<panelview id="appmenu_calendar-tasks-view"
+           class="PanelUI-subView">
+  <vbox class="panel-subview-body">
+    <toolbarbutton id="appmenu_ltnTasksViewFilterTasks"
+                   class="subviewbutton subviewbutton-iconic"
+                   type="checkbox"
+                   label="&calendar.tasks.view.filtertasks.label;"
+                   command="calendar_toggle_filter_command"/>
+    <toolbarseparator id="appmenu_ltnTasksViewSeparator"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterCurrent"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   value="throughcurrent"
+                   type="radio"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.current.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterToday"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   value="throughtoday"
+                   type="radio"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.today.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterNext7days"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   value="throughsevendays"
+                   type="radio"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.next7days.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterNotstartedtasks"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   value="notstarted"
+                   type="radio"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.notstarted.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterOverdue"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   value="overdue"
+                   type="radio"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.overdue.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterCompleted"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   type="radio"
+                   value="completed"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.completed.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterOpen"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   type="radio"
+                   value="open"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.open.label;"/>
+    <toolbarbutton id="appmenu_ltnTasksViewFilterAll"
+                   class="subviewbutton subviewbutton-iconic"
+                   name="filtergroup"
+                   value="all"
+                   type="radio"
+                   command="calendar_task_filter_command"
+                   label="&calendar.task.filter.all.label;"/>
+  </vbox>
+</panelview>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -1,23 +1,23 @@
 #filter substitution
 # 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/.
 
 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://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://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/calendar-appmenu-panelviews.inc.xhtml          (content/calendar-appmenu-panelviews.inc.xhtml)
     content/calendar-buttons-mail-toolbar.inc.xhtml        (content/calendar-buttons-mail-toolbar.inc.xhtml)
     content/calendar-commands.inc.xhtml                    (content/calendar-commands.inc.xhtml)
     content/calendar-context-menus-and-tooltips.inc.xhtml  (content/calendar-context-menus-and-tooltips.inc.xhtml)
     content/calendar-keys.inc.xhtml                        (content/calendar-keys.inc.xhtml)
     content/calendar-menu-events-tasks.inc.xhtml           (content/calendar-menu-events-tasks.inc.xhtml)
     content/calendar-status-bar.inc.xhtml                  (content/calendar-status-bar.inc.xhtml)
     content/calendar-tab-panels.inc.xhtml                  (content/calendar-tab-panels.inc.xhtml)
     content/calendar-today-pane.inc.xhtml                  (content/calendar-today-pane.inc.xhtml)
@@ -30,17 +30,16 @@ lightning.jar:
     content/lightning-calendar-properties.js               (content/lightning-calendar-properties.js)
     content/lightning-invitation.xhtml                     (content/lightning-invitation.xhtml)
 *   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.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
--- a/mail/components/customizableui/content/panelUI.inc.xhtml
+++ b/mail/components/customizableui/content/panelUI.inc.xhtml
@@ -1808,10 +1808,13 @@
                        oncommand="safeModeRestart();"/>
         <toolbarseparator/>
         <toolbarbutton id="appmenu_about"
                        class="subviewbutton subviewbutton-iconic"
                        label="&aboutProduct2.label;"
                        oncommand="openAboutDialog();"/>
       </vbox>
     </panelview>
+
+#include ../../../../calendar/lightning/content/calendar-appmenu-panelviews.inc.xhtml
+
   </panelmultiview>
 </panel>