Skip to content

Commit

Permalink
Merge r163086 - Web Inspector: Implement open/close Console window sh…
Browse files Browse the repository at this point in the history
…ortcut

https://bugs.webkit.org/show_bug.cgi?id=127896

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-30
Reviewed by Timothy Hatcher.

* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut.prototype.get displayName):
Bug: Option symbol should be displayed as Alternative symbol (\u2387)
in non Mac platforms.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Create keyboard shortcut for toggling console window.
  • Loading branch information
dpino authored and carlosgcampos committed Feb 3, 2014
1 parent ba58771 commit 4d6a1f3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
15 changes: 15 additions & 0 deletions Source/WebInspectorUI/ChangeLog
@@ -1,3 +1,18 @@
2014-01-30 Diego Pino Garcia <dpino@igalia.com>

Web Inspector: Implement open/close Console window shortcut
https://bugs.webkit.org/show_bug.cgi?id=127896

Reviewed by Timothy Hatcher.

* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut.prototype.get displayName):
Bug: Option symbol should be displayed as Alternative symbol (\u2387)
in non Mac platforms.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Create keyboard shortcut for toggling console window.

2014-01-29 Diego Pino Garcia <dpino@igalia.com>

Web Inspector: [REGRESSION(r162931)] Tab navigation broken in DataGrid
Expand Down
2 changes: 1 addition & 1 deletion Source/WebInspectorUI/UserInterface/KeyboardShortcut.js
Expand Up @@ -180,7 +180,7 @@ WebInspector.KeyboardShortcut.prototype = {
if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Control)
result += "\u2303";
if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Option)
result += "\u2325";
result += InspectorFrontendHost.platform() === "mac" ? "\u2325" : "\u2387";
if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Shift)
result += "\u21e7";
if (this._modifiers & WebInspector.KeyboardShortcut.Modifier.Command)
Expand Down
7 changes: 4 additions & 3 deletions Source/WebInspectorUI/UserInterface/Main.js
Expand Up @@ -225,6 +225,8 @@ WebInspector.contentLoaded = function()
this._reloadPageKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "R", this._reloadPage.bind(this));
this._reloadPageIgnoringCacheKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, "R", this._reloadPageIgnoringCache.bind(this));

this._consoleKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Option | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "C", this.toggleConsoleView.bind(this));

this._inspectModeKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, "C", this._toggleInspectMode.bind(this));

this._undoKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "Z", this._undoKeyboardShortcut.bind(this));
Expand Down Expand Up @@ -257,9 +259,8 @@ WebInspector.contentLoaded = function()
this.toolbar.addToolbarItem(this.debuggerSidebarPanel.toolbarItem, WebInspector.Toolbar.Section.Left);

// The toolbar button for the console.
const consoleKeyboardShortcut = "\u2325\u2318C"; // Option-Command-C
var toolTip = WebInspector.UIString("Show console (%s)").format(consoleKeyboardShortcut);
var activatedToolTip = WebInspector.UIString("Hide console");
var toolTip = WebInspector.UIString("Show console (%s)").format(WebInspector._consoleKeyboardShortcut.displayName);
var activatedToolTip = WebInspector.UIString("Hide console (%s)").format(WebInspector._consoleKeyboardShortcut.displayName);
this._consoleToolbarButton = new WebInspector.ActivateButtonToolbarItem("console", toolTip, activatedToolTip, WebInspector.UIString("Console"), "Images/NavigationItemLog.svg");
this._consoleToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this.toggleConsoleView, this);
this.toolbar.addToolbarItem(this._consoleToolbarButton, WebInspector.Toolbar.Section.Center);
Expand Down

0 comments on commit 4d6a1f3

Please sign in to comment.