aboutsummaryrefslogtreecommitdiffstats
path: root/www/flock/files
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-02-09 03:37:12 +0800
committermarcus <marcus@FreeBSD.org>2004-02-09 03:37:12 +0800
commit0f11da81658af4e419757abbac620f68d7a07a3f (patch)
treed62d7f6877a72d9b66915b685dd9202f2fd46ecb /www/flock/files
parent219bd87971232ea6354dba025474cdd3bbf3d4b5 (diff)
downloadfreebsd-ports-graphics-0f11da81658af4e419757abbac620f68d7a07a3f.tar.gz
freebsd-ports-graphics-0f11da81658af4e419757abbac620f68d7a07a3f.tar.zst
freebsd-ports-graphics-0f11da81658af4e419757abbac620f68d7a07a3f.zip
* Fix a bug where Firebird would lock up after typing any text. This had to
do with esound being installed, but not being used (e.g. when not running under the GNOME Desktop). What happens now is sound support is disabled by default. If you wish to enable Type Ahead Find sound support, edit your prefs.js file, and add: user_pref("accessibility.typeaheadfind.enablesound", true); * Make portlint happy by not including anything after bsd.port.post.mk * Clean up the pkg-message a bit to reflect reality with respect to Perl Thanks to casaveli on BSDForums for finding it was esound causing the lock up as well as testing the patch mentioned above.
Diffstat (limited to 'www/flock/files')
-rw-r--r--www/flock/files/patch-typeaheadfind-nosound72
1 files changed, 72 insertions, 0 deletions
diff --git a/www/flock/files/patch-typeaheadfind-nosound b/www/flock/files/patch-typeaheadfind-nosound
new file mode 100644
index 00000000000..9cc1d3506fb
--- /dev/null
+++ b/www/flock/files/patch-typeaheadfind-nosound
@@ -0,0 +1,72 @@
+--- extensions/typeaheadfind/src/nsTypeAheadFind.cpp.orig Sun Feb 8 01:13:31 2004
++++ extensions/typeaheadfind/src/nsTypeAheadFind.cpp Sun Feb 8 01:19:17 2004
+@@ -323,11 +323,11 @@
+ prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly",
+ &mStartLinksOnlyPref);
+
+- PRBool isSoundEnabled = PR_TRUE;
++ mIsSoundEnabled = PR_TRUE;
+ prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound",
+- &isSoundEnabled);
++ &mIsSoundEnabled);
+ nsXPIDLCString soundStr;
+- if (isSoundEnabled) {
++ if (mIsSoundEnabled) {
+ prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL",
+ getter_Copies(soundStr));
+ }
+@@ -612,7 +612,7 @@
+ return NS_OK;
+ }
+
+- if (!mIsSoundInitialized) {
++ if (!mIsSoundInitialized && mIsSoundEnabled) {
+ // This makes sure system sound library is loaded so that
+ // there's no lag before the first sound is played
+ // by waiting for the first keystroke, we still get the startup time benefits.
+@@ -760,11 +760,13 @@
+ // It keeps us from accidentally hitting backspace too many times and
+ // going back in history when we really just wanted to clear
+ // the find string.
++ if (mIsSoundEnabled) {
+ nsCOMPtr<nsISound> soundInterface =
+ do_CreateInstance("@mozilla.org/sound;1");
+ if (soundInterface) {
+ soundInterface->Beep(); // beep to warn
+ }
++ }
+ mIsBackspaceProtectOn = PR_FALSE;
+ }
+ else {
+@@ -1009,7 +1011,9 @@
+
+ // Error sound (don't fire when backspace is pressed, they're
+ // trying to correct the mistake!)
+- PlayNotFoundSound();
++ if (mIsSoundEnabled) {
++ PlayNotFoundSound();
++ }
+
+ // Remove bad character from buffer, so we can continue typing from
+ // last matched character
+@@ -1056,7 +1060,7 @@
+ void
+ nsTypeAheadFind::PlayNotFoundSound()
+ {
+- if (mNotFoundSoundURL.IsEmpty()) // no sound
++ if (mNotFoundSoundURL.IsEmpty() || !mIsSoundEnabled) // no sound
+ return;
+ if (!mSoundInterface) {
+ mSoundInterface = do_CreateInstance("@mozilla.org/sound;1");
+--- extensions/typeaheadfind/src/nsTypeAheadFind.h.orig Sun Feb 8 01:11:53 2004
++++ extensions/typeaheadfind/src/nsTypeAheadFind.h Sun Feb 8 01:19:29 2004
+@@ -194,6 +194,9 @@
+
+ nsCString mNotFoundSoundURL;
+
++ // Move the sound enabled boolean out for all methods to access.
++ PRBool mIsSoundEnabled;
++
+ // PRBool's are used instead of PRPackedBool's where the address of the
+ // boolean variable is getting passed into a method. For example:
+ // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref);