From c80fc678680ef51f6891d19dbdcdfd15bd672479 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 22 Sep 2007 15:44:36 +0000 Subject: [PATCH] add a new 'visualbellstyle' option --- NEWS | 1 + chrome/content/vimperator/default.css | 4 ---- chrome/content/vimperator/options.js | 10 +++++++++- chrome/content/vimperator/vimperator.js | 1 + 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 9d474404..e8a2f63a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
 2007-XX-XX:
 	* version 0.5.2
+	* added 'visualbellstyle' for styling/hiding the visual bell
   	* :buffer partial_string works now as in vim, and with ! even better
 	* merge the existing status bar with the standard FF status bar so that
 	  security information and extension buttons are included
diff --git a/chrome/content/vimperator/default.css b/chrome/content/vimperator/default.css
index 35b9a5dc..0c55749c 100644
--- a/chrome/content/vimperator/default.css
+++ b/chrome/content/vimperator/default.css
@@ -172,10 +172,6 @@ statusbarpanel {
     overflow: hidden;
 }
 
-#vimperator-visualbell {
-    background-color: black;
-}
-
 /*
 .status_insecure, .status_insecure * {
 }
diff --git a/chrome/content/vimperator/options.js b/chrome/content/vimperator/options.js
index 5737a05e..64753bcb 100644
--- a/chrome/content/vimperator/options.js
+++ b/chrome/content/vimperator/options.js
@@ -365,7 +365,7 @@ function Options() //{{{
                   "
  • b: Bookmarks
  • " + "
  • h: History
  • " + "The order is important, so :set complete=bs would list bookmarks first, and then any available quick searches.
    " + - "Add 'sort' to the 'wildoptions' option if you want all entries sorted.", + "Add 'sort' to the 'wildoptions' option if you want all entries sorted.", default_value: "sfbh", validator: function (value) { if (/[^sfbh]/.test(value)) return false; else return true; } } @@ -595,6 +595,14 @@ function Options() //{{{ default_value: false } )); + addOption(new Option(["visualbellstyle"], "string", + { + short_help: "CSS specification of the visual bell", + help: "To hide the visual bell use a value of \"display: none;\".", + setter: function(value) { if (!value) value = "display: none;"; Options.setPref("visualbellstyle", value); }, + default_value: "background-color: black; color: black;" + } + )); addOption(new Option(["wildmode", "wim"], "stringlist", { short_help: "Define how command line completion works", diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index d19785fd..6aa84e52 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -288,6 +288,7 @@ const vimperator = (function() //{{{ var vbell = document.getElementById("vimperator-visualbell"); var box = getBrowser().mPanelContainer.boxObject; + vbell.style.cssText = vimperator.options["visualbellstyle"]; vbell.style.position = "fixed"; vbell.style.height = box.height + "px"; vbell.style.width = box.width + "px";