Fix the devtools window title when the options tab is selected (bug 1044488); r=jwalker
authorPanos Astithas <past@mozilla.com>
Mon, 28 Jul 2014 21:02:29 +0300
changeset 196496 227521be1def05f99e1614ecd483bd32943e2ecc
parent 196495 1860339ad03868dc66f07380bcc910c988de3ab0
child 196497 15d85e45122debbd7269390eb8fdcaa3f611e7df
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjwalker
bugs1044488
milestone34.0a1
Fix the devtools window title when the options tab is selected (bug 1044488); r=jwalker
browser/devtools/framework/toolbox.js
browser/devtools/main.js
browser/locales/en-US/chrome/browser/devtools/toolbox.properties
--- 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.