mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 534687 - Weave's pref syncing can sync lightweight themes in a broken fashion
Trigger lightweight theme manager's currentTheme setter when changing the usedThemes pref.
This commit is contained in:
parent
4bdfeb9b77
commit
baf9c41432
@ -147,6 +147,22 @@ PrefStore.prototype = {
|
||||
break;
|
||||
case "string":
|
||||
this._prefs.setCharPref(values[i]["name"], values[i]["value"]);
|
||||
|
||||
// Notify the lightweight theme manager of the new value
|
||||
if (values[i].name == "lightweightThemes.usedThemes") {
|
||||
try {
|
||||
let ltm = {};
|
||||
Cu.import("resource://gre/modules/LightweightThemeManager.jsm", ltm);
|
||||
ltm = ltm.LightweightThemeManager;
|
||||
if (ltm.currentTheme) {
|
||||
ltm.currentTheme = null;
|
||||
ltm.currentTheme = ltm.usedThemes[0];
|
||||
}
|
||||
}
|
||||
// LightweightThemeManager only exists in Firefox 3.6+
|
||||
catch (ex) {}
|
||||
}
|
||||
|
||||
break;
|
||||
case "boolean":
|
||||
this._prefs.setBoolPref(values[i]["name"], values[i]["value"]);
|
||||
|
Loading…
Reference in New Issue
Block a user