From 707d36fcb5aad1e81698f1db6dc08a9365c9eca0 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 18 Jun 2007 07:59:46 +0000 Subject: [PATCH] don't include "no" prefixed variants of boolean option names in the usage --- chrome/content/vimperator/options.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js index c2fb9f5a..46599258 100644 --- a/chrome/content/vimperator/options.js +++ b/chrome/content/vimperator/options.js @@ -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); });