Bug 590744 - Add an edit sub menu to the Firefox menu [r=dao, a=blocking-betaN]
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Wed, 02 Feb 2011 16:17:29 -0500
changeset 62299 75663a5ad23e7a34e514b4f12d7f2c6d21cd0717
parent 62298 18b846f059d1ba76d856dafc5617d0ea24e1b659
child 62300 53d06f07a4d2bacb18a217d243973d97eafdd7ca
push idunknown
push userunknown
push dateunknown
reviewersdao, blocking-betaN
bugs590744
milestone2.0b12pre
Bug 590744 - Add an edit sub menu to the Firefox menu [r=dao, a=blocking-betaN]
browser/base/content/browser-appmenu.inc
browser/base/content/browser.css
browser/themes/gnomestripe/browser/browser.css
browser/themes/winstripe/browser/browser.css
--- a/browser/base/content/browser-appmenu.inc
+++ b/browser/base/content/browser-appmenu.inc
@@ -96,16 +96,55 @@
                        command="cmd_copy"
                        onclick="if (!this.disabled) hidePopup();"
                        tooltiptext="&copyButton.tooltip;"/>
         <toolbarbutton id="appmenu-paste"
                        class="appmenu-edit-button"
                        command="cmd_paste"
                        onclick="if (!this.disabled) hidePopup();"
                        tooltiptext="&pasteButton.tooltip;"/>
+        <spacer flex="1"/>
+        <menu id="appmenu-editmenu">
+          <menupopup id="appmenu-editmenu-menupopup">
+            <menuitem id="appmenu-editmenu-cut"
+                      class="menuitem-iconic"
+                      label="&cutCmd.label;"
+                      key="key_cut"
+                      command="cmd_cut"/>
+            <menuitem id="appmenu-editmenu-copy"
+                      class="menuitem-iconic"
+                      label="&copyCmd.label;"
+                      key="key_copy"
+                      command="cmd_copy"/>
+            <menuitem id="appmenu-editmenu-paste"
+                      class="menuitem-iconic"
+                      label="&pasteCmd.label;"
+                      key="key_paste"
+                      command="cmd_paste"/>
+            <menuseparator/>
+            <menuitem id="appmenu-editmenu-undo"
+                      label="&undoCmd.label;"
+                      key="key_undo"
+                      command="cmd_undo"/>
+            <menuitem id="appmenu-editmenu-redo"
+                      label="&redoCmd.label;"
+                      key="key_redo"
+                      command="cmd_redo"/>
+            <menuseparator/>
+            <menuitem id="appmenu-editmenu-selectAll"
+                      label="&selectAllCmd.label;"
+                      key="key_selectAll"
+                      command="cmd_selectAll"/>
+            <menuseparator/>
+            <menuitem id="appmenu-editmenu-delete"
+                      label="&deleteCmd.label;"
+                      key="key_delete"
+                      command="cmd_delete"/>
+          </menupopup>
+        </menu>
       </hbox>
       <menuitem id="appmenu_find"
                 class="menuitem-tooltip"
                 label="&appMenuFind.label;"
                 command="cmd_find"
                 key="key_find"/>
       <menuseparator class="appmenu-menuseparator"/>
       <menuitem id="appmenu_savePage"
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -161,17 +161,19 @@ splitmenu {
   -moz-image-region: inherit;
 }
 
 .splitmenu-menuitem[iconic="true"] {
   -moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
 }
 
 .splitmenu-menu > .menu-text,
-:-moz-any(.splitmenu-menu, .splitmenu-menuitem) > .menu-accel-container {
+:-moz-any(.splitmenu-menu, .splitmenu-menuitem) > .menu-accel-container,
+#appmenu-editmenu > .menu-text,
+#appmenu-editmenu > .menu-accel-container {
   display: none;
 }
 
 .menuitem-tooltip {
   -moz-binding: url("chrome://browser/content/urlbarBindings.xml#menuitem-tooltip");
 }
 
 .menuitem-iconic-tooltip,
--- a/browser/themes/gnomestripe/browser/browser.css
+++ b/browser/themes/gnomestripe/browser/browser.css
@@ -1734,23 +1734,26 @@ toolbar[mode="text"] toolbarbutton.chevr
   margin-bottom: -2px !important;
 }
 #appmenuSecondaryPane {
   -moz-border-start: 1px solid ThreeDShadow;
 }
 #appmenuSecondaryPane-spacer {
   min-height: 1em;
 }
-#appmenu-cut {
+#appmenu-cut,
+#appmenu-editmenu-cut {
   list-style-image: url("moz-icon://stock/gtk-cut?size=menu");
 }
-#appmenu-copy {
+#appmenu-copy,
+#appmenu-editmenu-copy {
   list-style-image: url("moz-icon://stock/gtk-copy?size=menu");
 }
-#appmenu-paste {
+#appmenu-paste,
+#appmenu-editmenu-paste {
   list-style-image: url("moz-icon://stock/gtk-paste?size=menu");
 }
 #wrapper-appmenu-toolbar-button,
 .appmenu-edit-button[disabled="true"] {
   opacity: .3;
 }
 
 /* Inspector / Highlighter */
--- a/browser/themes/winstripe/browser/browser.css
+++ b/browser/themes/winstripe/browser/browser.css
@@ -337,32 +337,42 @@
     -moz-transition: .2s ease-in;
   }
 }
 
 #appmenuSecondaryPane-spacer {
   min-height: 1em;
 }
 
+#appmenu-editmenu {
+  -moz-box-pack: end;
+}
+
 #appmenu_print,
 #appmenu_print_popup,
 .appmenu-edit-button,
+#appmenu-editmenu-cut,
+#appmenu-editmenu-copy,
+#appmenu-editmenu-paste,
 #appmenu-quit {
   list-style-image: url("appmenu-icons.png");
 }
 
-#appmenu-cut {
+#appmenu-cut,
+#appmenu-editmenu-cut {
   -moz-image-region: rect(0 16px 16px 0);
 }
 
-#appmenu-copy {
+#appmenu-copy,
+#appmenu-editmenu-copy {
   -moz-image-region: rect(0 32px 16px 16px);
 }
 
-#appmenu-paste {
+#appmenu-paste,
+#appmenu-editmenu-paste {
   -moz-image-region: rect(0 48px 16px 32px);
 }
 
 #appmenu_print,
 #appmenu_print_popup {
   -moz-image-region: rect(0 64px 16px 48px);
 }