mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 892289 - Ctrl+L should clear the console output. r=robcee
This commit is contained in:
parent
1ad01d4327
commit
4d39511bb0
@ -488,6 +488,7 @@ WebConsoleFrame.prototype = {
|
||||
|
||||
this._setFilterTextBoxEvents();
|
||||
this._initFilterButtons();
|
||||
this._changeClearModifier();
|
||||
|
||||
let fontSize = Services.prefs.getIntPref("devtools.webconsole.fontSize");
|
||||
|
||||
@ -583,6 +584,21 @@ 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.
|
||||
*
|
||||
|
@ -58,6 +58,7 @@ function goUpdateConsoleCommands() {
|
||||
<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"/>
|
||||
</keyset>
|
||||
<keyset id="editMenuKeys"/>
|
||||
|
||||
@ -138,7 +139,7 @@ function goUpdateConsoleCommands() {
|
||||
<toolbarbutton label="&btnPageLogging.label;" type="menu-button"
|
||||
category="logging" class="devtools-toolbarbutton webconsole-filter-button"
|
||||
tooltiptext="&btnPageLogging.tooltip;"
|
||||
accesskey="&btnPageLogging.accesskey;"
|
||||
accesskey="&btnPageLogging.accesskey2;"
|
||||
tabindex="7">
|
||||
<menupopup>
|
||||
<menuitem label="&btnConsoleErrors;" type="checkbox"
|
||||
@ -154,7 +155,6 @@ 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.accesskey "L">
|
||||
<!ENTITY btnPageLogging.accesskey2 "R">
|
||||
<!ENTITY btnConsoleErrors "Errors">
|
||||
<!ENTITY btnConsoleInfo "Info">
|
||||
<!ENTITY btnConsoleWarnings "Warnings">
|
||||
@ -77,7 +77,6 @@
|
||||
<!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 -->
|
||||
@ -95,3 +94,4 @@
|
||||
<!ENTITY closeCmd.key "W">
|
||||
<!ENTITY findCmd.key "F">
|
||||
<!ENTITY clearOutputCmd.key "K">
|
||||
<!ENTITY clearOutputCtrl.key "L">
|
||||
|
Loading…
Reference in New Issue
Block a user