Test (int n)
{
GenericReadout(soundOptions, 1);
+ mute <<= 1; // temporarily enable
if(soundFiles[values[2]]) PlaySoundFile(soundFiles[values[2]]);
+ mute >>= 1;
}
void
extern int commentUp;
extern char *firstChessProgramNames;
extern char *icsTextMenuString;
+extern int mute;
void GreyRevert P((Boolean grey));
void EnableNamedMenuItem P((char *menuRef, int state));
EditAnyPopUp(icsTextMenuString, &icsTextMenuString, _("ICS Text-Menu Definition"));
}
+void
+MuteProc ()
+{
+ mute = !mute;
+ MarkMenuItem("Options.Mute", mute);
+}
+
void
NothingProc ()
{
};
MenuItem optionsMenu[] = {
+ {N_("Mute all Sounds"), NULL, "Mute", MuteProc, CHECK},
+ {"----", NULL, NULL, NothingProc},
#ifdef OPTIONSDIALOG
{N_("General..."), NULL, "General", OptionsProc},
#endif
#include "common.h"
#include "frontend.h"
-
int
PlaySoundFile (char *name)
{
+ if(mute == 1) return 1;
if (*name == NULLCHAR) {
return 0;
} else if (strcmp(name, "$") == 0) {
@section Options Menu
@cindex Menu, Options
@cindex Options Menu
+@section Mute all Sounds
+@cindex Mute sounds, Menu Item
+Ticking this menu item toggles all sounds XBoard can make on or off,
+without losing their definitions.
@section General Options
@cindex General Options, Menu Item
The following items to set option values appear in the dialog