Bug 1386620 - dt-addon-prefs: move devtools.theme preference to devtools-startup-prefs.js;r=bgrins draft
authorJulian Descottes <jdescottes@mozilla.com>
Tue, 25 Jul 2017 16:45:08 +0200
changeset 619749 72952b2f7373ac19144711e53342c37dfb2d050d
parent 619748 bb85aa12ec92db7d11abdb002f0429123b173afd
child 619755 fa94245d44a865c1beeb90881d3f2836b708fc23
push id71793
push userjdescottes@mozilla.com
push dateWed, 02 Aug 2017 14:03:50 +0000
reviewersbgrins
bugs1386620
milestone57.0a1
Bug 1386620 - dt-addon-prefs: move devtools.theme preference to devtools-startup-prefs.js;r=bgrins MozReview-Commit-ID: GOWh7COmCSx
devtools/client/preferences/devtools.js
devtools/shim/devtools-startup-prefs.js
devtools/shim/moz.build
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -226,23 +226,16 @@ pref("devtools.webaudioeditor.enabled", 
 pref("devtools.scratchpad.enabled", false);
 
 // Make sure the DOM panel is hidden by default
 pref("devtools.dom.enabled", false);
 
 // Web Audio Editor Inspector Width should be a preference
 pref("devtools.webaudioeditor.inspectorWidth", 300);
 
-// Default theme ("dark" or "light")
-#ifdef MOZ_DEV_EDITION
-sticky_pref("devtools.theme", "dark");
-#else
-sticky_pref("devtools.theme", "light");
-#endif
-
 // Web console filters
 pref("devtools.webconsole.filter.error", true);
 pref("devtools.webconsole.filter.warn", true);
 pref("devtools.webconsole.filter.info", true);
 pref("devtools.webconsole.filter.log", true);
 pref("devtools.webconsole.filter.debug", true);
 pref("devtools.webconsole.filter.css", false);
 pref("devtools.webconsole.filter.net", false);
--- a/devtools/shim/devtools-startup-prefs.js
+++ b/devtools/shim/devtools-startup-prefs.js
@@ -5,8 +5,15 @@
 // This Devtools preferences file will be loaded as a usual Firefox preferences file.
 // Most DevTools prefs are included with the addon and loaded dynamically during the addon
 // startup. For preferences that are required before the addon is loaded or that we can't
 // process in JS, they can be defined in this file.
 // Note that this preference file follows Firefox release cycle.
 
 // Enable the JSON View tool (an inspector for application/json documents).
 pref("devtools.jsonview.enabled", true);
+
+// Default theme ("dark" or "light")
+#ifdef MOZ_DEV_EDITION
+sticky_pref("devtools.theme", "dark");
+#else
+sticky_pref("devtools.theme", "light");
+#endif
--- a/devtools/shim/moz.build
+++ b/devtools/shim/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 JAR_MANIFESTS += ['jar.mn']
 
-JS_PREFERENCE_FILES += [
+JS_PREFERENCE_PP_FILES += [
     'devtools-startup-prefs.js',
 ]
 
 # Register the about:debugging page only for 'addon' and 'all' builds.
 if CONFIG['MOZ_DEVTOOLS'] != 'server':
     EXTRA_COMPONENTS += [
         'aboutdebugging-registration.js',
         'aboutdebugging.manifest',