mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 17:47:59 +01:00
Don't share specially parsed option values across windows.
This commit is contained in:
@@ -628,7 +628,8 @@ var Modes = Module("modes", {
|
|||||||
validator: function validator(vals) vals.map(v => v.replace(/^!/, ""))
|
validator: function validator(vals) vals.map(v => v.replace(/^!/, ""))
|
||||||
.every(k => hasOwnProperty(this.values, k)),
|
.every(k => hasOwnProperty(this.values, k)),
|
||||||
|
|
||||||
get values() array.toObject([[m.name.toLowerCase(), m.description] for (m in values(modes._modes)) if (!m.hidden)])
|
get values() array.toObject([[m.name.toLowerCase(), m.description]
|
||||||
|
for (m in values(modes._modes)) if (!m.hidden)])
|
||||||
};
|
};
|
||||||
|
|
||||||
options.add(["passunknown", "pu"],
|
options.add(["passunknown", "pu"],
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ var Option = Class("Option", {
|
|||||||
return this.globalValue = this.defaultValue;
|
return this.globalValue = this.defaultValue;
|
||||||
},
|
},
|
||||||
set globalValue(val) {
|
set globalValue(val) {
|
||||||
options.store.set(this.name, { value: val, time: Date.now() });
|
options.store.set(this.name,
|
||||||
|
{ value: this.parse(this.stringify(val)),
|
||||||
|
time: Date.now() });
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,6 +142,9 @@ var Option = Class("Option", {
|
|||||||
if ((scope & Option.SCOPE_GLOBAL) && (values == undefined))
|
if ((scope & Option.SCOPE_GLOBAL) && (values == undefined))
|
||||||
values = this.globalValue;
|
values = this.globalValue;
|
||||||
|
|
||||||
|
if (hasOwnProperty(this, "_value"))
|
||||||
|
values = this._value;
|
||||||
|
|
||||||
if (this.getter)
|
if (this.getter)
|
||||||
return util.trapErrors(this.getter, this, values);
|
return util.trapErrors(this.getter, this, values);
|
||||||
|
|
||||||
@@ -169,6 +174,7 @@ var Option = Class("Option", {
|
|||||||
*/
|
*/
|
||||||
if ((scope & Option.SCOPE_GLOBAL) && !skipGlobal)
|
if ((scope & Option.SCOPE_GLOBAL) && !skipGlobal)
|
||||||
this.globalValue = newValues;
|
this.globalValue = newValues;
|
||||||
|
this._value = newValues;
|
||||||
|
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
this.setFrom = null;
|
this.setFrom = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user