Bug 1455496 - Part 1. Hide toolbar of scratchpad panel. r?dao
The scratchpad panel(in the toolbox) should not display menu bar.
This patch will hide this menu bar if target is toolbox.
MozReview-Commit-ID: LEzRPVgPeNs
--- a/devtools/client/scratchpad/scratchpad.js
+++ b/devtools/client/scratchpad/scratchpad.js
@@ -332,24 +332,24 @@ var Scratchpad = {
get notificationBox() {
return document.getElementById("scratchpad-notificationbox");
},
/**
* Hide the menu bar.
*/
hideMenu: function SP_hideMenu() {
- document.getElementById("sp-menubar").style.display = "none";
+ document.getElementById("sp-menu-toolbar").style.display = "none";
},
/**
* Show the menu bar.
*/
showMenu: function SP_showMenu() {
- document.getElementById("sp-menubar").style.display = "";
+ document.getElementById("sp-menu-toolbar").style.display = "";
},
/**
* Get the editor content, in the given range. If no range is given you get
* the entire editor content.
*
* @param number [aStart=0]
* Optional, start from the given offset.
--- a/devtools/client/scratchpad/scratchpad.xul
+++ b/devtools/client/scratchpad/scratchpad.xul
@@ -136,17 +136,17 @@
command="sp-cmd-documentationLink"/>
<key id="key_gotoLine"
key="&gotoLineCmd.key;"
command="key_gotoLine"
modifiers="accel"/>
</keyset>
-<toolbar type="menubar">
+<toolbar type="menubar" id="sp-menu-toolbar">
<menubar id="sp-menubar">
<menu id="sp-file-menu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menupopup id="sp-menu-filepopup">
<menuitem id="sp-menu-newscratchpad"
label="&newWindowCmd.label;"
accesskey="&newWindowCmd.accesskey;"
key="sp-key-window"
command="sp-cmd-newWindow"/>