Bug 1455496 - Part 1. Hide toolbar of scratchpad panel. r?dao draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Sat, 21 Apr 2018 19:16:32 +0900
changeset 786113 7564536afbdbad72c93bef9642c97c18f5befd14
parent 785383 ea3555cf12afff38370e7a697db81f181e15dbf6
child 786114 4f3df3229d49ebc6cbb16e13e6c9f2b31f16180d
push id107399
push userbmo:mantaroh@gmail.com
push dateSat, 21 Apr 2018 10:23:37 +0000
reviewersdao
bugs1455496
milestone61.0a1
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: 8WN5fglCvNL
devtools/client/scratchpad/scratchpad.js
devtools/client/scratchpad/scratchpad.xul
--- 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,18 +136,18 @@
        command="sp-cmd-documentationLink"/>
   <key id="key_gotoLine"
        key="&gotoLineCmd.key;"
        command="key_gotoLine"
        modifiers="accel"/>
 
 </keyset>
 
-<toolbar type="menubar">
-<menubar id="sp-menubar">
+<toolbar type="menubar" id="sp-menu-toolbar">
+<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"/>
       <menuseparator/>