summaryrefslogtreecommitdiffstats
path: root/devtools/client/framework/components
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/framework/components')
-rw-r--r--devtools/client/framework/components/MeatballMenu.js34
-rw-r--r--devtools/client/framework/components/ToolboxToolbar.js8
2 files changed, 27 insertions, 15 deletions
diff --git a/devtools/client/framework/components/MeatballMenu.js b/devtools/client/framework/components/MeatballMenu.js
index fc694171c8..74d8592723 100644
--- a/devtools/client/framework/components/MeatballMenu.js
+++ b/devtools/client/framework/components/MeatballMenu.js
@@ -3,6 +3,8 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
+const SPLITCONSOLE_ENABLED_PREF = "devtools.toolbox.splitconsole.enabled";
+
const {
PureComponent,
createFactory,
@@ -180,19 +182,27 @@ class MeatballMenu extends PureComponent {
// Split console
if (this.props.currentToolId !== "webconsole") {
- const l10nID = this.props.isSplitConsoleActive
- ? "toolbox-meatball-menu-hideconsole-label"
- : "toolbox-meatball-menu-splitconsole-label";
- items.push(
- MenuItem({
- id: "toolbox-meatball-menu-splitconsole",
- key: "splitconsole",
- l10nID,
- accelerator: "Esc",
- onClick: this.props.toggleSplitConsole,
- className: "iconic",
- })
+ const isSplitConsoleEnabled = Services.prefs.getBoolPref(
+ SPLITCONSOLE_ENABLED_PREF,
+ true
);
+
+ if (isSplitConsoleEnabled) {
+ const l10nID = this.props.isSplitConsoleActive
+ ? "toolbox-meatball-menu-hideconsole-label"
+ : "toolbox-meatball-menu-splitconsole-label";
+
+ items.push(
+ MenuItem({
+ id: "toolbox-meatball-menu-splitconsole",
+ key: "splitconsole",
+ l10nID,
+ accelerator: "Esc",
+ onClick: this.props.toggleSplitConsole,
+ className: "iconic",
+ })
+ );
+ }
}
// Settings
diff --git a/devtools/client/framework/components/ToolboxToolbar.js b/devtools/client/framework/components/ToolboxToolbar.js
index f9998db0ab..bd9e3d5071 100644
--- a/devtools/client/framework/components/ToolboxToolbar.js
+++ b/devtools/client/framework/components/ToolboxToolbar.js
@@ -320,6 +320,10 @@ class ToolboxToolbar extends Component {
errorCount = "99+";
}
+ const errorIconTooltip = this.props.toolbox.isSplitConsoleEnabled()
+ ? this.props.L10N.getStr("toolbox.errorCountButton.tooltip")
+ : this.props.L10N.getStr("toolbox.errorCountButtonConsoleTab.tooltip");
+
return button(
{
id,
@@ -330,9 +334,7 @@ class ToolboxToolbar extends Component {
}
},
title:
- this.props.currentToolId !== "webconsole"
- ? this.props.L10N.getStr("toolbox.errorCountButton.tooltip")
- : null,
+ this.props.currentToolId !== "webconsole" ? errorIconTooltip : null,
},
errorCount
);