summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorDave SIMmONs <simon@lindenlab.com>2011-02-24 17:42:16 -0800
committerDave SIMmONs <simon@lindenlab.com>2011-02-24 17:42:16 -0800
commit52ae219d502d182a7e6c000070e5935b923f30e7 (patch)
tree556151d5097feb5ae079786044188cb0d0400d16 /indra/newview/llfloaterpreference.cpp
parent1c8c28a8de73228c06fdf2d84045433c7231cd19 (diff)
parent609c70eb5a48389bef1ad33358774764ee9615e2 (diff)
Merge again lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 8c9dfe435a..724096b443 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1539,6 +1539,7 @@ LLPanelPreference::LLPanelPreference()
: LLPanel()
{
mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
+ mCommitCallbackRegistrar.add("Pref.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelPreference::updateMediaAutoPlayCheckbox, this, _1));
}
//virtual
@@ -1700,6 +1701,21 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data)
control->set(LLSD(FALSE));
}
+void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
+{
+ std::string name = ctrl->getName();
+
+ // Disable "Allow Media to auto play" only when both
+ // "Streaming Music" and "Media" are unchecked. STORM-513.
+ if ((name == "enable_music") || (name == "enable_media"))
+ {
+ bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
+ bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
+
+ getChild<LLCheckBoxCtrl>("media_auto_play_btn")->setEnabled(music_enabled || media_enabled);
+ }
+}
+
static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
BOOL LLPanelPreferenceGraphics::postBuild()