Bug 1365889 - Stop using preprocessing in Scratchpad. r=jdescottes
MozReview-Commit-ID: HRGsWZwbvvp
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -7,17 +7,17 @@ devtools.jar:
content/shared/vendor/d3.js (shared/vendor/d3.js)
content/shared/vendor/dagre-d3.js (shared/vendor/dagre-d3.js)
content/shared/widgets/widgets.css (shared/widgets/widgets.css)
content/shared/widgets/VariablesView.xul (shared/widgets/VariablesView.xul)
content/projecteditor/chrome/content/projecteditor.xul (projecteditor/chrome/content/projecteditor.xul)
content/projecteditor/lib/helpers/readdir.js (projecteditor/lib/helpers/readdir.js)
content/netmonitor/index.html (netmonitor/index.html)
content/webconsole/webconsole.xul (webconsole/webconsole.xul)
-* content/scratchpad/scratchpad.xul (scratchpad/scratchpad.xul)
+ content/scratchpad/scratchpad.xul (scratchpad/scratchpad.xul)
content/scratchpad/scratchpad.js (scratchpad/scratchpad.js)
content/shared/splitview.css (shared/splitview.css)
content/shared/theme-switching.js (shared/theme-switching.js)
content/shared/frame-script-utils.js (shared/frame-script-utils.js)
content/styleeditor/styleeditor.xul (styleeditor/styleeditor.xul)
content/storage/storage.xul (storage/storage.xul)
content/inspector/inspector.js (inspector/inspector.js)
content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
--- a/devtools/client/scratchpad/scratchpad.js
+++ b/devtools/client/scratchpad/scratchpad.js
@@ -1734,16 +1734,24 @@ var Scratchpad = {
this._triggerObservers("Ready");
this.populateRecentFilesMenu();
PreferenceObserver.init();
CloseObserver.init();
}).then(null, (err) => console.error(err));
this._setupCommandListeners();
this._updateViewMenuItems();
this._setupPopupShowingListeners();
+
+ // Change the accesskey for the help menu as it can be specific on Windows
+ // some localizations of Windows (ex:french, german) use "?"
+ // for the help button in the menubar but Gnome does not.
+ if (Services.appinfo.OS == "WINNT") {
+ let helpMenu = document.getElementById("sp-help-menu");
+ helpMenu.setAttribute("accesskey", helpMenu.getAttribute("accesskeywindows"));
+ }
},
/**
* The Source Editor "change" event handler. This function updates the
* Scratchpad window title to show an asterisk when there are unsaved changes.
*
* @private
*/
--- a/devtools/client/scratchpad/scratchpad.xul
+++ b/devtools/client/scratchpad/scratchpad.xul
@@ -298,25 +298,20 @@
<menuitem id="sp-menu-browser"
command="sp-cmd-browserContext"
label="&browserContext.label;"
accesskey="&browserContext.accesskey;"
type="radio"/>
</menupopup>
</menu>
-#ifdef XP_WIN
<menu id="sp-help-menu"
label="&helpMenu.label;"
- accesskey="&helpMenuWin.accesskey;">
-#else
- <menu id="sp-help-menu"
- label="&helpMenu.label;"
- accesskey="&helpMenu.accesskey;">
-#endif
+ accesskey="&helpMenu.accesskey;"
+ accesskeywindows="&helpMenuWin.accesskey;">
<menupopup id="sp-menu-help">
<menuitem id="sp-menu-documentation"
label="&documentationLink.label;"
accesskey="&documentationLink.accesskey;"
command="sp-cmd-documentationLink"
key="key_openHelp"/>
</menupopup>
</menu>