Bug 957072 - Add Pretty Print to Scratchpad Menu. r=robcee
authorVikneshwar <lviknesh1993@gmail.com>
Sat, 08 Feb 2014 21:02:11 -0500
changeset 184933 cd69b4b6d5443b537815cd745184e3e703cc96ef
parent 184932 1b0c950329738cb6b557ce194cee7a7fddf4f5aa
child 184934 42e3d236bebb43becddf70c42b44af58d351669e
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobcee
bugs957072
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 957072 - Add Pretty Print to Scratchpad Menu. r=robcee
browser/devtools/scratchpad/scratchpad.xul
browser/devtools/scratchpad/test/browser_scratchpad_ui.js
browser/locales/en-US/chrome/browser/devtools/scratchpad.dtd
--- a/browser/devtools/scratchpad/scratchpad.xul
+++ b/browser/devtools/scratchpad/scratchpad.xul
@@ -186,16 +186,21 @@
       <menuitem id="menu_find"/>
       <menuitem id="menu_findAgain"/>
       <menuseparator/>
       <menuitem id="se-menu-gotoLine"
           label="&gotoLineCmd.label;"
           accesskey="&gotoLineCmd.accesskey;"
           key="key_gotoLine"
           command="cmd_gotoLine"/>
+      <menuitem id="sp-menu-pprint"
+          label="&pprint.label;"
+          accesskey="&pprint.accesskey;"
+          key="sp-key-pprint"
+          command="sp-cmd-pprint"/>
     </menupopup>
   </menu>
 
   <menu id="sp-execute-menu" label="&executeMenu.label;"
         accesskey="&executeMenu.accesskey;">
     <menupopup id="sp-menu_executepopup">
       <menuitem id="sp-text-run"
                 label="&run.label;"
--- a/browser/devtools/scratchpad/test/browser_scratchpad_ui.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_ui.js
@@ -27,16 +27,17 @@ function runTests()
     "sp-menu-save": "saveFile",
     "sp-menu-saveas": "saveFileAs",
     "sp-text-run": "run",
     "sp-text-inspect": "inspect",
     "sp-text-display": "display",
     "sp-text-reloadAndRun" : "reloadAndRun",
     "sp-menu-content": "setContentContext",
     "sp-menu-browser": "setBrowserContext",
+    "sp-menu-pprint":"prettyPrint",
   };
 
   let lastMethodCalled = null;
 
   for (let id in methodsAndItems) {
     lastMethodCalled = null;
 
     let methodName = methodsAndItems[id];
--- a/browser/locales/en-US/chrome/browser/devtools/scratchpad.dtd
+++ b/browser/locales/en-US/chrome/browser/devtools/scratchpad.dtd
@@ -62,16 +62,17 @@
 <!ENTITY inspect.key                  "i">
 
 <!ENTITY display.label                "Display">
 <!ENTITY display.accesskey            "D">
 <!ENTITY display.key                  "l">
 
 <!ENTITY pprint.label                 "Pretty Print">
 <!ENTITY pprint.key                   "p">
+<!ENTITY pprint.accesskey             "P">
 
 <!-- LOCALIZATION NOTE (environmentMenu.label, accesskey): This menu item was
   -  renamed from "Context" to avoid confusion with the right-click context
   -  menu in the text area. It refers to the JavaScript Environment (or context)
   -  the user is evaluating against. I.e., Content (current tab) or Chrome
   -  (browser).
   -->
 <!ENTITY environmentMenu.label        "Environment">