mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1217153 - Do not reset devtools theme when hot reloading the tools. r=bgrins
This commit is contained in:
parent
3dd2543cac
commit
23b0ceea92
@ -23,7 +23,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
|
||||
loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
|
||||
loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/main", true);
|
||||
|
||||
const DefaultTools = require("devtools/client/definitions").defaultTools;
|
||||
const {defaultTools: DefaultTools, defaultThemes: DefaultThemes} =
|
||||
require("devtools/client/definitions");
|
||||
const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const Telemetry = require("devtools/client/shared/telemetry");
|
||||
const {JsonView} = require("devtools/client/jsonview/main");
|
||||
@ -286,10 +287,17 @@ DevTools.prototype = {
|
||||
|
||||
let currTheme = Services.prefs.getCharPref("devtools.theme");
|
||||
|
||||
// Change the current theme if it's being dynamically removed together
|
||||
// with the owner (bootstrapped) extension.
|
||||
// But, do not change it if the application is just shutting down.
|
||||
if (!Services.startup.shuttingDown && theme.id == currTheme) {
|
||||
// Note that we can't check if `theme` is an item
|
||||
// of `DefaultThemes` as we end up reloading definitions
|
||||
// module and end up with different theme objects
|
||||
let isCoreTheme = DefaultThemes.some(t => t.id === themeId);
|
||||
|
||||
// Reset the theme if an extension theme that's currently applied
|
||||
// is being removed.
|
||||
// Ignore shutdown since addons get disabled during that time.
|
||||
if (!Services.startup.shuttingDown &&
|
||||
!isCoreTheme &&
|
||||
theme.id == currTheme) {
|
||||
Services.prefs.setCharPref("devtools.theme", "light");
|
||||
|
||||
let data = {
|
||||
|
Loading…
Reference in New Issue
Block a user