зеркало из https://github.com/mozilla/gecko-dev.git
Bug 769186 - [devtb] Decide on a key sequence for the developer toolbar; r=dcamp
This commit is contained in:
Родитель
b7cd7aeba6
Коммит
2e561a4974
|
@ -519,6 +519,7 @@
|
||||||
autocheck="false"
|
autocheck="false"
|
||||||
hidden="true"
|
hidden="true"
|
||||||
label="&devToolbarMenu.label;"
|
label="&devToolbarMenu.label;"
|
||||||
|
accesskey="&devToolbarMenu.accesskey;"
|
||||||
key="key_devToolbar"
|
key="key_devToolbar"
|
||||||
command="Tools:DevToolbar"/>
|
command="Tools:DevToolbar"/>
|
||||||
<menuitem id="webConsole"
|
<menuitem id="webConsole"
|
||||||
|
|
|
@ -89,6 +89,7 @@
|
||||||
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
|
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
|
||||||
<command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
|
<command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
|
||||||
<command id="Tools:DevToolbar" oncommand="DeveloperToolbar.toggle();" disabled="true"/>
|
<command id="Tools:DevToolbar" oncommand="DeveloperToolbar.toggle();" disabled="true"/>
|
||||||
|
<command id="Tools:DevToolbarFocus" oncommand="DeveloperToolbar.focus();" disabled="true"/>
|
||||||
<command id="Tools:WebConsole" oncommand="HUDConsoleUI.toggleHUD();"/>
|
<command id="Tools:WebConsole" oncommand="HUDConsoleUI.toggleHUD();"/>
|
||||||
<command id="Tools:Inspect" oncommand="InspectorUI.toggleInspectorUI();" disabled="true"/>
|
<command id="Tools:Inspect" oncommand="InspectorUI.toggleInspectorUI();" disabled="true"/>
|
||||||
<command id="Tools:Debugger" oncommand="DebuggerUI.toggleDebugger();" disabled="true"/>
|
<command id="Tools:Debugger" oncommand="DebuggerUI.toggleDebugger();" disabled="true"/>
|
||||||
|
@ -225,6 +226,8 @@
|
||||||
#endif
|
#endif
|
||||||
<key id="key_openAddons" key="&addons.commandkey;" command="Tools:Addons" modifiers="accel,shift"/>
|
<key id="key_openAddons" key="&addons.commandkey;" command="Tools:Addons" modifiers="accel,shift"/>
|
||||||
<key id="key_errorConsole" key="&errorConsoleCmd.commandkey;" oncommand="toJavaScriptConsole();" modifiers="accel,shift" disabled="true"/>
|
<key id="key_errorConsole" key="&errorConsoleCmd.commandkey;" oncommand="toJavaScriptConsole();" modifiers="accel,shift" disabled="true"/>
|
||||||
|
<key id="key_devToolbar" keycode="&devToolbar.keycode;" modifiers="shift"
|
||||||
|
keytext="&devToolbar.keytext;" command="Tools:DevToolbarFocus"/>
|
||||||
<key id="key_webConsole" key="&webConsoleCmd.commandkey;" oncommand="HUDConsoleUI.toggleHUD();"
|
<key id="key_webConsole" key="&webConsoleCmd.commandkey;" oncommand="HUDConsoleUI.toggleHUD();"
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
modifiers="accel,alt"
|
modifiers="accel,alt"
|
||||||
|
|
|
@ -1394,6 +1394,7 @@ var gBrowserInit = {
|
||||||
if (devToolbarEnabled) {
|
if (devToolbarEnabled) {
|
||||||
document.getElementById("menu_devToolbar").hidden = false;
|
document.getElementById("menu_devToolbar").hidden = false;
|
||||||
document.getElementById("Tools:DevToolbar").removeAttribute("disabled");
|
document.getElementById("Tools:DevToolbar").removeAttribute("disabled");
|
||||||
|
document.getElementById("Tools:DevToolbarFocus").removeAttribute("disabled");
|
||||||
#ifdef MENUBAR_CAN_AUTOHIDE
|
#ifdef MENUBAR_CAN_AUTOHIDE
|
||||||
document.getElementById("appmenu_devToolbar").hidden = false;
|
document.getElementById("appmenu_devToolbar").hidden = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -110,6 +110,19 @@ DeveloperToolbar.prototype.toggle = function DT_toggle()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called from browser.xul in response to menu-click or keyboard shortcut to
|
||||||
|
* toggle the toolbar
|
||||||
|
*/
|
||||||
|
DeveloperToolbar.prototype.focus = function DT_focus()
|
||||||
|
{
|
||||||
|
if (this.visible) {
|
||||||
|
this._input.focus();
|
||||||
|
} else {
|
||||||
|
this.show(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Even if the user has not clicked on 'Got it' in the intro, we only show it
|
* Even if the user has not clicked on 'Got it' in the intro, we only show it
|
||||||
* once per session.
|
* once per session.
|
||||||
|
|
|
@ -237,6 +237,9 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
||||||
|
|
||||||
<!ENTITY devToolbarCloseButton.tooltiptext "Close Developer Toolbar">
|
<!ENTITY devToolbarCloseButton.tooltiptext "Close Developer Toolbar">
|
||||||
<!ENTITY devToolbarMenu.label "Developer Toolbar">
|
<!ENTITY devToolbarMenu.label "Developer Toolbar">
|
||||||
|
<!ENTITY devToolbarMenu.accesskey "v">
|
||||||
|
<!ENTITY devToolbar.keycode "VK_F2">
|
||||||
|
<!ENTITY devToolbar.keytext "F2">
|
||||||
|
|
||||||
<!ENTITY webConsoleButton.label "Web Console">
|
<!ENTITY webConsoleButton.label "Web Console">
|
||||||
<!ENTITY inspectorButton.label "Inspector">
|
<!ENTITY inspectorButton.label "Inspector">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче