Fix the devtools window title when the options tab is selected (
bug 1044488); r=jwalker
--- a/browser/devtools/framework/toolbox.js
+++ b/browser/devtools/framework/toolbox.js
@@ -725,17 +725,17 @@ Toolbox.prototype = {
// Adding the highlighted icon image
image = this.doc.createElement("image");
image.className = "highlighted-icon";
image.setAttribute("src",
toolDefinition.highlightedicon || toolDefinition.icon);
radio.appendChild(image);
}
- if (toolDefinition.label) {
+ if (toolDefinition.label && !toolDefinition.iconOnly) {
let label = this.doc.createElement("label");
label.setAttribute("value", toolDefinition.label)
label.setAttribute("crop", "end");
label.setAttribute("flex", "1");
radio.appendChild(label);
radio.setAttribute("flex", "1");
}
--- a/browser/devtools/main.js
+++ b/browser/devtools/main.js
@@ -65,16 +65,18 @@ exports.Tools = Tools;
// Definitions
Tools.options = {
id: "options",
ordinal: 0,
url: "chrome://browser/content/devtools/framework/toolbox-options.xul",
icon: "chrome://browser/skin/devtools/tool-options.svg",
invertIconForLightTheme: true,
bgTheme: "theme-body",
+ label: l10n("options.label", toolboxStrings),
+ iconOnly: true,
panelLabel: l10n("options.panelLabel", toolboxStrings),
tooltip: l10n("optionsButton.tooltip", toolboxStrings),
inMenu: false,
isTargetSupported: function(target) {
return true;
},
build: function(iframeWindow, toolbox) {
let panel = new OptionsPanel(iframeWindow, toolbox);
--- a/browser/locales/en-US/chrome/browser/devtools/toolbox.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/toolbox.properties
@@ -38,16 +38,20 @@ toolbox.defaultTitle=Developer Tools
# LOCALIZATION NOTE (toolbox.label): This is used as the label for the
# toolbox as a whole
toolbox.label=Developer Tools
# LOCALIZATION NOTE (optionsButton.tooltip): This is used as the tooltip
# for the options panel tab.
optionsButton.tooltip=Toolbox Options
+# LOCALIZATION NOTE (options.label): This is used as the label of the tab in
+# the devtools window.
+options.label=Options
+
# LOCALIZATION NOTE (options.panelLabel): This is used as the label for the
# toolbox panel.
options.panelLabel=Toolbox Options Panel
# LOCALIZATION NOTE (options.toolNotSupported): This is the template
# used to add a * marker to the label for the Options Panel tool checkbox for the
# tool which is not supported for the current toolbox target.
# The name of the tool: %1$S.