1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-01 14:52:27 +01:00

don't include "no" prefixed variants of boolean option names in the usage

This commit is contained in:
Doug Kearns
2007-06-18 07:59:46 +00:00
parent 66cd7600f7
commit 707d36fcb5

View File

@@ -7,17 +7,6 @@ function Option(names, type, extra_info)//{{{
this.names = names;
this.type = type;
// add noOPTION variant of boolean OPTION to this.names
if (this.type == "boolean")
{
this.names = [];
for (var i = 0; i < names.length; i++)
{
this.names.push(names[i]);
this.names.push("no" + names[i]);
}
}
this.setter = function(value) { Options.setPref(this.name, value); };
this.getter = function() { return Options.getPref(this.name); };
@@ -46,6 +35,17 @@ function Option(names, type, extra_info)//{{{
this.validator = extra_info.validator || null;
}
// add noOPTION variant of boolean OPTION to this.names
if (this.type == "boolean")
{
this.names = [];
for (var i = 0; i < names.length; i++)
{
this.names.push(names[i]);
this.names.push("no" + names[i]);
}
}
// NOTE: forced defaults need to use Options.getPref
Option.prototype.__defineGetter__("value", function() { return this.getter.call(this); });
Option.prototype.__defineSetter__("value", function(value) { this.setter.call(this, value); });