From 79bbf87a8ecde5428a733ab57a0c510816a105eb Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 11 Sep 2007 14:01:58 +0000 Subject: [PATCH] merge new 'popups' option --- chrome/content/vimperator/options.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js index 3f80e12d..1a39caf9 100644 --- a/chrome/content/vimperator/options.js +++ b/chrome/content/vimperator/options.js @@ -230,6 +230,16 @@ function Options() //{{{ document.title = value; } + function setPopups(value) + { + var values = [ [0, 1], // always in current tab + [0, 3], // in a new tab + [2, 3], // in a new window if it has specified sizes + [1, 2]];// always in new window + storePreference("browser.link.open_newwindow.restriction", values[value][0]); + storePreference("browser.link.open_newwindow", values[value][1]); + } + // // firefox preferences which need to be changed to work well with vimperator // @@ -450,6 +460,21 @@ function Options() //{{{ validator: function (value) { if (value >= 1 && value <= 1000) return true; else return false; } } )); + addOption(new Option(["popups", "pps"], "number", + { + short_help: "Where to show requested popup windows", + help: "Define where to show requested popup windows. Does not apply to windows which are opened by middle clicking a link, they always open in a new tab. " + + "Possible values:
" + + "NOTE: This option does not change the popup blocker of Firefox in any way.", + default_value: 1, + setter: function(value) { Options.setPref("popups", value); setPopups(value); }, + validator: function (value) { if (value >= 0 && value <= 3) return true; else return false; } + } + )); addOption(new Option(["preload"], "boolean", { short_help: "Speed up first time history/bookmark completion", @@ -594,6 +619,7 @@ function Options() //{{{ setShowTabline(this.showtabline); setGuiOptions(this.guioptions); setTitleString(this.titlestring); + setPopups(this.popups); } //}}} // vim: set fdm=marker sw=4 ts=4 et: