1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 13:52:26 +01:00

added visualbellstyle (don't think it works on GTK at least)

This commit is contained in:
Martin Stubenschrott
2008-05-24 21:02:48 +00:00
parent b8dcad1d51
commit f7be4eccd0
3 changed files with 26 additions and 8 deletions

1
NEWS
View File

@@ -1,6 +1,7 @@
<pre>
2008-05-14:
* version 1.1
* readded visualbellstyle (thanks mauke)
* new popups=4 option
2008-05-14:

View File

@@ -100,6 +100,11 @@ const liberator = (function () //{{{
{
setter: function (value) { liberator.options.setPref("accessibility.typeaheadfind.enablesound", !value); },
});
liberator.options.add(["visualbellstyle", "t_vb"],
"CSS specification of the visual bell",
"string", "border: none; background-color: black;"
);
}
function addMappings()
@@ -446,17 +451,22 @@ const liberator = (function () //{{{
beep: function ()
{
if (liberator.options["visualbell"])
{
var vbs = liberator.options["visualbellstyle"];
if (vbs)
{
// flash the visual bell
var popup = document.getElementById("liberator-visualbell");
var win = getBrowser().mPanelContainer;
var box = document.getBoxObjectFor(win);
popup.style.cssText = vbs;
popup.height = box.height;
popup.width = box.width;
popup.openPopup(win, "overlap", 0, 0, false, false);
setTimeout(function () { popup.hidePopup(); }, 50);
}
}
else
{
var soundService = Components.classes["@mozilla.org/sound;1"].

View File

@@ -546,6 +546,13 @@ Use visual bell instead of beeping on errors. For now you can't turn off both,
this will hopefully change.
____
|\'visualbellstyle'| |\'t_vb'|
||'visualbellstyle' 't_vb'|| string (default: "border: none; background-color: black;")
____
The CSS style to use for the visual bell. Set this to the empty string if you
want no bell at all.
____
|\'wim'| |\'wildmode'|
||'wildmode' 'wim'||
stringlist (default: "list:full")