merge changes for storm-787

meow-7.2.2
Oz Linden 2011-06-15 11:57:13 -04:00
commit 81afbd5b29
6 changed files with 43 additions and 5 deletions

View File

@ -442,6 +442,7 @@ Jonathan Yap
STORM-1095
STORM-1236
STORM-1259
STORM-787
STORM-899
STORM-1273
Kage Pixel

View File

@ -3058,6 +3058,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableGestureSounds</key>
<map>
<key>Comment</key>
<string>Play sounds from gestures</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableMouselook</key>
<map>
<key>Comment</key>

View File

@ -327,6 +327,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
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 @@ void LLFloaterPreference::onClickSetMiddleMouse()
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<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
}
/*
void LLFloaterPreference::onClickSkipDialogs()
{

View File

@ -129,6 +129,7 @@ public:
void onClickSetKey();
void setKey(KEY key);
void onClickSetMiddleMouse();
void onClickSetSounds();
// void onClickSkipDialogs();
// void onClickResetDialogs();
void onClickEnablePopup();

View File

@ -4332,6 +4332,9 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
{
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);
}

View File

@ -123,8 +123,8 @@
function="Pref.setControlFalse"
parameter="MuteAmbient" />
</slider>
<button
control_name="MuteAmbient"
<button
control_name="MuteAmbient"
disabled_control="MuteAudio"
follows="top|left"
height="16"
@ -157,7 +157,7 @@
function="Pref.setControlFalse"
parameter="MuteSounds" />
</slider>
<button
<button
control_name="MuteSounds"
disabled_control="MuteAudio"
follows="top|left"
@ -169,7 +169,10 @@
left_pad="5"
name="mute_audio"
tab_stop="false"
width="16" />
width="16">
<button.commit_callback
function="Pref.SetSounds"/>
</button>
<slider
control_name="AudioLevelMusic"
disabled_control="MuteAudio"
@ -332,7 +335,17 @@
label="Play media attached to other avatars"
left="25"
width="230"/>
<check_box
name="gesture_audio_play_btn"
control_name="EnableGestureSounds"
disabled_control="MuteAudio"
value="true"
follows="left|bottom|right"
height="15"
tool_tip="Check this to hear sounds from gestures"
label="Play sounds from gestures"
top_pad="1"
left="25"/>
<text
type="string"
length="1"