Bug 595540 - Show Error Console in Firefox button menu when Error Console is enabled. r=dao a=a
authorWes Kocher <kwierso@gmail.com>
Thu, 20 Jan 2011 10:03:30 +0100
changeset 60930 d66366f42efaa1672f905bee562c6a2b62164e57
parent 60929 9136f40c8f05236e6efa17fbf1cc3b2089ae1e75
child 60931 b78620dc52398b7fd9d03e5f374606d82db99405
push idunknown
push userunknown
push dateunknown
reviewersdao, a
bugs595540
milestone2.0b10pre
first release with
nightly win64
d66366f42efa / 4.0b10pre / 20110120030202 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Bug 595540 - Show Error Console in Firefox button menu when Error Console is enabled. r=dao a=a
browser/base/content/browser-appmenu.inc
browser/base/content/browser.js
--- a/browser/base/content/browser-appmenu.inc
+++ b/browser/base/content/browser-appmenu.inc
@@ -145,16 +145,21 @@
                     label="&inspectMenu.label;"
                     type="checkbox"
                     command="Tools:Inspect"
                     key="key_inspect"/>
           <menuitem id="appmenu_pageSource"
                     label="&viewPageSourceCmd.label;"
                     command="View:PageSource"
                     key="key_viewSource"/>
+          <menuitem id="appmenu_errorConsole"
+                    hidden="true"
+                    label="&errorConsoleCmd.label;"
+                    key="key_errorConsole"
+                    oncommand="toJavaScriptConsole();"/>
           <menuseparator/>
 #define ID_PREFIX appmenu_developer_
 #define OMIT_ACCESSKEYS
 #include browser-charsetmenu.inc
 #undef ID_PREFIX
 #undef OMIT_ACCESSKEYS
           <menuitem label="&goOfflineCmd.label;"
                     type="checkbox"
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1630,16 +1630,19 @@ function delayedStartup(isLoadingBlank, 
   }
 
   // Enable Error Console?
   // XXX Temporarily always-enabled, see bug 601201
   let consoleEnabled = true || gPrefService.getBoolPref("devtools.errorconsole.enabled");
   if (consoleEnabled) {
     document.getElementById("javascriptConsole").hidden = false;
     document.getElementById("key_errorConsole").removeAttribute("disabled");
+#ifdef MENUBAR_CAN_AUTOHIDE
+    document.getElementById("appmenu_errorConsole").hidden = false;
+#endif
   }
 
 #ifdef MENUBAR_CAN_AUTOHIDE
   // If the user (or the locale) hasn't enabled the top-level "Character
   // Encoding" menu via the "browser.menu.showCharacterEncoding" preference,
   // hide it.
   if ("true" != gPrefService.getComplexValue("browser.menu.showCharacterEncoding",
                                              Ci.nsIPrefLocalizedString).data)