Bug 616836 - Remove remaining access keys from the app menu. r+a=gavin
authorDão Gottwald <dao@mozilla.com>
Wed, 08 Dec 2010 11:03:10 +0100
changeset 58883 efcc5c73f0f4d524f195c8269e3c5b3b5d72dffe
parent 58882 c018e8495d32efa117e4a8e390aa963eb9aa475a
child 58884 f25461268434fbcfcbc7f2e72a3851a253dee458
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
bugs616836
milestone2.0b8pre
Bug 616836 - Remove remaining access keys from the app menu. r+a=gavin
browser/base/content/browser-appmenu.inc
browser/base/content/browser-charsetmenu.inc
--- a/browser/base/content/browser-appmenu.inc
+++ b/browser/base/content/browser-appmenu.inc
@@ -148,29 +148,33 @@
                     key="key_inspect"/>
           <menuseparator/>
           <menuitem id="appmenu_pageSource"
                     label="&viewPageSourceCmd.label;"
                     command="View:PageSource"
                     key="key_viewSource"/>
           <menuseparator/>
 #define ID_PREFIX appmenu_developer_
+#define OMIT_ACCESSKEYS
 #include browser-charsetmenu.inc
 #undef ID_PREFIX
+#undef OMIT_ACCESSKEYS
           <menuseparator/>
           <menuitem label="&goOfflineCmd.label;"
                     type="checkbox"
                     observes="workOfflineMenuitemState"
                     oncommand="BrowserOffline.toggleOfflineStatus();"/>
         </menupopup>
       </menu>
       <menuseparator class="appmenu-menuseparator"/>
 #define ID_PREFIX appmenu_
+#define OMIT_ACCESSKEYS
 #include browser-charsetmenu.inc
 #undef ID_PREFIX
+#undef OMIT_ACCESSKEYS
       <menuitem id="appmenu_fullScreen"
                 class="menuitem-tooltip"
                 label="&fullScreenCmd.label;"
                 type="checkbox"
                 observes="View:FullScreen"
                 key="key_fullScreen"/>
       <menuitem id="appmenu-quit"
                 class="menuitem-iconic"
@@ -346,17 +350,16 @@
                       oncommand="openTroubleshootingPage()"
                       onclick="checkForMiddleClick(this,event);"/>
             <menuitem id="appmenu_feedbackPage"
                       label="&helpFeedbackPage.label;"
                       oncommand="openFeedbackPage()"
                       onclick="checkForMiddleClick(this, event);"/>
             <menuseparator/>
             <menuitem id="appmenu_safeMode"
-                      accesskey="&appMenuSafeMode.accesskey;"
                       label="&appMenuSafeMode.label;"
                       oncommand="safeModeRestart();"/>
             <menuseparator/>
             <menuitem id="appmenu_about"
                       label="&aboutProduct.label;"
                       oncommand="openAboutDialog();"/>
           </menupopup>
       </splitmenu>
--- a/browser/base/content/browser-charsetmenu.inc
+++ b/browser/base/content/browser-charsetmenu.inc
@@ -33,17 +33,19 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 #filter substitution
 
 #expand <menu id="__ID_PREFIX__charsetMenu"
     label="&charsetMenu.label;"
+#ifndef OMIT_ACCESSKEYS
     accesskey="&charsetMenu.accesskey;"
+#endif
     datasources="rdf:charset-menu"
     ref="NC:BrowserCharsetMenuRoot"
     oncommand="MultiplexHandler(event)"
     onpopupshowing="CreateMenu('browser');UpdateMenus(event)"
     onpopupshown="CreateMenu('more-menu');"
     observes="isImage">
   <template>
     <rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
@@ -54,100 +56,137 @@
     <rule>
       <menupopup>
       <menuitem type="radio" name="charsetGroup" checked="rdf:http://home.netscape.com/NC-rdf#Checked" uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
       </menupopup>
     </rule>
   </template>
 
   <menupopup>
-  <menu label="&charsetMenuAutodet.label;" accesskey="&charsetMenuAutodet.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserAutodetMenuRoot">
+  <menu label="&charsetMenuAutodet.label;"
+#ifndef OMIT_ACCESSKEYS
+        accesskey="&charsetMenuAutodet.accesskey;"
+#endif
+        datasources="rdf:charset-menu" ref="NC:BrowserAutodetMenuRoot">
     <template>
       <rule rdf:type="http://home.netscape.com/NC-rdf#CharsetDetector">
         <menupopup>
         <menuitem type="radio" name="detectorGroup" checked="rdf:http://home.netscape.com/NC-rdf#Checked" uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
         </menupopup>
       </rule>
     </template>
     <menupopup>
     </menupopup>
   </menu>
-  <menu label="&charsetMenuMore.label;" accesskey="&charsetMenuMore.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMoreCharsetMenuRoot">
+  <menu label="&charsetMenuMore.label;"
+#ifndef OMIT_ACCESSKEYS
+        accesskey="&charsetMenuMore.accesskey;"
+#endif
+        datasources="rdf:charset-menu" ref="NC:BrowserMoreCharsetMenuRoot">
     <template>
       <rule>
         <menupopup>
         <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
         </menupopup>
       </rule>
     </template>
     <menupopup>
-      <menu label="&charsetMenuMore1.label;" accesskey="&charsetMenuMore1.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMore1CharsetMenuRoot">
+      <menu label="&charsetMenuMore1.label;"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetMenuMore1.accesskey;"
+#endif
+            datasources="rdf:charset-menu" ref="NC:BrowserMore1CharsetMenuRoot">
         <template>
           <rule>
             <menupopup>
             <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
             </menupopup>
           </rule>
         </template>
         <menupopup>
         </menupopup>
       </menu>
-      <menu label="&charsetMenuMore2.label;" accesskey="&charsetMenuMore2.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMore2CharsetMenuRoot">
+      <menu label="&charsetMenuMore2.label;"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetMenuMore2.accesskey;"
+#endif
+            datasources="rdf:charset-menu" ref="NC:BrowserMore2CharsetMenuRoot">
         <template>
           <rule>
             <menupopup>
             <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
             </menupopup>
           </rule>
         </template>
         <menupopup>
         </menupopup>
       </menu>
-      <menu label="&charsetMenuMore3.label;" accesskey="&charsetMenuMore3.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMore3CharsetMenuRoot">
+      <menu label="&charsetMenuMore3.label;"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetMenuMore3.accesskey;"
+#endif
+            datasources="rdf:charset-menu" ref="NC:BrowserMore3CharsetMenuRoot">
         <template>
           <rule>
             <menupopup>
             <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
             </menupopup>
           </rule>
         </template>
         <menupopup>
         </menupopup>
       </menu>
-      <menu label="&charsetMenuMore4.label;" accesskey="&charsetMenuMore4.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMore4CharsetMenuRoot">
+      <menu label="&charsetMenuMore4.label;"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetMenuMore4.accesskey;"
+#endif
+            datasources="rdf:charset-menu" ref="NC:BrowserMore4CharsetMenuRoot">
         <template>
           <rule>
             <menupopup>
             <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
             </menupopup>
           </rule>
         </template>
         <menupopup>
         </menupopup>
       </menu>
-      <menu label="&charsetMenuMore5.label;" accesskey="&charsetMenuMore5.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserMore5CharsetMenuRoot">
+      <menu label="&charsetMenuMore5.label;"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetMenuMore5.accesskey;"
+#endif
+            datasources="rdf:charset-menu" ref="NC:BrowserMore5CharsetMenuRoot">
         <template>
           <rule>
             <menupopup>
             <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
             </menupopup>
           </rule>
         </template>
         <menupopup>
         </menupopup>
       </menu>
-      <menu label="&charsetMenuUnicode.label;" accesskey="&charsetMenuUnicode.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserUnicodeCharsetMenuRoot">
+      <menu label="&charsetMenuUnicode.label;"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetMenuUnicode.accesskey;"
+#endif
+            datasources="rdf:charset-menu" ref="NC:BrowserUnicodeCharsetMenuRoot">
         <template>
           <rule>
             <menupopup>
             <menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/>
             </menupopup>
           </rule>
         </template>
         <menupopup>
         </menupopup>
       </menu>
       <menuseparator />
     </menupopup>
   </menu>
-  <menuitem name="charsetCustomize" accesskey="&charsetCustomize.accesskey;" label="&charsetCustomize.label;" oncommand="window.openDialog('chrome://global/content/customizeCharset.xul','PrefWindow', 'chrome,modal=yes,resizable=yes', 'browser')"/>
+  <menuitem name="charsetCustomize"
+#ifndef OMIT_ACCESSKEYS
+            accesskey="&charsetCustomize.accesskey;"
+#endif
+            label="&charsetCustomize.label;"
+            oncommand="window.openDialog('chrome://global/content/customizeCharset.xul', 'PrefWindow', 'chrome,modal=yes,resizable=yes', 'browser');"/>
   </menupopup>
 </menu>