Bug 643761 - Move snapToGrid, pageProperties and publishSettings from editorOverlay to editor r=neil/bienvenu
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sun, 03 Apr 2011 22:33:13 +0100
changeset 7496 0b6d0aee59ebb46160591c192398eb548b1bd5a3
parent 7495 9d9a25c4364d7805c6b132320f8965ea06bf4f9b
child 7497 bc3d86c463784210ccd809a144532417cc86caee
push idunknown
push userunknown
push dateunknown
reviewersneil, bienvenu
bugs643761
Bug 643761 - Move snapToGrid, pageProperties and publishSettings from editorOverlay to editor r=neil/bienvenu
editor/ui/composer/content/composerOverlay.xul
editor/ui/composer/content/editor.xul
editor/ui/composer/content/editorOverlay.xul
editor/ui/locales/en-US/chrome/composer/editor.dtd
editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd
--- a/editor/ui/composer/content/composerOverlay.xul
+++ b/editor/ui/composer/content/composerOverlay.xul
@@ -35,14 +35,9 @@
    - the provisions above, a recipient may use your version of this file under
    - the terms of any one of the MPL, the GPL or the LGPL.
    -
    - ***** END LICENSE BLOCK ***** -->
 
 <overlay id="composerOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <!-- Items in the Edit menu used only by Composer app -->
-  <menupopup id="edEditMenuPopup">
-    <menuitem id="menu_publishSettings" insertafter="menu_prefsSep"  observes="cmd_publishSettings"/>
-  </menupopup>
-
 </overlay>    
--- a/editor/ui/composer/content/editor.xul
+++ b/editor/ui/composer/content/editor.xul
@@ -94,20 +94,24 @@
 
   <popupset id="editorContentContextSet"/>
   <menupopup id="sidebarPopup"/>
   <menupopup id="popupNotificationMenu"/>
 
   <commandset id="editorCommands">
     <commandset id="commonEditorMenuItems"/>
     <commandset id="composerMenuItems"/>
-    <commandset id="composerModeMenuItems"
+    <commandset id="composerOnlyMenuItems"
                 commandupdater="true"
                 events="create, mode_switch"
                 oncommandupdate="goUpdateComposerMenuItems(this);">
+      <!-- format menu -->
+      <command id="cmd_pageProperties"
+               oncommand="goDoCommand('cmd_pageProperties');"/>
+      <!-- toolbars -->
       <command id="cmd_NormalMode"
                oncommand="goDoCommand('cmd_NormalMode');"/>
       <command id="cmd_AllTagsMode"
                oncommand="goDoCommand('cmd_AllTagsMode');"/>
       <command id="cmd_HTMLSourceMode"
                oncommand="goDoCommand('cmd_HTMLSourceMode');"/>
       <command id="cmd_PreviewMode"
                oncommand="goDoCommand('cmd_PreviewMode');"/>
@@ -193,21 +197,30 @@
       <menu id = "composerCharsetMenu" />
     </menupopup>
     </menu>
  
     <menu id="insertMenu"/>
 
     <menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatMenu.accesskey;">
       <menupopup id="formatMenuPopup">
-        <menuitem id="snapToGrid"/>
+        <menuitem id="snapToGrid"
+                  label="&grid.label;"
+                  accesskey="&grid.accesskey;"
+                  oncommand="goDoCommand('cmd_grid')"
+                  observes="cmd_renderedHTMLEnabler"/>
         <menuseparator/>
         <menuitem id="objectProperties"/>
         <menuitem id="colorsAndBackground"/>
-        <menuitem id="pageProperties"/>
+        <!-- Don't use 'observes', must call command correctly -->
+        <menuitem id="pageProperties"
+                  label="&pageProperties.label;"
+                  accesskey="&pageProperties.accesskey;"
+                  oncommand="goDoCommand('cmd_pageProperties')"
+                  observes="cmd_renderedHTMLEnabler"/>
       </menupopup>
     </menu>
 
     <menu id="tableMenu"/>
 
     <!-- tasks menu filled from tasksOverlay -->
     <menu id="tasksMenu">
       <menupopup id="taskPopup">
--- a/editor/ui/composer/content/editorOverlay.xul
+++ b/editor/ui/composer/content/editorOverlay.xul
@@ -124,17 +124,16 @@
   </commandset>
 
   <commandset id="composerMenuItems"
           commandupdater="true"
           events="create, mode_switch"
           oncommandupdate="goUpdateComposerMenuItems(this)">
     <!-- format menu -->
     <command id="cmd_listProperties"  oncommand="goDoCommand('cmd_listProperties')"/>
-    <command id="cmd_pageProperties"  oncommand="goDoCommand('cmd_pageProperties')"/>
     <command id="cmd_colorProperties" oncommand="goDoCommand('cmd_colorProperties')"/>
 
     <command id="cmd_link"             oncommand="goDoCommand('cmd_link')"/>
     <command id="cmd_anchor"           oncommand="goDoCommand('cmd_anchor')"/>
     <command id="cmd_image"            oncommand="goDoCommand('cmd_image')"/>
     <command id="cmd_hline"            oncommand="goDoCommand('cmd_hline')"/>
     <command id="cmd_table"            oncommand="goDoCommand('cmd_table')"/>
     <command id="cmd_form"             oncommand="goDoCommand('cmd_form')"/>
@@ -192,17 +191,18 @@
     <command id="cmd_preferences"   oncommand="goDoCommand('cmd_preferences')"/>
     <command id="cmd_find"          oncommand="goDoCommand('cmd_find')"/>
     <command id="cmd_findNext"      oncommand="goDoCommand('cmd_findNext')"     label="&findAgainCmd.label;"/>
     <command id="cmd_findPrev"      oncommand="goDoCommand('cmd_findPrev')"     label="&findPrevCmd.label;"/>
     <command id="cmd_spelling"      oncommand="goDoCommand('cmd_spelling')"/>
     <command id="cmd_validate"      label="&validateCmd.label;" accesskey="&validateCmd.accesskey;" oncommand="goDoCommand('cmd_validate')"/>
     <command id="cmd_checkLinks"    oncommand="goDoCommand('cmd_checkLinks')"/>
     <command id="cmd_pasteQuote"    oncommand="goDoCommand('cmd_pasteQuote')" label="&pasteAsQuotationCmd.label;"/>
-    <command id="cmd_publishSettings" label="&publishSettings.label;" accesskey="&publishSettings.accesskey;" oncommand="goDoCommand('cmd_publishSettings')"/>
+    <command id="cmd_publishSettings"
+             oncommand="goDoCommand('cmd_publishSettings');"/>
   </commandset>
 
   <!-- style related commands that update on creation, and on selection change -->
   <commandset id="composerStyleMenuItems"
           commandupdater="true"
           events="create, style, mode_switch"
           oncommandupdate="goUpdateComposerMenuItems(this)">
     <command id="cmd_bold"          state="false"     oncommand="doStyleUICommand('cmd_bold')"/>
@@ -427,18 +427,21 @@
                 observes="cmd_spelling"
                 disabled="true"/>
       <menuitem id="menu_inlinespellcheck"
                 type="checkbox"
                 label="&enableInlineSpellChecker.label;"
                 accesskey="&enableInlineSpellChecker.accesskey;"
                 oncommand="InlineSpellCheckerUI.enabled = !InlineSpellCheckerUI.enabled"/>
       <menuseparator id="menu_prefsSep"/>
+      <menuitem id="menu_publishSettings"
+                label="&publishSettings.label;"
+                accesskey="&publishSettings.accesskey;"
+                command="cmd_publishSettings"/>
       <menuitem id="menu_preferences"     observes="cmd_preferences"/>
-      <!-- Note: other Edit items (menu_validate, menu_publishSettings) are inserted from composerOverlay.xul -->
     </menupopup>
   </menu>
 
   <menupopup id = "composerCharsetMenuPopup"  onpopupshowing="updateCharsetPopupMenu(this)" />
 
   <!-- Insert menu -->
   <menu id="insertMenu"
         label="&insertMenu.label;"
@@ -897,28 +900,20 @@
                   observes="cmd_renderedHTMLEnabler"/>
       </menupopup>
     </menu>
     <menuseparator id="tableSep" position="16"/>
     <!-- Merge Table Menu and separator in Messenger Composer here -->
     <!-- Merge property items here -->
   </menupopup>
 
-  <menuitem id="snapToGrid" label="&grid.label;" accesskey="&grid.accesskey;"
-            oncommand="goDoCommand('cmd_grid')"   observes="cmd_renderedHTMLEnabler"/>
-
-  <!-- Next 3 are items to append at the bottom of the formatMenuPopup -->
+  <!-- Next 2 are items to append at the bottom of the formatMenuPopup -->
   <!-- label and accesskey filled in during menu creation -->
   <menuitem id="objectProperties"   oncommand="goDoCommand('cmd_objectProperties')"   observes="cmd_renderedHTMLEnabler"/>
   <!-- Don't use 'observes', must call command correctly -->
-  <menuitem id="pageProperties"
-            label="&pageProperties.label;"
-            accesskey="&pageProperties.accesskey;"
-            oncommand="goDoCommand('cmd_pageProperties')"
-            observes="cmd_renderedHTMLEnabler"/>
   <menuitem id="colorsAndBackground"
             label="&colorsAndBackground.label;"
             accesskey="&colorsAndBackground.accesskey;"
             oncommand="goDoCommand('cmd_colorProperties')"
             observes="cmd_renderedHTMLEnabler"/>
 
   <menu id="tableMenu" label="&tableMenu.label;" accesskey="&tableMenu.accesskey;">
     <menupopup id="tableMenuPopup" onpopupshowing="EditorInitTableMenu()">
--- a/editor/ui/locales/en-US/chrome/composer/editor.dtd
+++ b/editor/ui/locales/en-US/chrome/composer/editor.dtd
@@ -53,16 +53,20 @@
 <!ENTITY formattingToolbarCmd.label "Format Toolbar">
 <!ENTITY formattingToolbarCmd.accesskey "F">
 <!ENTITY editmodeToolbarCmd.label "Edit Mode Toolbar">
 <!ENTITY editmodeToolbarCmd.accesskey "E">
 
 <!-- Format menu items -->
 <!ENTITY formatMenu.label "Format">
 <!ENTITY formatMenu.accesskey "o">
+<!ENTITY grid.label "Positioning grid">
+<!ENTITY grid.accesskey "t">
+<!ENTITY pageProperties.label "Page Title and Properties…">
+<!ENTITY pageProperties.accesskey "g">
 
 <!-- Display Mode toolbar and View menu items -->
 <!ENTITY NormalModeTab.label "Normal">
 <!ENTITY NormalMode.label "Normal Edit Mode">
 <!ENTITY NormalMode.accesskey "N">
 <!ENTITY NormalMode.tooltip "Show table borders and named anchors">
 <!ENTITY AllTagsModeTab.label "HTML Tags">
 <!ENTITY AllTagsMode.label "HTML Tags">
--- a/editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd
+++ b/editor/ui/locales/en-US/chrome/composer/editorOverlay.dtd
@@ -327,21 +327,16 @@
 
 <!ENTITY increaseIndent.label "Increase Indent">
 <!ENTITY increaseIndent.accesskey "I">
 <!ENTITY increaseIndent.key "]">
 <!ENTITY decreaseIndent.label "Decrease Indent">
 <!ENTITY decreaseIndent.accesskey "D">
 <!ENTITY decreaseIndent.key "[">
 
-<!ENTITY grid.label "Positioning grid">
-<!ENTITY grid.accesskey "t">
-
-<!ENTITY pageProperties.label "Page Title and Properties…">
-<!ENTITY pageProperties.accesskey "g">
 <!ENTITY colorsAndBackground.label "Page Colors and Background…">
 <!ENTITY colorsAndBackground.accesskey "u">
 
 <!-- Table Menu -->
 <!ENTITY tableMenu.label "Table">
 <!ENTITY tableMenu.accesskey "b">
 
 <!-- Select Submenu -->