diff -r 6a3e7e403bd1 doc/contributions.txt --- a/doc/contributions.txt Thu Jun 09 16:27:11 2011 -0400 +++ b/doc/contributions.txt Sun Jun 12 16:00:02 2011 -0400 @@ -442,6 +442,7 @@ STORM-1095 STORM-1236 STORM-1259 + STORM-787 Kage Pixel VWR-11 Ken March diff -r 6a3e7e403bd1 indra/newview/app_settings/settings.xml --- a/indra/newview/app_settings/settings.xml Thu Jun 09 16:27:11 2011 -0400 +++ b/indra/newview/app_settings/settings.xml Sun Jun 12 16:00:02 2011 -0400 @@ -3058,6 +3058,17 @@ Value 1 + EnableGestureSounds + + Comment + Play sounds from gestures + Persist + 1 + Type + Boolean + Value + 1 + EnableMouselook Comment diff -r 6a3e7e403bd1 indra/newview/llfloaterpreference.h --- a/indra/newview/llfloaterpreference.h Thu Jun 09 16:27:11 2011 -0400 +++ b/indra/newview/llfloaterpreference.h Sun Jun 12 16:00:02 2011 -0400 @@ -129,6 +129,7 @@ void onClickSetKey(); void setKey(KEY key); void onClickSetMiddleMouse(); + void onClickSetSounds(); // void onClickSkipDialogs(); // void onClickResetDialogs(); void onClickEnablePopup(); diff -r 6a3e7e403bd1 indra/newview/llfloaterpreference.cpp --- a/indra/newview/llfloaterpreference.cpp Thu Jun 09 16:27:11 2011 -0400 +++ b/indra/newview/llfloaterpreference.cpp Sun Jun 12 16:00:02 2011 -0400 @@ -327,6 +327,7 @@ mCommitCallbackRegistrar.add("Pref.SelectSkin", boost::bind(&LLFloaterPreference::onSelectSkin, this)); mCommitCallbackRegistrar.add("Pref.VoiceSetKey", boost::bind(&LLFloaterPreference::onClickSetKey, this)); mCommitCallbackRegistrar.add("Pref.VoiceSetMiddleMouse", boost::bind(&LLFloaterPreference::onClickSetMiddleMouse, this)); + mCommitCallbackRegistrar.add("Pref.SetSounds", boost::bind(&LLFloaterPreference::onClickSetSounds, this)); // mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this)); // mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this)); mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this)); @@ -1286,6 +1287,14 @@ p2t_line_editor->setValue(advanced_preferences->getString("middle_mouse")); } } + +void LLFloaterPreference::onClickSetSounds() +{ + // Disable Enable gesture sounds checkbox if the master sound is disabled + // or if sound effects are disabled. + getChild("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds")); +} + /* void LLFloaterPreference::onClickSkipDialogs() { diff -r 6a3e7e403bd1 indra/newview/llviewermessage.cpp --- a/indra/newview/llviewermessage.cpp Thu Jun 09 16:27:11 2011 -0400 +++ b/indra/newview/llviewermessage.cpp Sun Jun 12 16:00:02 2011 -0400 @@ -4332,6 +4332,9 @@ { return; } + + // Don't play sounds from gestures if they are not enabled. + if (!gSavedSettings.getBOOL("EnableGestureSounds")) return; gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); } diff -r 6a3e7e403bd1 indra/newview/skins/default/xui/en/panel_preferences_sound.xml --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml Thu Jun 09 16:27:11 2011 -0400 +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml Sun Jun 12 16:00:02 2011 -0400 @@ -123,8 +123,8 @@ function="Pref.setControlFalse" parameter="MuteAmbient" /> - +