Bug 602006 - Remove Error Console Menu Items; r=Mossop,dao

This commit is contained in:
Mihai Sucan 2013-05-17 21:29:31 +03:00
Родитель 2e950f3c51
Коммит e723daf31e
5 изменённых файлов: 17 добавлений и 15 удалений

Просмотреть файл

@ -577,7 +577,8 @@
<menuitem id="menu_chromeDebugger"
observes="devtoolsMenuBroadcaster_ChromeDebugger"/>
<menuitem id="menu_browserConsole"
observes="devtoolsMenuBroadcaster_BrowserConsole"/>
observes="devtoolsMenuBroadcaster_BrowserConsole"
accesskey="&browserConsoleCmd.accesskey;"/>
<menuitem id="menu_responsiveUI"
observes="devtoolsMenuBroadcaster_ResponsiveUI"
accesskey="&responsiveDesignTool.accesskey;"/>

Просмотреть файл

@ -96,7 +96,7 @@
<command id="Tools:DevToolbar" oncommand="DeveloperToolbar.toggle();" disabled="true" hidden="true"/>
<command id="Tools:DevToolbarFocus" oncommand="DeveloperToolbar.focusToggle();" disabled="true"/>
<command id="Tools:ChromeDebugger" oncommand="DebuggerUI.toggleChromeDebugger();" disabled="true" hidden="true"/>
<command id="Tools:BrowserConsole" oncommand="HUDConsoleUI.toggleBrowserConsole();" disabled="true" hidden="true"/>
<command id="Tools:BrowserConsole" oncommand="HUDConsoleUI.toggleBrowserConsole();"/>
<command id="Tools:Scratchpad" oncommand="Scratchpad.openScratchpad();" disabled="true" hidden="true"/>
<command id="Tools:ResponsiveUI" oncommand="ResponsiveUI.toggle();" disabled="true" hidden="true"/>
<command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/>
@ -187,6 +187,7 @@
command="Tools:ChromeDebugger"/>
<broadcaster id="devtoolsMenuBroadcaster_BrowserConsole"
label="&browserConsoleCmd.label;"
key="key_browserConsole"
command="Tools:BrowserConsole"/>
<broadcaster id="devtoolsMenuBroadcaster_Scratchpad"
label="&scratchpad.label;"
@ -203,7 +204,6 @@
command="View:PageSource"/>
<broadcaster id="devtoolsMenuBroadcaster_ErrorConsole"
label="&errorConsoleCmd.label;"
key="key_errorConsole"
command="Tools:ErrorConsole"/>
<broadcaster id="devtoolsMenuBroadcaster_GetMoreTools"
label="&getMoreDevtoolsCmd.label;"
@ -261,7 +261,7 @@
<key id="key_openDownloads" key="&downloads.commandkey;" command="Tools:Downloads" modifiers="accel"/>
#endif
<key id="key_openAddons" key="&addons.commandkey;" command="Tools:Addons" modifiers="accel,shift"/>
<key id="key_errorConsole" key="&errorConsoleCmd.commandkey;" command="Tools:ErrorConsole" modifiers="accel,shift"/>
<key id="key_browserConsole" key="&browserConsoleCmd.commandkey;" command="Tools:BrowserConsole" modifiers="accel,shift"/>
<key id="key_devToolbar" keycode="&devToolbar.keycode;" modifiers="shift"
keytext="&devToolbar.keytext;" command="Tools:DevToolbarFocus"/>
<key id="key_responsiveUI" key="&responsiveDesignTool.commandkey;" command="Tools:ResponsiveUI"

Просмотреть файл

@ -1193,17 +1193,8 @@ var gBrowserInit = {
cmd.removeAttribute("hidden");
}
// Enable the Browser Console?
if (chromeEnabled) {
let cmd = document.getElementById("Tools:BrowserConsole");
cmd.removeAttribute("disabled");
cmd.removeAttribute("hidden");
}
// Enable Error Console?
// Temporarily enabled. See bug 798925.
let consoleEnabled = true || gPrefService.getBoolPref("devtools.errorconsole.enabled") ||
chromeEnabled;
let consoleEnabled = gPrefService.getBoolPref("devtools.errorconsole.enabled");
if (consoleEnabled) {
let cmd = document.getElementById("Tools:ErrorConsole");
cmd.removeAttribute("disabled");

Просмотреть файл

@ -9,6 +9,15 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
function test()
{
let oldFunction = HUDConsoleUI.toggleBrowserConsole;
let functionExecuted = false;
HUDConsoleUI.toggleBrowserConsole = () => functionExecuted = true;
EventUtils.synthesizeKey("j", { accelKey: true, shiftKey: true }, content);
ok(functionExecuted,
"toggleBrowserConsole() was executed by the Ctrl-Shift-J key shortcut");
HUDConsoleUI.toggleBrowserConsole = oldFunction;
HUDConsoleUI.toggleBrowserConsole().then(consoleOpened);
}

Просмотреть файл

@ -214,11 +214,12 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY errorConsoleCmd.label "Error Console">
<!ENTITY errorConsoleCmd.accesskey "C">
<!ENTITY errorConsoleCmd.commandkey "j">
<!ENTITY remoteWebConsoleCmd.label "Remote Web Console">
<!ENTITY browserConsoleCmd.label "Browser Console">
<!ENTITY browserConsoleCmd.commandkey "j">
<!ENTITY browserConsoleCmd.accesskey "B">
<!ENTITY inspectContextMenu.label "Inspect Element">
<!ENTITY inspectContextMenu.accesskey "Q">