Bug 1608610 - Inline calendar edit and go menu items. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Tue, 14 Jan 2020 15:53:24 -0500
changeset 38121 822561223c277b32a72187bcc16247c57f8c3cc0
parent 38120 0fe506be8ccaa7e872be8d52c1782465a18af7a6
child 38122 9a50d5b205f2dfc9b7cbce2b9acfc5e29bbbdb79
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersFallen
bugs1608610
Bug 1608610 - Inline calendar edit and go menu items. r=Fallen
calendar/lightning/content/messenger-overlay-sidebar.xhtml
mail/base/content/mainNavigationToolbox.inc.xhtml
--- a/calendar/lightning/content/messenger-overlay-sidebar.xhtml
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xhtml
@@ -5,24 +5,16 @@
    - 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">
 
   <!-- CALENDAR MENUS -->
-  <menupopup id="menu_EditPopup">
-    <menuitem id="ltnCalendarProperties"
-              insertafter="menu_properties"
-              label="&calendar.properties.label;"
-              accesskey="&calendar.properties.accesskey;"
-              command="calendar_edit_calendar_command"/>
-  </menupopup>
-
   <menupopup id="menu_View_Popup">
     <menu id="menu_Toolbars"
           onpopupshowing="onToolbarsPopupShowingForTabType(event);"/>
     <menuseparator id="ltnViewMenuSeparator"
                    insertbefore="viewSortMenuSeparator"/>
     <menu id="ltnTodayPaneMenu"
           insertbefore="viewSortMenuSeparator"
           label="&calendar.context.button.label;"
@@ -213,60 +205,16 @@
                   type="radio"
                   command="calendar_task_filter_command"
                   label="&calendar.task.filter.all.label;"
                   accesskey="&calendar.task.filter.all.accesskey;"/>
       </menupopup>
     </menu>
   </menupopup>
 
-  <menupopup id="menu_GoPopup">
-    <menuitem id="ltnGoToToday"
-              insertafter="goNextSeparator"
-              label="&goTodayCmd.label;"
-              accesskey="&goTodayCmd.accesskey;"
-              command="calendar_go_to_today_command"
-              key="calendar-go-to-today-key"/>
-  </menupopup>
-
-  <menupopup id="menu_GoNextPopup">
-    <menuseparator id="ltnGoNextSeparator"/>
-    <!-- Label is set up automatically using the view id. When writing a
-         view extension, overlay this menuitem and add a label-<myviewtype>
-         attribute with the correct label -->
-    <menuitem id="calendar-go-menu-next"
-              label=""
-              label-day="&lightning.toolbar.day.label;"
-              label-week="&lightning.toolbar.week.label;"
-              label-multiweek="&lightning.toolbar.week.label;"
-              label-month="&lightning.toolbar.month.label;"
-              accesskey-day="&lightning.toolbar.day.accesskey;"
-              accesskey-week="&lightning.toolbar.week.accesskey;"
-              accesskey-multiweek="&lightning.toolbar.week.accesskey;"
-              accesskey-month="&lightning.toolbar.month.accesskey;"
-              command="calendar_view_next_command"/>
-  </menupopup>
-
-  <menupopup id="menu_GoPreviousPopup">
-    <menuseparator id="ltnGoPreviousSeparator"/>
-    <!-- Label is set up automatically using the view id. When writing a
-         view extension, overlay this menuitem and add a label-<myviewtype>
-         attribute with the correct label -->
-    <menuitem id="calendar-go-menu-previous"
-              label=""
-              label-day="&lightning.toolbar.day.label;"
-              label-week="&lightning.toolbar.week.label;"
-              label-multiweek="&lightning.toolbar.week.label;"
-              label-month="&lightning.toolbar.month.label;"
-              accesskey-day="&lightning.toolbar.day.accesskey;"
-              accesskey-week="&lightning.toolbar.week.accesskey;"
-              accesskey-multiweek="&lightning.toolbar.week.accesskey;"
-              accesskey-month="&lightning.toolbar.month.accesskey;"
-              command="calendar_view_prev_command"/>
-  </menupopup>
 
   <menupopup id="mailContext">
     <menu id="mailContext-calendar-convert-menu"
           insertafter="mailContext-moveToFolderAgain"
           label="&calendar.context.convertmenu.label;"
           accesskey="&calendar.context.convertmenu.accesskey.mail;">
       <menupopup id="mailContext-calendar-convert-menupopup">
         <menuitem id="mailContext-calendar-convert-event-menuitem"
--- a/mail/base/content/mainNavigationToolbox.inc.xhtml
+++ b/mail/base/content/mainNavigationToolbox.inc.xhtml
@@ -341,16 +341,20 @@
                   type="checkbox"
                   label="&menuFavoriteFolder.label;"
                   accesskey="&menuFavoriteFolder.accesskey;"
                   checked="false"
                   oncommand="ToggleFavoriteFolderFlag();"/>
         <menuitem id="menu_properties" label="&folderPropsCmd2.label;"
                   accesskey="&folderPropsCmd.accesskey;"
                   command="cmd_properties"/>
+        <menuitem id="calendar-properties-menuitem"
+                  label="&calendar.properties.label;"
+                  accesskey="&calendar.properties.accesskey;"
+                  command="calendar_edit_calendar_command"/>
 #ifdef XP_UNIX
 #ifndef XP_MACOSX
         <menuitem id="menu_accountmgr"
                   label="&accountManagerCmd2.label;"
                   accesskey="&accountManagerCmdUnix2.accesskey;"
                   oncommand="MsgAccountManager(null);"/>
         <menuitem id="menu_preferences"
                   oncommand="openOptionsDialog()"
@@ -645,16 +649,31 @@
                         accesskey="&nextStarredMsgCmd.accesskey;"
                         command="cmd_nextFlaggedMsg"/>
               <menuseparator id="goNextAfterFlaggedSeparator"/>
               <menuitem id="menu_nextUnreadThread"
                         label="&nextUnreadThread.label;"
                         accesskey="&nextUnreadThread.accesskey;"
                         command="cmd_nextUnreadThread"
                         key="key_nextUnreadThread"/>
+              <menuseparator id="goNextAfterUnreadThreadSeparator"/>
+              <!-- Label is set up automatically using the view id. When writing
+                   a view extension, add a `label-<myviewtype>` attribute with
+                   the correct label. -->
+              <menuitem id="calendar-go-menu-next"
+                        label=""
+                        label-day="&lightning.toolbar.day.label;"
+                        label-week="&lightning.toolbar.week.label;"
+                        label-multiweek="&lightning.toolbar.week.label;"
+                        label-month="&lightning.toolbar.month.label;"
+                        accesskey-day="&lightning.toolbar.day.accesskey;"
+                        accesskey-week="&lightning.toolbar.week.accesskey;"
+                        accesskey-multiweek="&lightning.toolbar.week.accesskey;"
+                        accesskey-month="&lightning.toolbar.month.accesskey;"
+                        command="calendar_view_next_command"/>
             </menupopup>
           </menu>
           <menu id="goPreviousMenu" label="&prevMenu.label;" accesskey="&prevMenu.accesskey;">
             <menupopup id="menu_GoPreviousPopup">
               <menuitem id="menu_prevMsg"
                         label="&prevMsgCmd.label;"
                         accesskey="&prevMsgCmd.accesskey;"
                         command="cmd_previousMsg"
@@ -663,27 +682,47 @@
                         label="&prevUnreadMsgCmd.label;"
                         accesskey="&prevUnreadMsgCmd.accesskey;"
                         command="cmd_previousUnreadMsg"
                         key="key_previousUnreadMsg"/>
               <menuitem id="menu_prevFlaggedMsg"
                         label="&prevStarredMsgCmd.label;"
                         accesskey="&prevStarredMsgCmd.accesskey;"
                         command="cmd_previousFlaggedMsg"/>
+              <menuseparator id="goPreviousAfterFlaggedSeparator"/>
+              <!-- Label is set up automatically using the view id. When writing
+                   a view extension, add a `label-<myviewtype>` attribute with
+                   the correct label. -->
+              <menuitem id="calendar-go-menu-previous"
+                        label=""
+                        label-day="&lightning.toolbar.day.label;"
+                        label-week="&lightning.toolbar.week.label;"
+                        label-multiweek="&lightning.toolbar.week.label;"
+                        label-month="&lightning.toolbar.month.label;"
+                        accesskey-day="&lightning.toolbar.day.accesskey;"
+                        accesskey-week="&lightning.toolbar.week.accesskey;"
+                        accesskey-multiweek="&lightning.toolbar.week.accesskey;"
+                        accesskey-month="&lightning.toolbar.month.accesskey;"
+                        command="calendar_view_prev_command"/>
             </menupopup>
           </menu>
           <menuitem id="menu_goForward" label="&goForwardCmd.label;"
                     accesskey="&goForwardCmd.accesskey;" command="cmd_goForward"
                     key="key_goForward"
                     class="menuitem-iconic"/>
           <menuitem id="menu_goBack" label="&goBackCmd.label;"
                     accesskey="&goBackCmd.accesskey;" command="cmd_goBack"
                     key="key_goBack"
                     class="menuitem-iconic"/>
           <menuseparator id="goNextSeparator"/>
+          <menuitem id="calendar-go-to-today-menuitem"
+                    label="&goTodayCmd.label;"
+                    accesskey="&goTodayCmd.accesskey;"
+                    command="calendar_go_to_today_command"
+                    key="calendar-go-to-today-key"/>
           <menuitem id="menu_goChat" label="&goChatCmd.label;"
                     accesskey="&goChatCmd.accesskey;"
                     command="cmd_chat"
                     key="key_goChat"/>
           <menuseparator id="goChatSeparator"/>
           <menu id="goFolderMenu"
                 label="&folderMenu.label;"
                 accesskey="&folderMenu.accesskey;"