summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-06 15:16:12 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-06 15:16:12 -0800
commitbffbd93b067131bb7f1526e159ea9997983eef88 (patch)
tree97e2bb9cde3dc28e7a714cdad481867c481f5541 /indra/newview
parent3e6d795d7bbc85a64c67998ec4467ff04a057118 (diff)
DEV-44804 autoplay preference for media should enable the media subsystem when toggled from off to on
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpreference.cpp20
-rw-r--r--indra/newview/llfloaterpreference.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml5
3 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 11dd48056c..d0716f67b8 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -325,6 +325,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
+ mCommitCallbackRegistrar.add("Pref.ParcelMediaAutoPlayEnable", boost::bind(&LLFloaterPreference::onCommitParcelMediaAutoPlayEnable, this));
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
@@ -986,6 +987,25 @@ void LLFloaterPreference::onCommitAutoDetectAspect()
}
}
+void LLFloaterPreference::onCommitParcelMediaAutoPlayEnable()
+{
+ BOOL autoplay = getChild<LLCheckBoxCtrl>("autoplay_enabled")->get();
+
+ gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, autoplay);
+
+ lldebugs << "autoplay now = " << int(autoplay) << llendl;
+
+ if (autoplay)
+ {
+ // autoplay toggle has gone from FALSE to TRUE; ensure that
+ // the media system is thus actually turned on too.
+ gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
+ gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
+ gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
+ llinfos << "autoplay turned on, turned all media subsystems on" << llendl;
+ }
+}
+
void LLFloaterPreference::refresh()
{
LLPanel::refresh();
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 74a53d673c..b2bc34231d 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -132,6 +132,7 @@ public:
// void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
void onCommitAutoDetectAspect();
+ void onCommitParcelMediaAutoPlayEnable();
void applyResolution();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index 25d7ba0903..5dd93d0f7e 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -85,7 +85,10 @@
left="30"
name="autoplay_enabled"
top_pad="10"
- width="350" />
+ width="350">
+ <check_box.commit_callback
+ function="Pref.ParcelMediaAutoPlayEnable" />
+ </check_box>
<text
type="string"
length="1"