Bug 912240 - Restore access key for the Clear button in console; r=msucan

This commit is contained in:
Anton Kovalyov 2013-10-03 23:25:22 +03:00
Родитель 46b4fad05e
Коммит f72cf76dd0
4 изменённых файлов: 10 добавлений и 23 удалений

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

@ -36,8 +36,8 @@ function test()
function onConsoleMessage()
{
hud.jsterm.once("messages-cleared", onClear);
info("try ctrl-k to clear output");
EventUtils.synthesizeKey("K", { accelKey: true });
info("try ctrl-l to clear output");
EventUtils.synthesizeKey("l", { ctrlKey: true });
}
function onClear()

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

@ -490,7 +490,6 @@ WebConsoleFrame.prototype = {
this._setFilterTextBoxEvents();
this._initFilterButtons();
this._changeClearModifier();
let fontSize = this.owner._browserConsole ?
Services.prefs.getIntPref("devtools.webconsole.fontSize") : 0;
@ -594,21 +593,6 @@ WebConsoleFrame.prototype = {
this.filterBox.addEventListener("input", onChange, false);
},
/**
* Changes modifier for the clear output shorcut on Macs.
*
* @private
*/
_changeClearModifier: function WCF__changeClearModifier()
{
if (Services.appinfo.OS != "Darwin") {
return;
}
let clear = this.document.querySelector("#key_clearOutput");
clear.setAttribute("modifiers", "access");
},
/**
* Creates one of the filter buttons on the toolbar.
*
@ -653,6 +637,9 @@ WebConsoleFrame.prototype = {
let net = this.document.querySelector("toolbarbutton[category=net]");
let accesskey = net.getAttribute("accesskeyMacOSX");
net.setAttribute("accesskey", accesskey);
let logging = this.document.querySelector("toolbarbutton[category=logging]");
logging.removeAttribute("accesskey");
}
},

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

@ -56,9 +56,8 @@ function goUpdateConsoleCommands() {
<key id="key_fullZoomReset" key="&fullZoomResetCmd.commandkey;" command="cmd_fullZoomReset" modifiers="accel"/>
<key key="&fullZoomResetCmd.commandkey2;" command="cmd_fullZoomReset" modifiers="accel"/>
<key key="&findCmd.key;" command="cmd_find" modifiers="accel"/>
<key key="&clearOutputCmd.key;" command="consoleCmd_clearOutput" modifiers="accel"/>
<key key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
<key id="key_clearOutput" key="&clearOutputCtrl.key;" command="consoleCmd_clearOutput" modifiers="accel"/>
<key key="&clearOutputCtrl.key;" command="consoleCmd_clearOutput" modifiers="control"/>
</keyset>
<keyset id="editMenuKeys"/>
@ -141,7 +140,7 @@ function goUpdateConsoleCommands() {
<toolbarbutton label="&btnPageLogging.label;" type="menu-button"
category="logging" class="devtools-toolbarbutton webconsole-filter-button"
tooltiptext="&btnPageLogging.tooltip;"
accesskey="&btnPageLogging.accesskey2;"
accesskey="&btnPageLogging.accesskey3;"
tabindex="7">
<menupopup>
<menuitem label="&btnConsoleErrors;" type="checkbox"
@ -157,6 +156,7 @@ function goUpdateConsoleCommands() {
<toolbarbutton class="webconsole-clear-console-button devtools-toolbarbutton"
label="&btnClear.label;" tooltiptext="&btnClear.tooltip;"
accesskey="&btnClear.accesskey;"
tabindex="8"/>
<spacer flex="1"/>

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

@ -68,7 +68,7 @@
- console.error(). -->
<!ENTITY btnPageLogging.label "Logging">
<!ENTITY btnPageLogging.tooltip "Log messages sent to the window.console object">
<!ENTITY btnPageLogging.accesskey2 "R">
<!ENTITY btnPageLogging.accesskey3 "L">
<!ENTITY btnConsoleErrors "Errors">
<!ENTITY btnConsoleInfo "Info">
<!ENTITY btnConsoleWarnings "Warnings">
@ -77,6 +77,7 @@
<!ENTITY filterOutput.placeholder "Filter output">
<!ENTITY btnClear.label "Clear">
<!ENTITY btnClear.tooltip "Clear the Web Console output">
<!ENTITY btnClear.accesskey "r">
<!ENTITY fullZoomEnlargeCmd.commandkey "+">
<!ENTITY fullZoomEnlargeCmd.commandkey2 "="> <!-- + is above this key on many keyboards -->
@ -93,5 +94,4 @@
<!ENTITY closeCmd.key "W">
<!ENTITY findCmd.key "F">
<!ENTITY clearOutputCmd.key "K">
<!ENTITY clearOutputCtrl.key "L">